芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/wp-content/plugins/bdthemes-element-pack/modules/adblock-detector/module.php
add_actions(); } public function get_name() { return 'bdt-adblock-detector'; } public function register_controls($section) { $section->start_controls_section( 'element_pack_adblock_detector_section', [ 'tab' => Controls_Manager::TAB_SETTINGS, 'label' => BDTEP_CP . esc_html__('AdBlock Detector', 'bdthemes-element-pack'), ] ); $section->add_control( 'ep_adblock_detector_enable', [ 'label' => esc_html__('AdBlock Detector?', 'bdthemes-element-pack'), 'type' => Controls_Manager::SWITCHER, 'render_type' => 'template', ] ); $section->end_controls_section(); } public function header_script_render() { if ( Plugin::instance()->editor->is_edit_mode() || Plugin::instance()->preview->is_preview_mode() ) { return; } $document = Plugin::instance()->documents->get( get_the_ID() ); if ( !$document ) { return; } $custom_js = $document->get_settings( 'ep_adblock_detector_enable' ); if ( empty( $custom_js ) ) { return; } ?>
editor->is_edit_mode() || Plugin::instance()->preview->is_preview_mode() ) { return; } $document = Plugin::instance()->documents->get( get_the_ID() ); if ( !$document ) { return; } $custom_js = $document->get_settings( 'ep_adblock_detector_enable' ); if ( empty( $custom_js ) ) { return; } ?>