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


PHP Jetpack::module_configuration_screen方法代码示例

本文整理汇总了PHP中Jetpack::module_configuration_screen方法的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack::module_configuration_screen方法的具体用法?PHP Jetpack::module_configuration_screen怎么用?PHP Jetpack::module_configuration_screen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jetpack的用法示例。


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

示例1: module_configure_button

 /**
  * Add configure button and functionality to the module card on the Jetpack screen
  **/
 public static function module_configure_button()
 {
     Jetpack::enable_module_configurable(__FILE__);
     Jetpack::module_configuration_load(__FILE__, array(__CLASS__, 'module_configuration_load'));
     Jetpack::module_configuration_head(__FILE__, array(__CLASS__, 'module_configuration_head'));
     Jetpack::module_configuration_screen(__FILE__, array(__CLASS__, 'module_configuration_screen'));
 }
开发者ID:laurelfulford,项目名称:jetpack,代码行数:10,代码来源:sso.php

示例2: stats_load

function stats_load()
{
    global $wp_roles;
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'stats_configuration_load');
    Jetpack::module_configuration_head(__FILE__, 'stats_configuration_head');
    Jetpack::module_configuration_screen(__FILE__, 'stats_configuration_screen');
    // Tell HQ about changed posts
    $post_stati = get_post_stati(array('public' => true));
    // All public post stati
    $post_stati[] = 'private';
    // Content from private stati will be redacted
    Jetpack_Sync::sync_posts(__FILE__, array('post_types' => get_post_types(array('public' => true)), 'post_stati' => $post_stati));
    // Generate the tracking code after wp() has queried for posts.
    add_action('template_redirect', 'stats_template_redirect', 1);
    add_action('wp_head', 'stats_admin_bar_head', 100);
    add_action('wp_head', 'stats_hide_smile_css');
    add_action('jetpack_admin_menu', 'stats_admin_menu');
    // Map stats caps
    add_filter('map_meta_cap', 'stats_map_meta_caps', 10, 4);
    if (isset($_GET['oldwidget'])) {
        // Old one.
        add_action('wp_dashboard_setup', 'stats_register_dashboard_widget');
    } else {
        add_action('admin_init', 'stats_merged_widget_admin_init');
    }
    add_filter('jetpack_xmlrpc_methods', 'stats_xmlrpc_methods');
    add_filter('pre_option_db_version', 'stats_ignore_db_version');
}
开发者ID:jordankoschei,项目名称:jordankoschei-dot-com,代码行数:29,代码来源:stats.php

示例3: jetpack_modules_loaded

 /**
  * After all modules have been loaded.
  */
 function jetpack_modules_loaded()
 {
     $options = $this->get_options();
     // Only the connection owner can configure this module.
     if ($this->is_connection_owner()) {
         Jetpack::enable_module_configurable($this->module);
         Jetpack::module_configuration_load($this->module, array($this, 'jetpack_configuration_load'));
         Jetpack::module_configuration_screen($this->module, array($this, 'jetpack_configuration_screen'));
     }
     // Only if the current user can manage the VideoPress library and one has been connected.
     if ($this->can('read_videos') && $options['blog_id']) {
         add_action('wp_enqueue_media', array($this, 'enqueue_admin_scripts'));
         add_action('print_media_templates', array($this, 'print_media_templates'));
         // Load these at priority -1 so they're fired before Core's are.
         add_action('wp_ajax_query-attachments', array($this, 'wp_ajax_query_attachments'), -1);
         add_action('wp_ajax_save-attachment', array($this, 'wp_ajax_save_attachment'), -1);
         add_action('wp_ajax_save-attachment-compat', array($this, 'wp_ajax_save_attachment'), -1);
         add_action('wp_ajax_delete-post', array($this, 'wp_ajax_delete_post'), -1);
         add_action('admin_menu', array($this, 'admin_menu'));
     }
     if ($this->can('upload_videos') && $options['blog_id']) {
         add_action('wp_ajax_videopress-get-upload-token', array($this, 'wp_ajax_videopress_get_upload_token'));
     }
     add_filter('videopress_shortcode_options', array($this, 'videopress_shortcode_options'));
 }
开发者ID:shazadmaved,项目名称:vizblog,代码行数:28,代码来源:videopress.php

示例4: stats_load

function stats_load()
{
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'stats_configuration_load');
    Jetpack::module_configuration_head(__FILE__, 'stats_configuration_head');
    Jetpack::module_configuration_screen(__FILE__, 'stats_configuration_screen');
    // Generate the tracking code after wp() has queried for posts.
    add_action('template_redirect', 'stats_template_redirect', 1);
    add_action('wp_head', 'stats_admin_bar_head', 100);
    add_action('jetpack_admin_menu', 'stats_admin_menu');
    add_action('wp_dashboard_setup', 'stats_register_dashboard_widget');
    // Tell HQ about changed settings
    add_action('update_option_home', 'stats_update_blog');
    add_action('update_option_siteurl', 'stats_update_blog');
    add_action('update_option_blogname', 'stats_update_blog');
    add_action('update_option_blogdescription', 'stats_update_blog');
    add_action('update_option_timezone_string', 'stats_update_blog');
    add_action('add_option_timezone_string', 'stats_update_blog');
    add_action('update_option_gmt_offset', 'stats_update_blog');
    add_action('update_option_page_on_front', 'stats_update_blog');
    add_action('update_option_permalink_structure', 'stats_update_blog');
    add_action('update_option_category_base', 'stats_update_blog');
    add_action('update_option_tag_base', 'stats_update_blog');
    // Tell HQ about changed posts
    add_action('save_post', 'stats_update_post', 10, 1);
    add_filter('jetpack_xmlrpc_methods', 'stats_xmlrpc_methods');
    foreach (stats_get_option('roles') as $role) {
        $role = get_role($role);
        if ($role) {
            $role->add_cap('view_stats');
        }
    }
}
开发者ID:sajidsan,项目名称:sajidsan.github.io,代码行数:33,代码来源:stats.php

示例5: stats_load

function stats_load()
{
    global $wp_roles;
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'stats_configuration_load');
    Jetpack::module_configuration_head(__FILE__, 'stats_configuration_head');
    Jetpack::module_configuration_screen(__FILE__, 'stats_configuration_screen');
    // Generate the tracking code after wp() has queried for posts.
    add_action('template_redirect', 'stats_template_redirect', 1);
    add_action('wp_head', 'stats_admin_bar_head', 100);
    add_action('wp_head', 'stats_hide_smile_css');
    add_action('jetpack_admin_menu', 'stats_admin_menu');
    // Map stats caps
    add_filter('map_meta_cap', 'stats_map_meta_caps', 10, 4);
    if (isset($_GET['oldwidget'])) {
        // Old one.
        add_action('wp_dashboard_setup', 'stats_register_dashboard_widget');
    } else {
        add_action('admin_init', 'stats_merged_widget_admin_init');
    }
    add_filter('jetpack_xmlrpc_methods', 'stats_xmlrpc_methods');
    add_filter('pre_option_db_version', 'stats_ignore_db_version');
}
开发者ID:iamtakashi,项目名称:jetpack,代码行数:23,代码来源:stats.php

示例6: modules_loaded

 /**
  * Set up the Protect configuration page
  */
 public function modules_loaded()
 {
     Jetpack::enable_module_configurable(__FILE__);
     Jetpack::module_configuration_load(__FILE__, array($this, 'configuration_load'));
     Jetpack::module_configuration_head(__FILE__, array($this, 'configuration_head'));
     Jetpack::module_configuration_screen(__FILE__, array($this, 'configuration_screen'));
 }
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:10,代码来源:protect.php

示例7: jetpack_modules_loaded

 public function jetpack_modules_loaded()
 {
     Jetpack::enable_module_configurable($this->module);
     Jetpack::module_configuration_load($this->module, array($this, 'jetpack_configuration_load'));
     Jetpack::module_configuration_screen($this->module, array($this, 'jetpack_configuration_screen'));
 }
开发者ID:kanei,项目名称:vantuch.cz,代码行数:6,代码来源:monitor.php

示例8: minileven_loaded

function minileven_loaded()
{
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'minileven_configuration_load');
    Jetpack::module_configuration_screen(__FILE__, 'minileven_configuration_screen');
}
开发者ID:briancompton,项目名称:knightsplaza,代码行数:6,代码来源:minileven.php

示例9: jetpack_json_api_load_module

function jetpack_json_api_load_module()
{
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'jetpack_json_api_configuration_load');
    Jetpack::module_configuration_screen(__FILE__, 'jetpack_json_api_configuration_screen');
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:6,代码来源:json-api.php

示例10: add_action

 * Recommendation Order: 3
 * First Introduced: 3.4
 * Requires Connection: Yes
 * Auto Activate: Yes
 * Module Tags: Centralized Management, Recommended
 * Feature: General
 * Additional Search Queries: manage, management, remote
 */
add_action('customize_register', 'add_wpcom_to_allowed_redirect_hosts');
// Add wordpress.com to the safe redirect whitelist if the Manage module is enabled
// so the customizer can `return` to wordpress.com if invoked from there.
function add_wpcom_to_allowed_redirect_hosts($domains)
{
    if (Jetpack::is_module_active('manage')) {
        add_filter('allowed_redirect_hosts', 'allow_wpcom_domain');
    }
}
// Return $domains, with 'wordpress.com' appended.
function allow_wpcom_domain($domains)
{
    if (empty($domains)) {
        $domains = array();
    }
    $domains[] = 'wordpress.com';
    return array_unique($domains);
}
Jetpack::module_configuration_screen('manage', 'jetpack_manage_config_screen');
function jetpack_manage_config_screen()
{
    include JETPACK__PLUGIN_DIR . 'modules/manage/confirm-admin.php';
}
开发者ID:automattic,项目名称:jetpack,代码行数:31,代码来源:manage.php


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