本文整理汇总了PHP中Jetpack::build_stats_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Jetpack::build_stats_url方法的具体用法?PHP Jetpack::build_stats_url怎么用?PHP Jetpack::build_stats_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jetpack
的用法示例。
在下文中一共展示了Jetpack::build_stats_url方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jitm_enqueue_files
function jitm_enqueue_files($hook)
{
$wp_styles = new WP_Styles();
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_style('jetpack-jitm-css', plugins_url("css/jetpack-admin-jitm{$min}.css", JETPACK__PLUGIN_FILE), false, JETPACK__VERSION . '-201243242');
$wp_styles->add_data('jetpack-jitm-css', 'rtl', true);
//Build stats url for tracking manage button
$jitm_stats_url = Jetpack::build_stats_url(array('x_jetpack-jitm' => 'wordpresstools'));
// Enqueue javascript to handle jitm notice events
wp_enqueue_script('jetpack-jitm-js', plugins_url('_inc/jetpack-jitm.js', JETPACK__PLUGIN_FILE), array('jquery'), JETPACK__VERSION, true);
wp_localize_script('jetpack-jitm-js', 'jitmL10n', array('ajaxurl' => admin_url('admin-ajax.php'), 'jitm_nonce' => wp_create_nonce('jetpack-jitm-nonce'), 'photon_msgs' => array('success' => __('Success! Photon is now actively optimizing and serving your images for free.', 'jetpack'), 'fail' => __('We are sorry but unfortunately Photon did not activate.', 'jetpack')), 'manage_msgs' => array('success' => __('Success! WordPress.com tools are now active.', 'jetpack'), 'fail' => __('We are sorry but unfortunately Manage did not activate.', 'jetpack')), 'jitm_stats_url' => $jitm_stats_url));
}
示例2: build_jumpstart_stats_urls
function build_jumpstart_stats_urls($jumpstart_stats)
{
$jumpstart_urls = array();
foreach ($jumpstart_stats as $value) {
$jumpstart_urls[$value] = Jetpack::build_stats_url(array('x_jetpack-jumpstart' => $value));
}
return $jumpstart_urls;
}
示例3: build_nux_admin_stats_urls
function build_nux_admin_stats_urls($nux_admin_stats)
{
$nux_admin_urls = array();
foreach ($nux_admin_stats as $value) {
$nux_admin_urls[$value] = Jetpack::build_stats_url(array('x_jetpack-nux' => $value));
}
return $nux_admin_urls;
}
示例4: build_my_jetpack_stats_urls
function build_my_jetpack_stats_urls($my_jetpack_stats)
{
$my_jetpack_urls = array();
foreach ($my_jetpack_stats as $value) {
$my_jetpack_urls[$value] = Jetpack::build_stats_url(array('x_jetpack-admin' => $value));
}
return $my_jetpack_urls;
}