Mlp_Translatable_Post_Data_Interface::get_post_parent PHP Метод

get_post_parent() публичный Метод

public get_post_parent ( $blog_id ) : integer
$blog_id
Результат integer
    public function get_post_parent($blog_id);

Usage Example

 /**
  * Create the default post data for the save() method.
  *
  * @param  array  $post_data Post data.
  * @param  string $post_type Post type.
  * @param  int    $blog_id   Blog ID.
  *
  * @return array
  */
 private function create_post_to_send(array $post_data, $post_type, $blog_id)
 {
     $title = $this->get_remote_post_title($post_data);
     $content = $this->get_remote_post_content($post_data);
     if ($this->is_empty_remote_post($title, $content, $post_type)) {
         return array();
     }
     $new = array('post_type' => $post_type, 'post_title' => $title, 'post_content' => $content, 'post_parent' => $this->basic_data->get_post_parent($blog_id));
     if (!empty($post_data['remote_post_id'])) {
         $new['ID'] = $post_data['remote_post_id'];
         /**
          * Filter post data before it is saved to database.
          *
          * @param array $new_post
          * @param array $save_context
          */
         $new = apply_filters('mlp_pre_save_post', $new, $this->save_context);
         return $new;
     }
     // new post
     $new['post_status'] = 'draft';
     /**
      * Filter post data before it is insert to database.
      *
      * @param array $new_post
      * @param array $save_context
      */
     $new = apply_filters('mlp_pre_insert_post', $new, $this->save_context);
     return $new;
 }
All Usage Examples Of Mlp_Translatable_Post_Data_Interface::get_post_parent