芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/anarchy.ycreate.jp/wp-content/plugins/optinmonster/OMAPI/Promos/Base.php
can_access( $this->promo ) ) { return; } // Set our object. $this->set(); // Register the menu item. add_action( 'admin_menu', array( $this, '_register_page' ) ); } /** * Sets our object instance and base class instance. * * @since 2.10.0 */ public function set() { self::$instance = $this; $this->base = OMAPI::get_instance(); $this->plugin = OMAPI_Plugins_Plugin::get( $this->plugin_id ); } /** * Loads the OptinMonster admin menu and page. * * @since 2.10.0 */ abstract protected function register_page(); /** * Loads the OptinMonster admin menu and page. * * @since 2.10.0 */ public function _register_page() { $hook = $this->register_page(); // If SeedProd is active, we want to redirect to its own landing page. if ( ! empty( $this->plugin['active'] ) ) { add_action( 'load-' . $hook, array( $this, 'redirect_plugin' ) ); } // Load settings page assets. add_action( 'load-' . $hook, array( $this, 'assets' ) ); } /** * Redirects to the seedprod admin page. * * @since 2.10.0 */ abstract public function redirect_plugin(); /** * Outputs the OptinMonster settings page. * * @since 2.10.0 */ abstract public function display_page(); /** * Loads assets for the settings page. * * @since 2.10.0 */ public function assets() { add_filter( 'admin_body_class', array( $this, 'add_body_classes' ) ); $this->base->menu->styles(); $this->base->menu->scripts(); } /** * Add body classes. * * @since 2.10.0 */ public function add_body_classes( $classes ) { $classes .= " omapi-{$this->promo} "; return $classes; } }