芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/ycreate.jp/wp-content/plugins/optinmonster/OMAPI/Promos/TrustPulse.php
trustpulse_setup = ! empty( $account_id ); } /** * Loads the OptinMonster admin menu. * * @since 1.9.0 */ protected function register_page() { return add_submenu_page( // If trustpulse is active/setup, don't show the TP sub-menu item under OM. ! empty( $this->plugin['active'] ) && $this->trustpulse_setup ? $this->base->menu->parent_slug() . '-no-menu' : $this->base->menu->parent_slug(), // Parent slug esc_html__( 'TrustPulse', 'optin-monster-api' ), // Page title esc_html__( 'Social Proof Widget', 'optin-monster-api' ), $this->base->access_capability( 'optin-monster-trustpulse' ), // Cap 'optin-monster-trustpulse', // Slug array( $this, 'display_page' ) // Callback ); } /** * Redirects to the trustpulse admin page. * * @since 1.9.0 */ public function redirect_plugin() { $url = esc_url_raw( admin_url( 'admin.php?page=trustpulse' ) ); wp_safe_redirect( $url ); exit; } /** * Outputs the OptinMonster settings page. * * @since 1.9.0 */ public function display_page() { $plugin_search_url = is_multisite() ? network_admin_url( 'plugin-install.php?tab=search&type=term&s=trustpulse' ) : admin_url( 'plugin-install.php?tab=search&type=term&s=trustpulse' ); $this->base->output_view( 'trustpulse-settings-page.php', array( 'plugin' => $this->plugin, 'plugin_search_url' => $plugin_search_url, 'button_activate' => __( 'Activate the TrustPulse Plugin', 'optin-monster-api' ), 'button_install' => __( 'Install & Activate the TrustPulse Plugin', 'optin-monster-api' ), ) ); } /** * Loads assets for the settings page. * * @since 1.9.0 */ public function assets() { parent::assets(); wp_enqueue_style( 'om-tp-admin-css', $this->base->url . 'assets/dist/css/trustpulse.min.css', false, $this->base->asset_version() ); add_action( 'in_admin_header', array( $this, 'render_banner' ) ); } /** * Renders TP banner in the page header * * @return void */ public function render_banner() { $this->base->output_view( 'trustpulse-banner.php' ); } }