本文整理汇总了PHP中Jetpack::module_configuration_head方法的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack::module_configuration_head方法的具体用法?PHP Jetpack::module_configuration_head怎么用?PHP Jetpack::module_configuration_head使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jetpack
的用法示例。
在下文中一共展示了Jetpack::module_configuration_head方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'));
}
示例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');
}
示例3: 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');
}
}
}
示例4: 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');
}
示例5: 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'));
}