コード例 #1
0
 /**
  * page_slurp function.
  *
  * @access public
  * @return void
  */
 public function page_slurp()
 {
     $this->init_mijireh();
     $page = get_page(absint($_POST['page_id']));
     $url = get_permalink($page->ID);
     wp_update_post(array('ID' => $page->ID, 'post_status' => 'publish'));
     $job_id = Mijireh::slurp($url);
     wp_update_post(array('ID' => $page->ID, 'post_status' => 'private'));
     echo $job_id;
     die;
 }
コード例 #2
0
 /**
  * page_slurp function.
  *
  * @access public
  */
 public static function page_slurp()
 {
     self::init_mijireh();
     $page = get_page(absint($_POST['page_id']));
     $url = get_permalink($page->ID);
     $job_id = $url;
     if (wp_update_post(array('ID' => $page->ID, 'post_status' => 'publish'))) {
         $job_id = Mijireh::slurp($url, $page->ID, str_replace('https:', 'http:', add_query_arg('wc-api', 'WC_Gateway_Mijireh', home_url('/'))));
     }
     echo $job_id;
     die;
 }