| @@ -59,10 +59,10 @@ | ||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $label = $this->get_label( $field_configuration['label'], $esc_field_name ); |
| 62 | 62 | $field = $this->get_field( $field_configuration['type'], $esc_field_name, $this->get_field_value( $field_name ), $options ); |
| 63 | - $help_content = isset( $field_configuration['options']['help'] ) ? $field_configuration['options']['help'] : ''; | |
| 64 | - $help_button_text = isset( $field_configuration['options']['help-button'] ) ? $field_configuration['options']['help-button'] : ''; | |
| 63 | + $help_content = ( $field_configuration['options']['help'] ?? '' ); | |
| 64 | + $help_button_text = ( $field_configuration['options']['help-button'] ?? '' ); | |
| 65 | 65 | $help = new WPSEO_Admin_Help_Panel( $field_name, $help_button_text, $help_content ); |
| 66 | 66 | |
| 67 | 67 | return $this->parse_row( $label, $help, $field ); |
| 68 | 68 | } |
| @@ -107,32 +107,8 @@ | ||
| 107 | 107 | if ( ! empty( $options['rows'] ) ) { |
| 108 | 108 | $rows = $options['rows']; |
| 109 | 109 | } |
| 110 | 110 | $field .= '<textarea class="large-text" rows="' . esc_attr( $rows ) . '" id="' . $field_name . '" name="' . $field_name . '"' . $aria_describedby . '>' . esc_textarea( $field_value ) . '</textarea>'; |
| 111 | - break; | |
| 112 | - case 'upload': | |
| 113 | - $field .= '<input' . | |
| 114 | - ' id="' . $field_name . '"' . | |
| 115 | - ' type="text"' . | |
| 116 | - ' size="36"' . | |
| 117 | - ' name="' . $field_name . '"' . | |
| 118 | - ' value="' . esc_attr( $field_value ) . '"' . $aria_describedby . '' . | |
| 119 | - ' readonly="readonly"' . | |
| 120 | - ' /> '; | |
| 121 | - $field .= '<input' . | |
| 122 | - ' id="' . esc_attr( $field_name ) . '_button"' . | |
| 123 | - ' class="wpseo_image_upload_button button"' . | |
| 124 | - ' data-target="' . esc_attr( $field_name ) . '"' . | |
| 125 | - ' data-target-id="hidden_' . esc_attr( $field_name ) . '-id"' . | |
| 126 | - ' type="button"' . | |
| 127 | - ' value="' . esc_attr__( 'Upload Image', 'wordpress-seo' ) . '"' . | |
| 128 | - ' /> '; | |
| 129 | - $field .= '<input' . | |
| 130 | - ' id="' . esc_attr( $field_name ) . '_button"' . | |
| 131 | - ' class="wpseo_image_remove_button button"' . | |
| 132 | - ' type="button"' . | |
| 133 | - ' value="' . esc_attr__( 'Clear Image', 'wordpress-seo' ) . '"' . | |
| 134 | - ' />'; | |
| 135 | 111 | break; |
| 136 | 112 | case 'select': |
| 137 | 113 | if ( is_array( $options ) && $options !== [] ) { |
| 138 | 114 | $field .= '<select name="' . $field_name . '" id="' . $field_name . '"' . $aria_describedby . '>'; |