mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-19 06:23:22 +09:00
Move author image fields to form class
This commit is contained in:
@@ -29,7 +29,7 @@ class DisplayFeaturedImageGenesisWidgets {
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get_image_size() {
|
||||
protected function get_image_size() {
|
||||
$sizes = genesis_get_image_sizes();
|
||||
$options = array();
|
||||
foreach ( (array) $sizes as $name => $size ) {
|
||||
@@ -42,7 +42,7 @@ class DisplayFeaturedImageGenesisWidgets {
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get_image_alignment() {
|
||||
protected function get_image_alignment() {
|
||||
return array(
|
||||
'alignnone' => __( 'None', 'display-featured-image-genesis' ),
|
||||
'alignleft' => __( 'Left', 'display-featured-image-genesis' ),
|
||||
@@ -87,6 +87,41 @@ class DisplayFeaturedImageGenesisWidgets {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the image fields for the author widget.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_author_image_fields() {
|
||||
return array(
|
||||
array(
|
||||
'method' => 'checkbox',
|
||||
'args' => array(
|
||||
'id' => 'show_featured_image',
|
||||
'label' => __( 'Show the user\'s featured image.', 'display-featured-image-genesis' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'method' => 'select',
|
||||
'args' => array(
|
||||
'id' => 'featured_image_size',
|
||||
'label' => __( 'Image Size:', 'display-featured-image-genesis' ),
|
||||
'flex' => true,
|
||||
'choices' => $this->get_image_size(),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'method' => 'select',
|
||||
'args' => array(
|
||||
'id' => 'featured_image_alignment',
|
||||
'label' => __( 'Image Alignment:', 'display-featured-image-genesis' ),
|
||||
'flex' => true,
|
||||
'choices' => $this->get_image_alignment(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text fields (used in CPT and term).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user