From f211efeee9d59e27b607d910cefd13a530ea89f8 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Sat, 18 May 2019 15:42:08 -0400 Subject: [PATCH] phpcs, finish changing to types --- .../class-displayfeaturedimagegenesis.php | 2 ++ ...ass-displayfeaturedimagegenesis-helper.php | 28 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis.php b/includes/class-displayfeaturedimagegenesis.php index 041d214..4f77350 100644 --- a/includes/class-displayfeaturedimagegenesis.php +++ b/includes/class-displayfeaturedimagegenesis.php @@ -83,9 +83,11 @@ class Display_Featured_Image_Genesis { * @param $author * @param $customizer * @param $output + * @param $post_meta * @param $rss * @param $settings * @param $taxonomies + * @param $widgets */ public function __construct( $admin, $author, $customizer, $output, $post_meta, $rss, $settings, $taxonomies, $widgets ) { $this->admin = $admin; diff --git a/includes/settings/class-displayfeaturedimagegenesis-helper.php b/includes/settings/class-displayfeaturedimagegenesis-helper.php index d797f07..2f4d28e 100644 --- a/includes/settings/class-displayfeaturedimagegenesis-helper.php +++ b/includes/settings/class-displayfeaturedimagegenesis-helper.php @@ -121,7 +121,8 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG * @param $args */ public function do_number( $args ) { - printf( '%6$s', + printf( + '%6$s', (int) $args['min'], (int) $args['max'], esc_attr( $this->get_field_id( $args ) ), @@ -129,8 +130,6 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG esc_attr( $this->get_field_name( $args ) ), esc_attr( $args['label'] ) ); - $this->do_description( $args ); - } /** @@ -144,13 +143,13 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG $name = $this->get_field_name( $args ); $value = $this->get_field_value( $args ); printf( '', esc_attr( $name ) ); - printf( '', + printf( + '', esc_attr( $this->get_field_id( $args ) ), checked( 1, esc_attr( $value ), false ), esc_attr( $args['label'] ), esc_attr( $name ) ); - $this->do_description( $args ); } /** @@ -165,11 +164,13 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG $value = $this->get_field_value( $args ); foreach ( $args['options'] as $choice => $label ) { $check = isset( $value[ $choice ] ) ? $value[ $choice ] : 0; - printf( '', + printf( + '', esc_attr( $name ), esc_attr( $choice ) ); - printf( '', + printf( + '', esc_attr( $choice ), checked( 1, $check, false ), esc_html( $label ), @@ -178,7 +179,6 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG ); } echo ''; - $this->do_description( $args ); } /** @@ -187,14 +187,15 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG * * @param $args */ - public function do_radio_buttons( $args ) { + public function do_radio( $args ) { echo '
'; $name = $this->get_field_name( $args ); $id = $this->get_field_id( $args ); $value = $this->get_field_value( $args ); printf( '%s', esc_html( $args['legend'] ) ); foreach ( $args['choices'] as $choice => $label ) { - printf( ' ', + printf( + ' ', esc_attr( $id ), esc_attr( $choice ), checked( $choice, $value, false ), @@ -212,19 +213,20 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG */ public function do_select( $args ) { $value = $this->get_field_value( $args ); - printf( '', esc_attr( $this->get_field_id( $args ) ), esc_attr( $this->get_field_name( $args ) ) ); foreach ( (array) $args['choices'] as $option => $label ) { - printf( '', + printf( + '', esc_attr( $option ), selected( $option, $value, false ), esc_attr( $label ) ); } echo ''; - $this->do_description( $args ); } /**