mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-18 14:03:20 +09:00
Remove unneeded nickname
This commit is contained in:
@@ -26,9 +26,6 @@ class DisplayFeaturedImageGenesisWidgetsBlocksFields {
|
||||
);
|
||||
$blocks = include 'fields/blocks.php';
|
||||
foreach ( $blocks as $block => $data ) {
|
||||
if ( empty( $data['nickname'] ) ) {
|
||||
continue;
|
||||
}
|
||||
$common['panels'] = array(
|
||||
'main' => array(
|
||||
'title' => __( 'Block Settings', 'display-featured-image-genesis' ),
|
||||
|
||||
@@ -31,7 +31,7 @@ class DisplayFeaturedImageGenesisWidgetsBlocks {
|
||||
$output = new DisplayFeaturedImageGenesisWidgetsBlocksOutput();
|
||||
$fields = $this->get_fields_class();
|
||||
foreach ( $this->blocks() as $block => $data ) {
|
||||
if ( empty( $data['nickname'] ) || ! is_callable( array( $output, "render_{$data['nickname']}" ) ) ) {
|
||||
if ( ! is_callable( array( $output, "render_{$block}" ) ) ) {
|
||||
continue;
|
||||
}
|
||||
register_block_type(
|
||||
@@ -40,7 +40,7 @@ class DisplayFeaturedImageGenesisWidgetsBlocks {
|
||||
'editor_script' => "{$this->block}block",
|
||||
'editor_style' => "{$this->block}block",
|
||||
'attributes' => $fields->fields( $block ),
|
||||
'render_callback' => array( $output, "render_{$data['nickname']}" ),
|
||||
'render_callback' => array( $output, "render_{$block}" ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ return array(
|
||||
__( 'Term', 'display-featured-image-genesis' ),
|
||||
__( 'Featured Image', 'display-featured-image-genesis' ),
|
||||
),
|
||||
'nickname' => 'term',
|
||||
),
|
||||
'author' => array(
|
||||
'title' => __( 'Display Featured Author Profile', 'display-featured-image-genesis' ),
|
||||
@@ -17,7 +16,6 @@ return array(
|
||||
__( 'Author', 'display-featured-image-genesis' ),
|
||||
__( 'Featured Image', 'display-featured-image-genesis' ),
|
||||
),
|
||||
'nickname' => 'author',
|
||||
),
|
||||
'cpt' => array(
|
||||
'title' => __( 'Display Featured Post Type Archive Image', 'display-featured-image-genesis' ),
|
||||
@@ -26,6 +24,5 @@ return array(
|
||||
__( 'Post Type', 'display-featured-image-genesis' ),
|
||||
__( 'Featured Image', 'display-featured-image-genesis' ),
|
||||
),
|
||||
'nickname' => 'cpt',
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user