Changeset 2675847
- Timestamp:
- 02/09/2022 05:05:54 PM (4 years ago)
- Location:
- full-site-editing/trunk
- Files:
-
- 3 edited
-
full-site-editing-plugin.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
wpcom-universal-themes/index.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
full-site-editing/trunk/full-site-editing-plugin.php
r2675208 r2675847 3 3 * Plugin Name: WordPress.com Editing Toolkit 4 4 * Description: Enhances your page creation workflow within the Block Editor. 5 * Version: 3.26 5875 * Version: 3.26678 6 6 * Author: Automattic 7 7 * Author URI: https://automattic.com/wordpress-plugins/ … … 43 43 * @var string 44 44 */ 45 define( 'A8C_ETK_PLUGIN_VERSION', '3.26 587' );45 define( 'A8C_ETK_PLUGIN_VERSION', '3.26678' ); 46 46 47 47 // Always include these helper files for dotcom FSE. -
full-site-editing/trunk/readme.txt
r2675208 r2675847 4 4 Requires at least: 5.5 5 5 Tested up to: 5.6 6 Stable tag: 3.26 5876 Stable tag: 3.26678 7 7 Requires PHP: 5.6.20 8 8 License: GPLv2 or later -
full-site-editing/trunk/wpcom-universal-themes/index.php
r2675208 r2675847 101 101 add_action( 'admin_bar_menu', 'gutenberg_adminbar_items', 50 ); 102 102 add_action( 'admin_menu', __NAMESPACE__ . '\hide_nav_menus_submenu' ); 103 104 // Hides the AMP menu.105 remove_action( 'admin_menu', 'amp_add_customizer_link' );106 107 103 remove_action( 'init', __NAMESPACE__ . '\hide_template_cpts', 11 ); 108 104 remove_action( 'restapi_theme_init', __NAMESPACE__ . '\hide_template_cpts', 11 ); … … 123 119 remove_action( 'admin_bar_menu', 'gutenberg_adminbar_items', 50 ); 124 120 remove_action( 'admin_menu', __NAMESPACE__ . '\hide_nav_menus_submenu' ); 125 126 // Shows the AMP menu.127 add_action( 'admin_menu', 'amp_add_customizer_link' );128 121 129 122 if ( defined( 'REST_API_REQUEST' ) && true === REST_API_REQUEST ) { … … 151 144 } 152 145 153 // AMP registration on the default 10 priority is too early and confuses the current 154 // Gutenberg (v12.5.1 at this comment's writing) `gutenberg_remove_legacy_pages` function 155 // into mistaking it for the Customizer proper. 156 if ( function_exists( 'amp_add_customizer_link' ) ) { 157 remove_action( 'admin_menu', 'amp_add_customizer_link' ); 158 add_action( 'admin_menu', 'amp_add_customizer_link', 11 ); 159 } 146 // Amp plugin helper. 147 add_action( 'admin_menu', __NAMESPACE__ . '\maybe_juggle_amp_priority', 0 ); 160 148 161 149 if ( apply_filters( 'a8c_hide_core_fse_activation', false ) ) { … … 181 169 remove_action( 'admin_menu', __NAMESPACE__ . '\add_submenu' ); 182 170 remove_action( 'admin_init', __NAMESPACE__ . '\init_settings' ); 171 remove_action( 'admin_menu', __NAMESPACE__ . '\maybe_juggle_amp_priority', 0 ); 172 } 173 174 /** 175 * AMP registration on the default 10 priority is too early and confuses the current Gutenberg 176 * plugin's `gutenberg_remove_legacy_pages` function into mistaking it for the Customizer proper. 177 * 178 * This will be fixed once https://github.com/WordPress/gutenberg/pull/38598 is released. 179 * 180 * @return void 181 */ 182 function maybe_juggle_amp_priority() { 183 if ( ! function_exists( 'amp_add_customizer_link' ) || ! has_action( 'admin_menu', 'amp_add_customizer_link' ) ) { 184 return; 185 } 186 187 remove_action( 'admin_menu', 'amp_add_customizer_link' ); 188 add_action( 'admin_menu', 'amp_add_customizer_link', 11 ); 183 189 } 184 190
Note: See TracChangeset
for help on using the changeset viewer.