From de05d4d8a019593e85a8ca2ced18a1346488539e Mon Sep 17 00:00:00 2001 From: David Decker Date: Tue, 22 Oct 2019 14:58:24 +0200 Subject: [PATCH] Readme uodates --- CHANGES.md | 10 +++++----- README.md | 12 ++++++------ includes/admin/tbex-settings.php | 5 +++++ includes/block-editor/items-block-editor.php | 2 +- includes/plugins/items-code-snippets.php | 2 +- readme.txt | 12 ++++++------ 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 747e8ee..834da52 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,12 +16,12 @@ ### ⚡ 1.4.8 - 2019-10-22 -* New: Added "News & Updates" Dashboard widget - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though -* New: Added way more specific, helpful resources within the WordPress Logo/ About group (finishing the work that began with plugin version 1.4.5) +* New: Added **"News & Updates" Dashboard widget** - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though +* New: Added way **more specific, helpful resources within the WordPress Logo/ About group** (finishing the work that began with plugin version 1.4.5) * New: Added shortcut to plugin's settings in Multisite Network Admin (only to the main site of the Network, though) -* New: Added shortcuts to plugin's settings tabs on the Elementor "General Settings" admin page (as extra tab there) -* New: For [ClassicPress](https://www.classicpress.net/) installs added new "Toolbar Extras" info page under "Security" admin menu (for ClassicPress v1.1.0+) -* New: You can now also leverage "WPCore Plugin Manager" plugin to bulk install plugins - if active, new item and sub items appear within the "New Content" Group +* New: Added **shortcuts to plugin's settings** tabs on the **Elementor "General Settings"** admin page (as extra tab there) +* New: **For [ClassicPress](https://www.classicpress.net/) installs** added new "Toolbar Extras" **info page under "Security"** admin menu (for ClassicPress v1.1.0+) +* New: You can now also leverage **"WPCore Plugin Manager" plugin to bulk install plugins** - if active, new item and sub items appear within the "New Content" Group * Tweak: Extended "WP About" sub items with more stuff when *Dev Mode* is enabled * Tweak: Refined "Mailster" plugin support, added new sub items (Setup Wizard, Tests) and one new resource item (Changelog) * Tweak: Refined "Formidable Forms" plugin support, added new sub items for Pro version and 2 Pro Add-Ons, plus one new resource item (Changelog) diff --git a/README.md b/README.md index 06db2fd..a57a0a0 100644 --- a/README.md +++ b/README.md @@ -520,12 +520,12 @@ See the full [tutorial on how to use Toolbar Extras on a WordPress.com Business ### ⚡ 1.4.8 - 2019-10-22 -* New: Added "News & Updates" Dashboard widget - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though -* New: Added way more specific, helpful resources within the WordPress Logo/ About group (finishing the work that began with plugin version 1.4.5) -* New: Added shortcut to plugin's settings in Multisite Network Admin (only to the main site of the Network, though) -* New: Added shortcuts to plugin's settings tabs on the Elementor "General Settings" admin page (as extra tab there) -* New: For [ClassicPress](https://www.classicpress.net/) installs added new "Toolbar Extras" info page under "Security" admin menu (for ClassicPress v1.1.0+) -* New: You can now also leverage "WPCore Plugin Manager" plugin to bulk install plugins - if active, new item and sub items appear within the "New Content" Group +* New: Added **"News & Updates" Dashboard widget** - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though +* New: Added way **more specific, helpful resources within the WordPress Logo/ About group** (finishing the work that began with plugin version 1.4.5) +* New: Added **shortcut to plugin's settings in Multisite** Network Admin (only to the main site of the Network, though) +* New: Added **shortcuts to plugin's settings** tabs on the **Elementor "General Settings"** admin page (as extra tab there) +* New: **For [ClassicPress](https://www.classicpress.net/) installs** added new "Toolbar Extras" **info page under "Security"** admin menu (for ClassicPress v1.1.0+) +* New: You can now also leverage **"WPCore Plugin Manager" plugin to bulk install plugins** - if active, new item and sub items appear within the "New Content" Group * Tweak: Extended "WP About" sub items with more stuff when *Dev Mode* is enabled * Tweak: Refined "Mailster" plugin support, added new sub items (Setup Wizard, Tests) and one new resource item (Changelog) * Tweak: Refined "Formidable Forms" plugin support, added new sub items for Pro version and 2 Pro Add-Ons, plus one new resource item (Changelog) diff --git a/includes/admin/tbex-settings.php b/includes/admin/tbex-settings.php index 4af56e5..9ca8c1e 100644 --- a/includes/admin/tbex-settings.php +++ b/includes/admin/tbex-settings.php @@ -1119,9 +1119,14 @@ function ddw_tbex_builder_logic_for_builtin( $is_active ) { * Display our own Dashboard Widget for News & Updates - only load for admins. * * @since 1.4.8 + * @since 1.4.9 Tweaked for proper Multisite usage. */ if ( ( is_admin() || is_network_admin() ) && ddw_tbex_display_dashboard_additions() ) { + if ( ! function_exists( 'is_plugin_active_for_network' ) ) { + require_once ABSPATH . '/wp-admin/includes/plugin.php'; + } + if ( ( ! is_multisite() && current_user_can( 'manage_options' ) ) || ( is_multisite() && current_user_can( 'manage_network' ) diff --git a/includes/block-editor/items-block-editor.php b/includes/block-editor/items-block-editor.php index 8a9c597..40a0c4a 100644 --- a/includes/block-editor/items-block-editor.php +++ b/includes/block-editor/items-block-editor.php @@ -158,7 +158,7 @@ function ddw_tbex_items_block_editor_core( $admin_bar ) { * Note: This optionally filters the existing item (via "Gutenberg" plugin * for example). */ - if ( ddw_tbex_display_items_new_content() ) { + if ( ddw_tbex_display_items_new_content() && ! is_network_admin() ) { $admin_bar->add_node( array( diff --git a/includes/plugins/items-code-snippets.php b/includes/plugins/items-code-snippets.php index 8994e2e..73357c1 100644 --- a/includes/plugins/items-code-snippets.php +++ b/includes/plugins/items-code-snippets.php @@ -273,7 +273,7 @@ function ddw_tbex_aoitems_new_content_code_snippet( $admin_bar ) { 'id' => 'tbex-code-snippet', 'parent' => 'new-content', 'title' => esc_attr_x( 'Code Snippet', 'Toolbar New Content section', 'toolbar-extras' ), - 'href' => esc_url( admin_url( 'admin.php?page=add-snippet' ) ), + 'href' => esc_url( network_admin_url( 'admin.php?page=add-snippet' ) ), 'meta' => array( 'target' => '', 'title' => esc_attr_x( 'Add new Code Snippet', 'Toolbar New Content section', 'toolbar-extras' ), diff --git a/readme.txt b/readme.txt index 41b8339..7375130 100644 --- a/readme.txt +++ b/readme.txt @@ -420,12 +420,12 @@ See the full [tutorial on how to use Toolbar Extras on a WordPress.com Business = ⚡ 1.4.8 - 2019-10-22 = -* New: Added "News & Updates" Dashboard widget - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though -* New: Added way more specific, helpful resources within the WordPress Logo/ About group (finishing the work that began with plugin version 1.4.5) -* New: Added shortcut to plugin's settings in Multisite Network Admin (only to the main site of the Network, though) -* New: Added shortcuts to plugin's settings tabs on the Elementor "General Settings" admin page (as extra tab there) -* New: For [ClassicPress](https://www.classicpress.net/) installs added new "Toolbar Extras" info page under "Security" admin menu (for ClassicPress v1.1.0+) -* New: You can now also leverage "WPCore Plugin Manager" plugin to bulk install plugins - if active, new item and sub items appear within the "New Content" Group +* New: Added **"News & Updates" Dashboard widget** - only viewable for (Super) Admins, can easily be disabled via "Screen Options" (top right corner) - Note: settings integration will follow, though +* New: Added way **more specific, helpful resources within the WordPress Logo/ About group** (finishing the work that began with plugin version 1.4.5) +* New: Added **shortcut to plugin's settings in Multisite** Network Admin (only to the main site of the Network, though) +* New: Added **shortcuts to plugin's settings** tabs on the **Elementor "General Settings"** admin page (as extra tab there) +* New: **For [ClassicPress](https://www.classicpress.net/) installs** added new "Toolbar Extras" **info page under "Security"** admin menu (for ClassicPress v1.1.0+) +* New: You can now also leverage **"WPCore Plugin Manager" plugin to bulk install plugins** - if active, new item and sub items appear within the "New Content" Group * Tweak: Extended "WP About" sub items with more stuff when *Dev Mode* is enabled * Tweak: Refined "Mailster" plugin support, added new sub items (Setup Wizard, Tests) and one new resource item (Changelog) * Tweak: Refined "Formidable Forms" plugin support, added new sub items for Pro version and 2 Pro Add-Ons, plus one new resource item (Changelog)