get_page_option_name(), false ); } /** * Change option to false. */ public function upgrader_page_content_close() { update_option( $this->get_page_content_option_name(), false ); } /** * Get Option Name. * * @return string. */ public function get_page_option_name() { return wp_get_theme()->template . '_upgrader_page'; } /** * Get Option Name. * * @return string. */ public function get_page_content_option_name() { return wp_get_theme()->template . '_upgrader_page_content'; } /** * Set content width upgrader option meta */ public function set_upgrader_page() { $flag = get_option( $this->get_page_option_name() ); if ( ! $flag ) { add_option( $this->get_page_option_name(), true ); } } /** * Set content width upgrader option meta */ public function set_upgrader_page_content() { $flag = get_option( $this->get_page_content_option_name() ); if ( ! $flag ) { add_option( $this->get_page_content_option_name(), true ); } } /** * Admin Notice. */ public function page_content_notice() { global $pagenow; if ( ! current_user_can( 'manage_options' ) ) { return; } if ( defined( 'GUTENVERSE_VERSION' ) ) { if ( version_compare( GUTENVERSE_VERSION, '1.5.0', '<=' ) ) { if ( get_option( $this->get_page_content_option_name() ) ) { $this->enqueue_script(); ?>
set_upgrader_page(); if ( get_option( $this->get_page_option_name() ) && ! ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'gutenverse-upgrade-notice' === $_GET['page'] ) ) { $this->enqueue_script(); ?>