module_configuration_screen() public static method

public static module_configuration_screen ( $module, $method )
コード例 #1
0
ファイル: sso.php プロジェクト: laurelfulford/jetpack
 /**
  * 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'));
 }
コード例 #2
0
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');
}
コード例 #3
0
ファイル: videopress.php プロジェクト: shazadmaved/vizblog
 /**
  * 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'));
 }
コード例 #4
0
ファイル: stats.php プロジェクト: sajidsan/sajidsan.github.io
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');
        }
    }
}
コード例 #5
0
ファイル: stats.php プロジェクト: iamtakashi/jetpack
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');
}
コード例 #6
0
ファイル: protect.php プロジェクト: dtekcth/datateknologer.se
 /**
  * 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'));
 }
コード例 #7
0
ファイル: monitor.php プロジェクト: kanei/vantuch.cz
 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'));
 }
コード例 #8
0
function minileven_loaded()
{
    Jetpack::enable_module_configurable(__FILE__);
    Jetpack::module_configuration_load(__FILE__, 'minileven_configuration_load');
    Jetpack::module_configuration_screen(__FILE__, 'minileven_configuration_screen');
}
コード例 #9
0
ファイル: json-api.php プロジェクト: sdh100shaun/pantheon
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');
}
コード例 #10
0
ファイル: manage.php プロジェクト: automattic/jetpack
 * 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';
}