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

Return the images array
public get_images ( ) : array
Результат array
Пример #1
0
 /**
  * Create new WPSEO_OpenGraph_Image class and get the images to set the og:image
  *
  * @param mixed $image
  */
 public function image($image = false)
 {
     $opengraph_images = new WPSEO_OpenGraph_Image($this->options, $image);
     foreach ($opengraph_images->get_images() as $img) {
         $this->og_tag('og:image', esc_url($img));
     }
 }
Пример #2
0
 /**
  * Create new WPSEO_OpenGraph_Image class and get the images to set the og:image
  *
  * @param string|boolean $image Optional image URL.
  */
 public function image($image = false)
 {
     $opengraph_images = new WPSEO_OpenGraph_Image($this->options, $image);
     foreach ($opengraph_images->get_images() as $img) {
         $this->og_tag('og:image', esc_url($img));
     }
     $dimensions = $opengraph_images->get_dimensions();
     if (!empty($dimensions['width'])) {
         $this->og_tag('og:image:width', absint($dimensions['width']));
     }
     if (!empty($dimensions['height'])) {
         $this->og_tag('og:image:height', absint($dimensions['height']));
     }
 }