Changeset 3487927
- Timestamp:
- 03/21/2026 07:12:55 PM (7 days ago)
- Location:
- peak-publisher
- Files:
-
- 6 edited
- 22 copied
-
tags/1.3.0 (copied) (copied from peak-publisher/trunk)
-
tags/1.3.0/assets/bootstrap-codes/basicV2.php.txt (copied) (copied from peak-publisher/trunk/assets/bootstrap-codes/basicV2.php.txt)
-
tags/1.3.0/assets/css/admin.css (copied) (copied from peak-publisher/trunk/assets/css/admin.css)
-
tags/1.3.0/assets/js/admin.js (copied) (copied from peak-publisher/trunk/assets/js/admin.js)
-
tags/1.3.0/assets/js/api.js (copied) (copied from peak-publisher/trunk/assets/js/api.js)
-
tags/1.3.0/assets/js/components/GlobalDropOverlay.js (copied) (copied from peak-publisher/trunk/assets/js/components/GlobalDropOverlay.js)
-
tags/1.3.0/assets/js/components/PluginEditor.js (copied) (copied from peak-publisher/trunk/assets/js/components/PluginEditor.js)
-
tags/1.3.0/assets/js/components/PluginList.js (copied) (copied from peak-publisher/trunk/assets/js/components/PluginList.js)
-
tags/1.3.0/assets/js/components/Settings.js (copied) (copied from peak-publisher/trunk/assets/js/components/Settings.js) (5 diffs)
-
tags/1.3.0/assets/js/stores (copied) (copied from peak-publisher/trunk/assets/js/stores)
-
tags/1.3.0/assets/js/utils-upload.js (copied) (copied from peak-publisher/trunk/assets/js/utils-upload.js)
-
tags/1.3.0/assets/js/utils.js (copied) (copied from peak-publisher/trunk/assets/js/utils.js)
-
tags/1.3.0/classes/AdminAPI.php (copied) (copied from peak-publisher/trunk/classes/AdminAPI.php)
-
tags/1.3.0/classes/AdminUI.php (copied) (copied from peak-publisher/trunk/classes/AdminUI.php)
-
tags/1.3.0/classes/AssetManager.php (copied) (copied from peak-publisher/trunk/classes/AssetManager.php)
-
tags/1.3.0/classes/PublicAPI.php (copied) (copied from peak-publisher/trunk/classes/PublicAPI.php)
-
tags/1.3.0/classes/UploadWorkflow.php (copied) (copied from peak-publisher/trunk/classes/UploadWorkflow.php)
-
tags/1.3.0/includes/functions.php (copied) (copied from peak-publisher/trunk/includes/functions.php) (2 diffs)
-
tags/1.3.0/includes/init.php (modified) (2 diffs)
-
tags/1.3.0/libs (copied) (copied from peak-publisher/trunk/libs)
-
tags/1.3.0/libs/plugin-directory/libs/geopattern-1.1.0 (copied) (copied from peak-publisher/trunk/libs/plugin-directory/libs/geopattern-1.1.0)
-
tags/1.3.0/peak-publisher.php (copied) (copied from peak-publisher/trunk/peak-publisher.php) (1 diff)
-
tags/1.3.0/readme.txt (copied) (copied from peak-publisher/trunk/readme.txt) (3 diffs)
-
trunk/assets/js/components/Settings.js (modified) (5 diffs)
-
trunk/includes/functions.php (modified) (2 diffs)
-
trunk/includes/init.php (modified) (2 diffs)
-
trunk/peak-publisher.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
peak-publisher/tags/1.3.0/assets/js/components/Settings.js
r3444907 r3487927 4 4 const { useState, useEffect, createElement, createInterpolateElement } = wp.element; 5 5 const { useSelect } = wp.data; 6 const { Button, Panel, PanelBody, ToggleControl, Text areaControl, SelectControl, RadioControl } = wp.components;6 const { Button, Panel, PanelBody, ToggleControl, TextControl, TextareaControl, SelectControl, RadioControl } = wp.components; 7 7 const { showAlert } = Pblsh.Utils; 8 8 const settingsController = window.Pblsh.Controllers && window.Pblsh.Controllers.Settings ? window.Pblsh.Controllers.Settings : null; … … 19 19 ip_whitelist: [], 20 20 count_plugin_installations: false, 21 standalone_redirect_url: '', 21 22 }); 22 23 const [currentSection, setCurrentSection] = useState('general'); … … 38 39 ip_whitelist: getTextareaFromList(Array.isArray(serverSettings.ip_whitelist) ? serverSettings.ip_whitelist : []), 39 40 count_plugin_installations: !!serverSettings.count_plugin_installations, 41 standalone_redirect_url: serverSettings.standalone_redirect_url || '', 40 42 }); 41 43 } … … 67 69 ip_whitelist: normalizeListFromTextarea(settings.ip_whitelist), 68 70 count_plugin_installations: !!settings.count_plugin_installations, 71 standalone_redirect_url: settings.standalone_redirect_url || '', 69 72 }; 70 73 if (settingsController) { … … 106 109 __next40pxDefaultSize: true, 107 110 }), 111 settings.standalone_mode ? createElement('div', { 112 style: { 113 marginInlineStart: '40px', 114 }, 115 }, 116 createElement(TextControl, { 117 type: 'url', 118 label: __('Frontend redirect URL', 'peak-publisher'), 119 help: __('Leave blank to show a white page.', 'peak-publisher'), 120 value: settings.standalone_redirect_url, 121 placeholder: 'https://', 122 onChange: (val) => setField('standalone_redirect_url', val), 123 __next40pxDefaultSize: true, 124 }) 125 ) : null, 108 126 createElement('p', null, createElement('strong', null, __('Peak Publisher can be used within any WordPress website, but it\'s highly recommended to use a separate WordPress installation for Peak Publisher from the start so that the plugin update URL doesn\'t have to change later. Changing the URL later may require a lengthy transition period.', 'peak-publisher'))), 109 127 ), -
peak-publisher/tags/1.3.0/includes/functions.php
r3477599 r3487927 87 87 ], 88 88 'ip_whitelist' => [], 89 'standalone_redirect_url' => '', 89 90 ]; 90 91 $raw = get_option('pblsh_settings'); … … 127 128 return trim((string) $ip); 128 129 }, $ips))); 130 $redirect_url = trim((string) ($settings['standalone_redirect_url'] ?? '')); 131 $out['standalone_redirect_url'] = $redirect_url !== '' ? esc_url_raw($redirect_url) : ''; 129 132 return $out; 130 133 } -
peak-publisher/tags/1.3.0/includes/init.php
r3425579 r3487927 13 13 // Disable themes. 14 14 add_filter('wp_using_themes', '__return_false'); 15 16 // Redirect frontend visitors to a configured URL. 17 $standalone_redirect_url = get_peak_publisher_settings()['standalone_redirect_url'] ?? ''; 18 if ($standalone_redirect_url !== '') { 19 add_action('wp', function() use ($standalone_redirect_url) { 20 wp_redirect($standalone_redirect_url, 302); 21 exit; 22 }, 9999); 23 } 15 24 16 25 // Re-enable redirection from "/admin" to real admin url (because it's disabled by disabling themes) … … 76 85 $wp_admin_bar->remove_node('site-name'); 77 86 }, 999); 87 88 // Highlight toolbar update icon (since Dashboard/Updates menu is hidden in standalone mode) 89 add_action('admin_head', function() { 90 ?> 91 <style> 92 .admin-color-fresh { --pblsh-wp-update-notif-bg: #d63638; } 93 .admin-color-light { --pblsh-wp-update-notif-bg: #d64e07; } 94 .admin-color-modern { --pblsh-wp-update-notif-bg: #3858e9; } 95 .admin-color-blue { --pblsh-wp-update-notif-bg: #e1a948; } 96 .admin-color-midnight { --pblsh-wp-update-notif-bg: #69a8bb; } 97 .admin-color-coffee { --pblsh-wp-update-notif-bg: #9ea476; } 98 .admin-color-sunrise { --pblsh-wp-update-notif-bg: #ccaf0b; } 99 .admin-color-ectoplasm { --pblsh-wp-update-notif-bg: #d46f15; } 100 .admin-color-ocean { --pblsh-wp-update-notif-bg: #aa9d88; } 101 102 #wpadminbar #wp-admin-bar-updates .ab-label { 103 position: relative; 104 color: #fff !important; 105 margin-left: 4px; 106 margin-right: 6px; 107 z-index: 0; 108 } 109 110 #wpadminbar #wp-admin-bar-updates .ab-label::after { 111 content: " "; 112 position: absolute; 113 min-width: 20px; 114 width: calc(6px + 100% + 6px); 115 height: 20px; 116 background: var(--pblsh-wp-update-notif-bg); 117 border-radius: 10px; 118 bottom: 50%; 119 right: 50%; 120 z-index: -1; 121 transform: translate(50%, 50%); 122 } 123 </style> 124 <?php 125 }); 78 126 } 79 127 -
peak-publisher/tags/1.3.0/peak-publisher.php
r3477599 r3487927 4 4 * Plugin Name: Peak Publisher 5 5 * Description: The easiest way to self-host, manage and publish your own custom plugins. 6 * Version: 1. 2.06 * Version: 1.3.0 7 7 * Requires at least: 5.8 8 8 * Requires PHP: 8.1 9 * Author: ehtmlu10 * Author URI: https:// ehtmlu.com/9 * Author: wppeak.com 10 * Author URI: https://www.wppeak.com/ 11 11 * License: GPL v2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html -
peak-publisher/tags/1.3.0/readme.txt
r3477599 r3487927 1 1 === Peak Publisher === 2 2 Plugin Name: Peak Publisher 3 Author: eHtmlu3 Author: wppeak.com 4 4 Author URI: https://www.wppeak.com/ 5 5 Contributors: eHtmlu … … 9 9 Requires PHP: 8.1 10 10 Tested up to: 6.9 11 Stable tag: 1. 2.011 Stable tag: 1.3.0 12 12 License: GPLv2 or later 13 13 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 109 109 == Changelog == 110 110 111 = 1.3.0 - 2026-03-21 = 112 * Added standalone redirect URL setting for redirecting frontend visitors in standalone mode 113 * Added visual highlighting of the update notification icon in the admin toolbar in standalone mode 114 111 115 = 1.2.0 - 2026-03-08 = 112 116 * Added asset management: upload, replace, reorder, and delete plugin icons, banners, and screenshots directly in the admin UI -
peak-publisher/trunk/assets/js/components/Settings.js
r3444907 r3487927 4 4 const { useState, useEffect, createElement, createInterpolateElement } = wp.element; 5 5 const { useSelect } = wp.data; 6 const { Button, Panel, PanelBody, ToggleControl, Text areaControl, SelectControl, RadioControl } = wp.components;6 const { Button, Panel, PanelBody, ToggleControl, TextControl, TextareaControl, SelectControl, RadioControl } = wp.components; 7 7 const { showAlert } = Pblsh.Utils; 8 8 const settingsController = window.Pblsh.Controllers && window.Pblsh.Controllers.Settings ? window.Pblsh.Controllers.Settings : null; … … 19 19 ip_whitelist: [], 20 20 count_plugin_installations: false, 21 standalone_redirect_url: '', 21 22 }); 22 23 const [currentSection, setCurrentSection] = useState('general'); … … 38 39 ip_whitelist: getTextareaFromList(Array.isArray(serverSettings.ip_whitelist) ? serverSettings.ip_whitelist : []), 39 40 count_plugin_installations: !!serverSettings.count_plugin_installations, 41 standalone_redirect_url: serverSettings.standalone_redirect_url || '', 40 42 }); 41 43 } … … 67 69 ip_whitelist: normalizeListFromTextarea(settings.ip_whitelist), 68 70 count_plugin_installations: !!settings.count_plugin_installations, 71 standalone_redirect_url: settings.standalone_redirect_url || '', 69 72 }; 70 73 if (settingsController) { … … 106 109 __next40pxDefaultSize: true, 107 110 }), 111 settings.standalone_mode ? createElement('div', { 112 style: { 113 marginInlineStart: '40px', 114 }, 115 }, 116 createElement(TextControl, { 117 type: 'url', 118 label: __('Frontend redirect URL', 'peak-publisher'), 119 help: __('Leave blank to show a white page.', 'peak-publisher'), 120 value: settings.standalone_redirect_url, 121 placeholder: 'https://', 122 onChange: (val) => setField('standalone_redirect_url', val), 123 __next40pxDefaultSize: true, 124 }) 125 ) : null, 108 126 createElement('p', null, createElement('strong', null, __('Peak Publisher can be used within any WordPress website, but it\'s highly recommended to use a separate WordPress installation for Peak Publisher from the start so that the plugin update URL doesn\'t have to change later. Changing the URL later may require a lengthy transition period.', 'peak-publisher'))), 109 127 ), -
peak-publisher/trunk/includes/functions.php
r3477599 r3487927 87 87 ], 88 88 'ip_whitelist' => [], 89 'standalone_redirect_url' => '', 89 90 ]; 90 91 $raw = get_option('pblsh_settings'); … … 127 128 return trim((string) $ip); 128 129 }, $ips))); 130 $redirect_url = trim((string) ($settings['standalone_redirect_url'] ?? '')); 131 $out['standalone_redirect_url'] = $redirect_url !== '' ? esc_url_raw($redirect_url) : ''; 129 132 return $out; 130 133 } -
peak-publisher/trunk/includes/init.php
r3425579 r3487927 13 13 // Disable themes. 14 14 add_filter('wp_using_themes', '__return_false'); 15 16 // Redirect frontend visitors to a configured URL. 17 $standalone_redirect_url = get_peak_publisher_settings()['standalone_redirect_url'] ?? ''; 18 if ($standalone_redirect_url !== '') { 19 add_action('wp', function() use ($standalone_redirect_url) { 20 wp_redirect($standalone_redirect_url, 302); 21 exit; 22 }, 9999); 23 } 15 24 16 25 // Re-enable redirection from "/admin" to real admin url (because it's disabled by disabling themes) … … 76 85 $wp_admin_bar->remove_node('site-name'); 77 86 }, 999); 87 88 // Highlight toolbar update icon (since Dashboard/Updates menu is hidden in standalone mode) 89 add_action('admin_head', function() { 90 ?> 91 <style> 92 .admin-color-fresh { --pblsh-wp-update-notif-bg: #d63638; } 93 .admin-color-light { --pblsh-wp-update-notif-bg: #d64e07; } 94 .admin-color-modern { --pblsh-wp-update-notif-bg: #3858e9; } 95 .admin-color-blue { --pblsh-wp-update-notif-bg: #e1a948; } 96 .admin-color-midnight { --pblsh-wp-update-notif-bg: #69a8bb; } 97 .admin-color-coffee { --pblsh-wp-update-notif-bg: #9ea476; } 98 .admin-color-sunrise { --pblsh-wp-update-notif-bg: #ccaf0b; } 99 .admin-color-ectoplasm { --pblsh-wp-update-notif-bg: #d46f15; } 100 .admin-color-ocean { --pblsh-wp-update-notif-bg: #aa9d88; } 101 102 #wpadminbar #wp-admin-bar-updates .ab-label { 103 position: relative; 104 color: #fff !important; 105 margin-left: 4px; 106 margin-right: 6px; 107 z-index: 0; 108 } 109 110 #wpadminbar #wp-admin-bar-updates .ab-label::after { 111 content: " "; 112 position: absolute; 113 min-width: 20px; 114 width: calc(6px + 100% + 6px); 115 height: 20px; 116 background: var(--pblsh-wp-update-notif-bg); 117 border-radius: 10px; 118 bottom: 50%; 119 right: 50%; 120 z-index: -1; 121 transform: translate(50%, 50%); 122 } 123 </style> 124 <?php 125 }); 78 126 } 79 127 -
peak-publisher/trunk/peak-publisher.php
r3477599 r3487927 4 4 * Plugin Name: Peak Publisher 5 5 * Description: The easiest way to self-host, manage and publish your own custom plugins. 6 * Version: 1. 2.06 * Version: 1.3.0 7 7 * Requires at least: 5.8 8 8 * Requires PHP: 8.1 9 * Author: ehtmlu10 * Author URI: https:// ehtmlu.com/9 * Author: wppeak.com 10 * Author URI: https://www.wppeak.com/ 11 11 * License: GPL v2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html -
peak-publisher/trunk/readme.txt
r3477599 r3487927 1 1 === Peak Publisher === 2 2 Plugin Name: Peak Publisher 3 Author: eHtmlu3 Author: wppeak.com 4 4 Author URI: https://www.wppeak.com/ 5 5 Contributors: eHtmlu … … 9 9 Requires PHP: 8.1 10 10 Tested up to: 6.9 11 Stable tag: 1. 2.011 Stable tag: 1.3.0 12 12 License: GPLv2 or later 13 13 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 109 109 == Changelog == 110 110 111 = 1.3.0 - 2026-03-21 = 112 * Added standalone redirect URL setting for redirecting frontend visitors in standalone mode 113 * Added visual highlighting of the update notification icon in the admin toolbar in standalone mode 114 111 115 = 1.2.0 - 2026-03-08 = 112 116 * Added asset management: upload, replace, reorder, and delete plugin icons, banners, and screenshots directly in the admin UI
Note: See TracChangeset
for help on using the changeset viewer.