本文整理汇总了PHP中Tracker::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::init方法的具体用法?PHP Tracker::init怎么用?PHP Tracker::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _get_last_send_time
private static function _get_last_send_time()
{
return apply_filters('elementor/tracker/last_send_time', get_option('elementor_tracker_last_send', false));
}
private static function _get_posts_usage()
{
global $wpdb;
$usage = [];
$results = $wpdb->get_results("SELECT `post_type`, `post_status`, COUNT(`ID`) `hits` \n\t\t\t\tFROM {$wpdb->posts} `p`\n\t\t\t\tLEFT JOIN {$wpdb->postmeta} `pm` ON(`p`.`ID` = `pm`.`post_id`)\n\t\t\t\tWHERE `post_type` != 'elementor_library'\n\t\t\t\t\tAND `meta_key` = '_elementor_edit_mode' AND `meta_value` = 'builder'\n\t\t\t\tGROUP BY `post_type`, `post_status`;");
if ($results) {
foreach ($results as $result) {
$usage[$result->post_type][$result->post_status] = $result->hits;
}
}
return $usage;
}
private static function _get_library_usage()
{
global $wpdb;
$usage = [];
$results = $wpdb->get_results("SELECT `meta_value`, COUNT(`ID`) `hits` \n\t\t\t\tFROM {$wpdb->posts} `p`\n\t\t\t\tLEFT JOIN {$wpdb->postmeta} `pm` ON(`p`.`ID` = `pm`.`post_id`)\n\t\t\t\tWHERE `post_type` = 'elementor_library'\n\t\t\t\t\tAND `meta_key` = '_elementor_template_type'\n\t\t\t\tGROUP BY `post_type`, `meta_value`;");
if ($results) {
foreach ($results as $result) {
$usage[$result->meta_value] = $result->hits;
}
}
return $usage;
}
}
Tracker::init();