mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-20 15:03:29 +09:00
Add image validation class
Used on settings validation for multiple images; term/author for single.
This commit is contained in:
@@ -243,11 +243,8 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
|
||||
* @since 3.1.0
|
||||
*/
|
||||
protected function do_image( $args ) {
|
||||
if ( ! isset( $this->images ) ) {
|
||||
include_once 'class-displayfeaturedimagegenesis-settings-images.php';
|
||||
$this->images = new DisplayFeaturedImageGenesisSettingsImages( $this->setting );
|
||||
}
|
||||
$this->images->do_image( $args );
|
||||
$images = $this->get_images_class();
|
||||
$images->do_image( $args );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,6 +338,22 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the images settings class.
|
||||
* @return \DisplayFeaturedImageGenesisSettingsImages
|
||||
* @since 3.1.0
|
||||
*/
|
||||
protected function get_images_class() {
|
||||
if ( isset( $this->images ) ) {
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
include_once 'class-displayfeaturedimagegenesis-settings-images.php';
|
||||
$this->images = new DisplayFeaturedImageGenesisSettingsImages( $this->setting );
|
||||
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the user has permission to save the information from the submenu
|
||||
* page.
|
||||
|
||||
Reference in New Issue
Block a user