public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
public function crawl_post() { if (!isset($_GET['dln_crawl_post'])) { return; } include_once DLN_SKILL_PLUGIN_DIR . '/dln-cron/includes/posts/class-dln-post-helper.php'; $sources = DLN_Post_Helper::get_post_link(100); if (!empty($sources)) { foreach ($sources as $i => $source) { if (isset($source['link']) && !empty($source['link'])) { DLN_Post_Helper::fetch_image_post($source['post_id'], $source['link'], $source['comment_fbid']); } } } }