wpfc_remote_get($_GET["url"], $_GET["user_agent"]); if($res){ die("true"); } } public static function is_mobile_active(){ if(isset($GLOBALS["wp_fastest_cache_options"]->wpFastestCacheMobile) && isset($GLOBALS["wp_fastest_cache_options"]->wpFastestCacheMobileTheme)){ return true; }else{ return false; } } public static function set_term_urls($term_taxonomy_id){ $term = get_term_by("term_taxonomy_id", $term_taxonomy_id); if($term && !is_wp_error($term)){ $url = get_term_link($term->term_id, $term->taxonomy); array_push(static::$urls, array("url" => $url, "user-agent" => "WP Fastest Cache Preload Bot")); if(self::is_mobile_active()){ array_push(static::$urls, array("url" => $url, "user-agent" => "WP Fastest Cache Preload iPhone Mobile Bot")); } if($term->parent > 0){ $parent = get_term_by("id", $term->parent, $term->taxonomy); static::set_term_urls($parent->term_taxonomy_id); } } } public static function set_urls_with_terms(){ global $wpdb; $terms = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."term_relationships` WHERE `object_id`=".static::$id, ARRAY_A); foreach ($terms as $term_key => $term_val){ static::set_term_urls($term_val["term_taxonomy_id"]); } } public static function set_urls(){ if(static::$id){ $permalink = get_permalink(static::$id); array_push(static::$urls, array("url" => $permalink, "user-agent" => "WP Fastest Cache Preload Bot")); if(self::is_mobile_active()){ array_push(static::$urls, array("url" => $permalink, "user-agent" => "WP Fastest Cache Preload iPhone Mobile Bot")); } } } public static function put_inline_js(){ $screen = get_current_screen(); if($screen->parent_base == "edit" && $screen->base == "post"){ ?>