Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
admin
/
taxonomy
/
File Content:
class-taxonomy-fields-presenter.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Class WPSEO_Taxonomy_Presenter. */ class WPSEO_Taxonomy_Fields_Presenter { /** * The taxonomy meta data for the current term. * * @var array */ private $tax_meta; /** * Constructs the WPSEO_Taxonomy_Fields_Presenter class. * * @param stdClass $term The current term. */ public function __construct( $term ) { $this->tax_meta = WPSEO_Taxonomy_Meta::get_term_meta( (int) $term->term_id, $term->taxonomy ); } /** * Displaying the form fields. * * @param array $fields Array with the fields that will be displayed. * * @return string */ public function html( array $fields ) { $content = ''; foreach ( $fields as $field_name => $field_configuration ) { $content .= $this->form_row( 'wpseo_' . $field_name, $field_configuration ); } return $content; } /** * Create a row in the form table. * * @param string $field_name Variable the row controls. * @param array $field_configuration Array with the field configuration. * * @return string */ private function form_row( $field_name, array $field_configuration ) { $esc_field_name = esc_attr( $field_name ); $options = (array) $field_configuration['options']; if ( ! empty( $field_configuration['description'] ) ) { $options['description'] = $field_configuration['description']; } $label = $this->get_label( $field_configuration['label'], $esc_field_name ); $field = $this->get_field( $field_configuration['type'], $esc_field_name, $this->get_field_value( $field_name ), $options ); $help_content = isset( $field_configuration['options']['help'] ) ? $field_configuration['options']['help'] : ''; $help_button_text = isset( $field_configuration['options']['help-button'] ) ? $field_configuration['options']['help-button'] : ''; $help = new WPSEO_Admin_Help_Panel( $field_name, $help_button_text, $help_content ); return $this->parse_row( $label, $help, $field ); } /** * Generates the html for the given field config. * * @param string $field_type The fieldtype, e.g: text, checkbox, etc. * @param string $field_name The name of the field. * @param string $field_value The value of the field. * @param array $options Array with additional options. * * @return string */ private function get_field( $field_type, $field_name, $field_value, array $options ) { $class = $this->get_class( $options ); $field = ''; $description = ''; $aria_describedby = ''; if ( ! empty( $options['description'] ) ) { $aria_describedby = ' aria-describedby="' . $field_name . '-desc"'; $description = '<p id="' . $field_name . '-desc" class="yoast-metabox__description">' . $options['description'] . '</p>'; } switch ( $field_type ) { case 'div': $field .= '<div id="' . $field_name . '"></div>'; break; case 'url': $field .= '<input name="' . $field_name . '" id="' . $field_name . '" ' . $class . ' type="url" value="' . esc_attr( urldecode( $field_value ) ) . '" size="40"' . $aria_describedby . '/>'; break; case 'text': $field .= '<input name="' . $field_name . '" id="' . $field_name . '" ' . $class . ' type="text" value="' . esc_attr( $field_value ) . '" size="40"' . $aria_describedby . '/>'; break; case 'checkbox': $field .= '<input name="' . $field_name . '" id="' . $field_name . '" type="checkbox" ' . checked( $field_value ) . $aria_describedby . '/>'; break; case 'textarea': $rows = 3; if ( ! empty( $options['rows'] ) ) { $rows = $options['rows']; } $field .= '<textarea class="large-text" rows="' . esc_attr( $rows ) . '" id="' . $field_name . '" name="' . $field_name . '"' . $aria_describedby . '>' . esc_textarea( $field_value ) . '</textarea>'; break; case 'upload': $field .= '<input' . ' id="' . $field_name . '"' . ' type="text"' . ' size="36"' . ' name="' . $field_name . '"' . ' value="' . esc_attr( $field_value ) . '"' . $aria_describedby . '' . ' readonly="readonly"' . ' /> '; $field .= '<input' . ' id="' . esc_attr( $field_name ) . '_button"' . ' class="wpseo_image_upload_button button"' . ' data-target="' . esc_attr( $field_name ) . '"' . ' data-target-id="hidden_' . esc_attr( $field_name ) . '-id"' . ' type="button"' . ' value="' . esc_attr__( 'Upload Image', 'wordpress-seo' ) . '"' . ' /> '; $field .= '<input' . ' id="' . esc_attr( $field_name ) . '_button"' . ' class="wpseo_image_remove_button button"' . ' type="button"' . ' value="' . esc_attr__( 'Clear Image', 'wordpress-seo' ) . '"' . ' />'; break; case 'select': if ( is_array( $options ) && $options !== [] ) { $field .= '<select name="' . $field_name . '" id="' . $field_name . '"' . $aria_describedby . '>'; $select_options = ( array_key_exists( 'options', $options ) ) ? $options['options'] : $options; foreach ( $select_options as $option => $option_label ) { $selected = selected( $option, $field_value, false ); $field .= '<option ' . $selected . ' value="' . esc_attr( $option ) . '">' . esc_html( $option_label ) . '</option>'; } unset( $option, $option_label, $selected ); $field .= '</select>'; } break; case 'hidden': $field .= '<input name="' . $field_name . '" id="hidden_' . $field_name . '" type="hidden" value="' . esc_attr( $field_value ) . '" />'; break; } return $field . $description; } /** * Getting the value for given field_name. * * @param string $field_name The fieldname to get the value for. * * @return string */ private function get_field_value( $field_name ) { if ( isset( $this->tax_meta[ $field_name ] ) && $this->tax_meta[ $field_name ] !== '' ) { return $this->tax_meta[ $field_name ]; } return ''; } /** * Getting the class attributes if $options contains a class key. * * @param array $options The array with field options. * * @return string */ private function get_class( array $options ) { if ( ! empty( $options['class'] ) ) { return ' class="' . esc_attr( $options['class'] ) . '"'; } return ''; } /** * Getting the label HTML. * * @param string $label The label value. * @param string $field_name The target field. * * @return string */ private function get_label( $label, $field_name ) { if ( $label !== '' ) { return '<label for="' . $field_name . '">' . esc_html( $label ) . '</label>'; } return ''; } /** * Returns the HTML for the row which contains label, help and the field. * * @param string $label The html for the label if there was a label set. * @param WPSEO_Admin_Help_Panel $help The help panel to render in this row. * @param string $field The html for the field. * * @return string */ private function parse_row( $label, WPSEO_Admin_Help_Panel $help, $field ) { if ( $label !== '' || $help !== '' ) { return $label . $help->get_button_html() . $help->get_panel_html() . $field; } return $field; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable-20260705044401.php
577 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
README.md
2555 bytes
0644
RequestInterface.php
4894 bytes
0644
base.php
2793 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-metabox-editor.php
1820 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-metabox-null-tab.php
425 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-plugin-conflict-20260622015355.php
8640 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-taxonomy-fields-presenter.php
7191 bytes
0644
class-taxonomy-fields.php
4957 bytes
0644
class-taxonomy-metabox.php
4081 bytes
0644
class-taxonomy.php
12580 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-statistics-20260705022132.php
1443 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-notification-center.php
23601 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
class.u.json.php
4832 bytes
0644
ctrl.package.php
17073 bytes
0644
debug.php
276 bytes
0644
define.php
4567 bytes
0644
duplicator-20260707194520.php
1781 bytes
0644
duplicator-main.php
26907 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623181540.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
38 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
partial-notifications-errors.php
1139 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
root.php
1951 bytes
0644
social.php
725 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-seo-main.php
17504 bytes
0644
N4ST4R_ID | Naxtarrr