当前位置: 首页>>代码示例>>PHP>>正文


PHP bstw函数代码示例

本文整理汇总了PHP中bstw函数的典型用法代码示例。如果您正苦于以下问题:PHP bstw函数的具体用法?PHP bstw怎么用?PHP bstw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bstw函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: siteorigin_panels_black_studio_tinymce_admin_init

/**
 * Add all the required actions for the TinyMCE widget.
 */
function siteorigin_panels_black_studio_tinymce_admin_init()
{
    global $pagenow;
    if (in_array($pagenow, array('post-new.php', 'post.php')) || $pagenow == 'themes.php' && isset($_GET['page']) && $_GET['page'] == 'so_panels_home_page') {
        if (function_exists('bstw')) {
            add_filter('tiny_mce_before_init', array(bstw(), 'tiny_mce_before_init'), 20);
            add_action('admin_head', array(bstw(), 'enqueue_media'));
            add_action('admin_print_scripts', array(bstw(), 'admin_print_scripts'));
            add_action('admin_print_styles', array(bstw(), 'admin_print_styles'));
            add_action('admin_print_footer_scripts', array(bstw(), 'admin_print_footer_scripts'));
        } else {
            add_filter('tiny_mce_before_init', 'black_studio_tinymce_init_editor', 20);
            add_action('admin_head', 'black_studio_tinymce_load_tiny_mce');
            add_action('admin_print_scripts', 'black_studio_tinymce_scripts');
            add_action('admin_print_styles', 'black_studio_tinymce_styles');
            add_action('admin_print_footer_scripts', 'black_studio_tinymce_footer_scripts');
        }
    }
}
开发者ID:alextkd,项目名称:fdsmc,代码行数:22,代码来源:black-studio-tinymce.php

示例2: bstw

    // END class Black_Studio_TinyMCE_Plugin
}
// END class_exists check
if (!function_exists('bstw')) {
    /**
     * Return the main instance to prevent the need to use globals
     *
     * @return object
     * @since 2.0.0
     */
    function bstw()
    {
        return Black_Studio_TinyMCE_Plugin::instance();
    }
    /* Create the main instance */
    bstw();
} else {
    /* Check for multiple plugin instances */
    if (!function_exists('bstw_multiple_notice')) {
        /**
         * Show admin notice when multiple instances of the plugin are detected
         *
         * @return void
         * @since 2.1.0
         */
        function bstw_multiple_notice()
        {
            global $pagenow;
            if ('widgets.php' == $pagenow) {
                echo '<div class="error">';
                /* translators: error message shown when multiple instance of the plugin are detected */
开发者ID:ramagomamd,项目名称:omphulusa,代码行数:31,代码来源:black-studio-tinymce-widget.php

示例3: siteorigin_panels_admin_init

 /**
  * Initialize compatibility for Page Builder (SiteOrigin Panels)
  *
  * @uses add_filter()
  * @uses add_action()
  * @uses remove_filter()
  * @uses add_action()
  * @uses is_plugin_active()
  *
  * @return void
  * @since 2.0.0
  */
 public function siteorigin_panels_admin_init()
 {
     if (is_admin() && is_plugin_active('siteorigin-panels/siteorigin-panels.php')) {
         add_filter('siteorigin_panels_widget_object', array($this, 'siteorigin_panels_widget_object'), 10);
         add_filter('black_studio_tinymce_container_selectors', array($this, 'siteorigin_panels_container_selectors'));
         add_filter('black_studio_tinymce_activate_events', array($this, 'siteorigin_panels_activate_events'));
         add_filter('black_studio_tinymce_deactivate_events', array($this, 'siteorigin_panels_deactivate_events'));
         add_filter('black_studio_tinymce_enable_pages', array($this, 'siteorigin_panels_enable_pages'));
         remove_filter('widget_text', array(bstw()->text_filters(), 'wpautop'), 8);
     }
 }
开发者ID:MiquelAdell,项目名称:miqueladell,代码行数:23,代码来源:class-compatibility-plugins.php

示例4: black_studio_tinymce_siteorigin_panels_widget_object

/**
 * @since 1.4.5
 * @deprecated 2.0.0
 */
function black_studio_tinymce_siteorigin_panels_widget_object($the_widget)
{
    _deprecated_function(__FUNCTION__, '2.0.0', 'bstw()-compatibility()->plugins()->siteorigin_panels_widget_object( ... )');
    bstw()->compatibility()->plugins()->siteorigin_panels_widget_object($the_widget);
}
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:9,代码来源:deprecated.php

示例5: wp_pre_39

 /**
  * Compatibility for WordPress prior to 3.9
  *
  * @uses add_action()
  * @uses remove_action()
  * @uses add_filter()
  * @uses get_bloginfo()
  * @uses Black_Studio_TinyMCE_Admin::enabled()
  *
  * @return void
  * @since 2.0.0
  */
 public function wp_pre_39()
 {
     $wp_version = get_bloginfo('version');
     if (bstw()->admin()->enabled()) {
         add_filter('black-studio-tinymce-widget-script', array($this, 'wp_pre_39_handle'), 61);
         add_filter('tiny_mce_before_init', array($this, 'wp_pre_39_tiny_mce_before_init'), 61);
         add_action('admin_print_footer_scripts', array($this, 'wp_pre_39_admin_print_footer_scripts'));
         remove_action('admin_print_footer_scripts', array(bstw()->admin(), 'admin_print_footer_scripts'));
         if (!version_compare($wp_version, '3.2', '<')) {
             remove_action('admin_print_footer_scripts', array($this, 'wp_pre_32_admin_print_footer_scripts'));
         }
         if (!version_compare($wp_version, '3.3', '<')) {
             remove_action('admin_print_footer_scripts', array($this, 'wp_pre_33_admin_print_footer_scripts'));
         }
         add_action('black_studio_tinymce_editor', array($this, 'wp_pre_39_editor'), 10, 4);
         remove_action('black_studio_tinymce_editor', array(bstw()->admin(), 'editor'), 10, 3);
     }
 }
开发者ID:mrakotomizao,项目名称:azuretest,代码行数:30,代码来源:class-compatibility-wordpress.php

示例6: enqueue

 /**
  * Helper function to enqueue script
  *
  * @uses wp_enqueue_style()
  * @uses wp_enqueue_script()
  * @uses plugins_url()
  * @uses wp_localize_script()
  * @uses SCRIPT_DEBUG
  *
  * @param mixed[] $pointers
  * @return void
  * @since 2.1.0
  */
 public function enqueue($pointers)
 {
     $script = 'black-studio-tinymce-widget-pointer';
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     wp_enqueue_style('wp-pointer');
     wp_enqueue_script($script, plugins_url('js/' . $script . $suffix . '.js', dirname(__FILE__)), array('wp-pointer'), bstw()->get_version(), true);
     wp_localize_script('black-studio-tinymce-widget-pointer', 'bstw_pointers', $pointers);
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:21,代码来源:class-admin-pointer.php

示例7: plugin_row_meta

 /**
  * Show row meta on the plugin screen
  *
  * @uses esc_html()
  * @uses esc_url()
  *
  * @param string[] $links
  * @param string $file
  * @return string[]
  * @since 2.0.0
  */
 public function plugin_row_meta($links, $file)
 {
     if ($file == bstw()->get_basename()) {
         foreach ($this->links as $url => $label) {
             $links[$label] = '<a href="' . esc_url($url) . '" target="_blank">' . esc_html($label) . '</a>';
         }
     }
     return $links;
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:20,代码来源:class-admin.php

示例8: siteorigin_panels_admin_init

 /**
  * Initialize compatibility for Page Builder ( SiteOrigin Panels )
  *
  * @uses add_filter()
  * @uses add_action()
  * @uses remove_filter()
  * @uses add_action()
  * @uses is_plugin_active()
  *
  * @return void
  * @since 2.0.0
  */
 public function siteorigin_panels_admin_init()
 {
     //			if ( is_admin() &&
     //				( is_plugin_active( 'siteorigin-panels/siteorigin-panels.php' ) ||
     //					is_plugin_active( 'page-builder-for-canvas-master/page-builder-for-canvas.php' ) )
     // This VE2 is bundled in Page Builder, so don't need to check for Page Builder
     if (is_admin()) {
         add_filter('siteorigin_panels_widget_object', array($this, 'siteorigin_panels_widget_object'), 10);
         add_filter('black_studio_tinymce_container_selectors', array($this, 'siteorigin_panels_container_selectors'));
         add_filter('black_studio_tinymce_activate_events', array($this, 'siteorigin_panels_activate_events'));
         add_filter('black_studio_tinymce_deactivate_events', array($this, 'siteorigin_panels_deactivate_events'));
         add_filter('black_studio_tinymce_enable_pages', array($this, 'siteorigin_panels_enable_pages'));
         remove_filter('widget_text', array(bstw()->text_filters(), 'wpautop'), 8);
     }
 }
开发者ID:shramee,项目名称:test-ppb,代码行数:27,代码来源:class-compatibility-plugins.php

示例9: do_shortcode

 /**
  * Process shortcodes in widget text
  *
  * @uses do_shortcode()
  * 
  * @param string $text
  * @return string
  * @since 2.0.0
  */
 public function do_shortcode($text, $instance = null, $widget = null)
 {
     if (bstw()->check_widget($widget) && !empty($instance)) {
         $text = do_shortcode($text);
     }
     return $text;
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:16,代码来源:class-text-filters.php

示例10: kt_remove_bstw_do_shortcode

function kt_remove_bstw_do_shortcode()
{
    if (function_exists('bstw')) {
        remove_filter('widget_text', array(bstw()->text_filters(), 'do_shortcode'), 10);
    }
}
开发者ID:Kang8M,项目名称:gaonhat,代码行数:6,代码来源:shortcodes.php


注:本文中的bstw函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。