From 96531693e21a7c9cd50e9170d983769b1264f7d3 Mon Sep 17 00:00:00 2001 From: Atarime Date: Thu, 21 Nov 2024 17:13:13 +0900 Subject: [PATCH] Remove unnecessary function args --- admin/class-admin.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/admin/class-admin.php b/admin/class-admin.php index 3f4f85e..9c14b71 100644 --- a/admin/class-admin.php +++ b/admin/class-admin.php @@ -38,11 +38,10 @@ public function __construct() { /** * Set property * - * @param array $properties . - * @param WPCF7_ContactForm $contact_form . + * @param array $properties . * @return array */ - public function add_fmpress_property( $properties, $contact_form ) { + public function add_fmpress_property( $properties ) { $properties = wp_parse_args( $properties, array( @@ -240,7 +239,7 @@ private function script_settings_section( $cf7_settings ) { */ private function assign_fields_section( $contact_form ) { echo '
', - '

', esc_html__( 'Assign fields', 'fmpress-forms' ), '

','', + '

', esc_html__( 'Assign fields', 'fmpress-forms' ), '

', '
', '

', esc_html__( 'To specify fields, you must add fm_field- as a prefix to the beginning of the form-tag name in the Form tab panel. (e.g. fm_field-company_name)', 'fmpress-forms' ), '

'; // Generate fields for field assignment. @@ -406,11 +405,10 @@ private function is_fm_field( $tag ) { * Remove prefix and return field name * * @param WPCF7_FormTag|array $tag CF7 tag. - * @param bool $array true if the arg is an array. * @return string|null */ - private function get_fm_field( $tag, $array = false ) { - $name = $array ? $tag['name'] : $tag->name; + private function get_fm_field( $tag ) { + $name = is_array( $tag ) ? $tag['name'] : $tag->name; return isset( $name ) ? mb_substr( $name, mb_strlen( self::FM_FIELD_PREFIX ) ) : null; } }