芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/elementor/core/editor/notice-bar.php
get_install_time() > strtotime( '-1 days' ) ) { return []; } return [ 'muted_period' => 14, 'option_key' => '_elementor_editor_upgrade_notice_dismissed', 'message' => esc_html__( 'Unleash the full power of Elementor\'s features and web creation tools.', 'elementor' ), 'action_title' => esc_html__( 'Upgrade Now', 'elementor' ), 'action_url' => 'https://go.elementor.com/go-pro-editor-notice-bar/', ]; } final public function get_notice() { if ( ! current_user_can( 'manage_options' ) ) { return null; } $settings = $this->get_settings(); if ( empty( $settings['option_key'] ) ) { return null; } $dismissed_time = get_option( $settings['option_key'] ); if ( $dismissed_time ) { if ( $dismissed_time > strtotime( '-' . $settings['muted_period'] . ' days' ) ) { return null; } $this->set_notice_dismissed(); } return $this; } protected function render_action( $type ) { $settings = $this->get_settings(); // TODO: Make the API better. The bad naming is because of BC. $prefix_map = [ 'primary' => '', 'secondary' => 'secondary_', ]; $prefix = $prefix_map[ $type ]; $action_title = "{$prefix}action_title"; $action_url = "{$prefix}action_url"; $action_message = "{$prefix}message"; $action_target = "{$prefix}action_target"; if ( empty( $settings[ $action_title ] ) || empty( $settings[ $action_url ] ) || empty( $settings[ $action_message ] ) ) { return; } ?>
">
">
get_settings(); $icon = empty( $settings['icon'] ) ? 'eicon-elementor-square' : esc_attr( $settings['icon'] ); ?>
render_action( 'primary' ); $this->render_action( 'secondary' ); ?>
get_settings( 'option_key' ), time() ); } public function register_ajax_actions( Ajax $ajax ) { $ajax->register_ajax_action( 'notice_bar_dismiss', [ $this, 'set_notice_dismissed' ] ); } }