transform() private method

private transform ( )
コード例 #1
0
ファイル: class-amp-post.php プロジェクト: twclark0/amp-wp
 private function build_content()
 {
     $amp = new AMP_Content($this->post->post_content);
     $content = $amp->transform();
     $this->scripts = $amp->get_scripts();
     return $content;
 }
コード例 #2
0
ファイル: class-amp-post.php プロジェクト: joedooley/amp-wp
 function __construct($post_id)
 {
     $this->ID = $post_id;
     $this->post = get_post($post_id);
     $this->author = apply_filters('amp_post_author', get_userdata($this->post->post_author));
     $this->content_max_width = apply_filters('amp_content_max_width', isset($GLOBALS['content_width']) ? absint($GLOBALS['content_width']) : 600);
     $amp_content = new AMP_Content($this->post->post_content, array('content_max_width' => $this->content_max_width));
     $this->content = apply_filters('amp_post_content', $amp_content->transform(), $this->post);
     $this->scripts = apply_filters('amp_post_scripts', $amp_content->get_scripts(), $this->post);
     $this->metadata = apply_filters('amp_post_metadata', $this->build_metadata(), $this->post);
 }
コード例 #3
0
ファイル: class-amp-post.php プロジェクト: kantan2015/amp-wp
 function __construct($post_id)
 {
     $this->ID = $post_id;
     $this->post = get_post($post_id);
     $this->author = apply_filters('amp_post_author', get_userdata($this->post->post_author), $this->post);
     $content_width = isset($GLOBALS['content_width']) ? absint($GLOBALS['content_width']) : 600;
     $this->content_max_width = apply_filters('amp_content_max_width', $content_width, $this->post);
     $amp_content = new AMP_Content($this->post->post_content, apply_filters('amp_content_embed_handlers', array('AMP_Twitter_Embed_Handler' => array(), 'AMP_YouTube_Embed_Handler' => array(), 'AMP_Gallery_Embed_Handler' => array(), 'AMP_Instagram_Embed_Handler' => array(), 'AMP_Vine_Embed_Handler' => array()), $this->post), apply_filters('amp_content_sanitizers', array('AMP_Blacklist_Sanitizer' => array(), 'AMP_Img_Sanitizer' => array(), 'AMP_Video_Sanitizer' => array(), 'AMP_Audio_Sanitizer' => array(), 'AMP_Iframe_Sanitizer' => array('add_placeholder' => true)), $this->post), array('content_max_width' => $this->content_max_width));
     $this->content = apply_filters('amp_post_content', $amp_content->transform(), $this->post);
     $this->scripts = apply_filters('amp_post_scripts', $amp_content->get_scripts(), $this->post);
     $this->metadata = apply_filters('amp_post_metadata', $this->build_metadata(), $this->post);
 }
コード例 #4
0
ファイル: class-amp-post.php プロジェクト: hpandit/amp-wp
 private function build_content()
 {
     $content = new AMP_Content($this->post->post_content);
     return $content->transform();
 }