コード例 #1
0
 public function get_parent_title(Post $post, $content = '')
 {
     $content = $post->get_title() . ' | ' . $content;
     if ($post->get_parent() !== null) {
         $content = $this->get_parent_title($post->get_parent(), $content);
     }
     return $content;
 }
コード例 #2
0
 /**
  * Post has just been imported.
  *
  * @param Post  $post
  * @param Batch $batch
  */
 public function post_imported(Post $post, Batch $batch)
 {
     $message = sprintf('Post <strong>%s</strong> has been successfully imported.', $post->get_title());
     $this->api->add_deploy_message($batch->get_id(), $message, 'success', 103);
 }