| @@ -179,8 +179,11 @@ | ||
| 179 | 179 | * @var Elementor|Gutenberg $platform |
| 180 | 180 | */ |
| 181 | 181 | $platform = $this->platform( $_current_screen ); |
| 182 | 182 | |
| 183 | + $hide_buttons = get_option('templately-gutenberg-hide-buttons', 'no'); | |
| 184 | + $hide_buttons = $hide_buttons === 'yes' ? 'yes' : 'no'; | |
| 185 | + | |
| 183 | 186 | $templately = array_merge( [ |
| 184 | 187 | 'url' => home_url(), |
| 185 | 188 | 'site_url' => site_url(), |
| 186 | 189 | 'nonce' => wp_create_nonce( 'templately_nonce' ), |
| @@ -211,8 +214,9 @@ | ||
| 211 | 214 | 'has_elementor' => rest_sanitize_boolean( is_plugin_active( 'elementor/elementor.php' ) ), |
| 212 | 215 | 'has_elementor_pro' => rest_sanitize_boolean( is_plugin_active( 'elementor-pro/elementor-pro.php' ) ), |
| 213 | 216 | 'theme' => $_current_screen == 'templately' ? 'light' : $platform->ui_theme(), |
| 214 | 217 | 'is_wp_support_gutenberg' => version_compare( get_bloginfo( 'version' ), '5.0.0', '>=' ), |
| 218 | + 'hide_buttons' => $hide_buttons, | |
| 215 | 219 | ], $templately ); |
| 216 | 220 | |
| 217 | 221 | templately()->assets->localize( $_localize_handle, 'templately', $templately ); |
| 218 | 222 | } |
| @@ -450,16 +454,16 @@ | ||
| 450 | 454 | public function header() { |
| 451 | 455 | Helper::views( 'header' ); |
| 452 | 456 | } |
| 453 | 457 | |
| 454 | - /** | |
| 455 | - * Handle links displayed below the plugin name in the WordPress Installed Plugins page. | |
| 456 | - * | |
| 457 | - * @return array | |
| 458 | - * @since 3.1.2 | |
| 459 | - * @static | |
| 460 | - * | |
| 461 | - */ | |
| 458 | + /** | |
| 459 | + * Handle links displayed below the plugin name in the WordPress Installed Plugins page. | |
| 460 | + * | |
| 461 | + * @return array | |
| 462 | + * @since 3.1.2 | |
| 463 | + * @static | |
| 464 | + * | |
| 465 | + */ | |
| 462 | 466 | public static function handleActionLinks($links, $file) |
| 463 | 467 | { |
| 464 | 468 | $settingsLink = '<a href="' . admin_url('admin.php?page=templately') . '" aria-label="' . __('Open settings page', |
| 465 | 469 | 'templately') . '">' . __('Templates Library', 'templately') . '</a>'; |