Esempio n. 1
0
 private function import_seo_data_pspExtra($post_id = 0, $meta = array())
 {
     if ($post_id <= 0) {
         return false;
     }
     if (empty($meta)) {
         return false;
     }
     $post_metas = get_post_meta($post_id, 'psp_meta', true);
     $post_metas = array_merge(array('title' => '', 'description' => '', 'keywords' => '', 'focus_keyword' => '', 'facebook_isactive' => '', 'facebook_titlu' => '', 'facebook_desc' => '', 'facebook_image' => '', 'facebook_opengraph_type' => '', 'robots_index' => '', 'robots_follow' => '', 'priority' => '', 'canonical' => ''), $post_metas);
     // include on page optimization module!
     require_once $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'modules/on_page_optimization/init.php';
     $pspOnPageOptimization = new pspOnPageOptimization();
     $_REQUEST = array('psp-field-title' => $post_metas['title'], 'psp-field-metadesc' => $post_metas['description'], 'psp-field-metakewords' => $post_metas['keywords'], 'psp-field-focuskw' => $post_metas['focus_keyword'], 'psp-field-facebook-isactive' => $post_metas['facebook_isactive'], 'psp-field-facebook-titlu' => $post_metas['facebook_titlu'], 'psp-field-facebook-desc' => $post_metas['facebook_desc'], 'psp-field-facebook-image' => $post_metas['facebook_image'], 'psp-field-facebook-opengraph-type' => $post_metas['facebook_opengraph_type'], 'psp-field-meta_robots_index' => $post_metas['robots_index'], 'psp-field-meta_robots_follow' => $post_metas['robots_follow'], 'psp-field-priority-sitemap' => $post_metas['priority'], 'psp-field-canonical' => $post_metas['canonical']);
     $pspOnPageOptimization->optimize_page($post_id);
     return true;
 }