PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 19.1 All 128 releases
wordpress-seo / admin / views / form / select.php

select.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at admin/views/form/select.php

27 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin
6 *
7 * @uses string $attributes Additional attributes for the select.
8 * @uses string $name Value for the select name attribute.
9 * @uses string $id ID attribute for the select.
10 * @uses array $options Array with the options to show.
11 * @uses string $selected The current set options.
12 */
13
14 if ( ! defined( 'WPSEO_VERSION' ) ) {
15 header( 'Status: 403 Forbidden' );
16 header( 'HTTP/1.1 403 Forbidden' );
17 exit();
18 }
19
20 ?>
21 <?php /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $attributes is properly escaped in parse_attribute via get_attributes in class-yoast-input-select.php. */ ?>
22 <select <?php echo $attributes; ?>name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $id ); ?>">
23 <?php foreach ( $options as $option_attribute_value => $option_html_value ) : ?>
24 <option value="<?php echo esc_attr( $option_attribute_value ); ?>"<?php echo selected( $selected, $option_attribute_value, false ); ?>><?php echo esc_html( $option_html_value ); ?></option>
25 <?php endforeach; ?>
26 </select>
27