get( 'Version' ); $version_string = is_string( $theme_version ) ? $theme_version : false; /** * Add theme page */ function aploblocks_appearance_menu() { add_theme_page( esc_html__( 'AploBlocks', 'aploblocks' ), esc_html__( 'AploBlocks', 'aploblocks' ), 'edit_theme_options', 'aploblocks-theme', 'aploblocks_theme_page' ); } add_action( 'admin_menu', 'aploblocks_appearance_menu' ); /** * Display About page * * * * * Name ); ?> */ function aploblocks_theme_page() { $theme = wp_get_theme(); wp_enqueue_style( 'aploblocks-theme-admin', get_template_directory_uri() . '/assets/css/admin.css',array(),$version_string ); ?>
get( 'Version' ); // check if we could display the notice bar if (!can_display_notice()) { return; } // already checked for 0, get state $notice_required = check_plugin_state(); wp_enqueue_style( 'aploblocks-theme-admin', get_template_directory_uri() . '/assets/css/admin.css',array(),$version_string ); wp_register_script( 'aploblocks-plugin-notice',get_template_directory_uri() . '/assets/js/admin.js',array('wp-api-fetch'),"0.9.5",true ); wp_enqueue_script( 'aploblocks-plugin-notice' ); wp_localize_script( 'aploblocks-plugin-notice', 'aploblocks', array( 'nonce' => wp_create_nonce( 'aploblocks-welcome-notice-nonce' ), 'ajaxUrl' => esc_url( admin_url( 'admin-ajax.php' ) ), 'pluginStatus' => $notice_required, 'pluginSlug' => 'aploblocks', 'activating' => __( 'Activating', 'aploblocks' ) . '…', 'installing' => __( 'Installing', 'aploblocks' ) . '…', 'respButtonOk' => __( 'Success', 'aploblocks' ), 'respButtonFail' => __( 'Error', 'aploblocks' ), 'respOk' => __( 'Aploblocks plugin successfully activated', 'aploblocks' ), 'respFail' => __( 'There was a problem setting up the plugin. Please attempt to setup through the plugin page', 'aploblocks' ), ) ); ?>