PluginProbe
Polylang / 2.9
Polylang v2.9
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | admin/admin-strings.php +3 -16 2.72.9 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 /**
4 7 * A fully static class to manage strings translations on admin side
5 8 *
@@ -49,23 +52,12 @@
49 52 * @return array list of all registered strings
50 53 */
51 54 public static function &get_strings() {
52 55 self::$default_strings = array(
53 - 'options' => array(
54 - 'blogname' => __( 'Site Title', 'polylang' ),
55 - 'blogdescription' => __( 'Tagline', 'polylang' ),
56 - 'date_format' => __( 'Date Format', 'polylang' ),
57 - 'time_format' => __( 'Time Format', 'polylang' ),
58 - ),
59 56 'widget_title' => __( 'Widget title', 'polylang' ),
60 57 'widget_text' => __( 'Widget text', 'polylang' ),
61 58 );
62 59
63 - // WP strings
64 - foreach ( self::$default_strings['options'] as $option => $string ) {
65 - self::register_string( $string, get_option( $option ), 'WordPress' );
66 - }
67 -
68 60 // Widgets titles
69 61 global $wp_registered_widgets;
70 62 $sidebars = wp_get_sidebars_widgets();
71 63 foreach ( $sidebars as $sidebar => $widgets ) {
@@ -117,13 +109,8 @@
117 109 * @param string $name unique name for the string
118 110 * @return string
119 111 */
120 112 public static function sanitize_string_translation( $translation, $name ) {
121 -
122 - if ( false !== ( $option = array_search( $name, self::$default_strings['options'], true ) ) ) {
123 - $translation = sanitize_option( $option, $translation );
124 - }
125 -
126 113 if ( $name == self::$default_strings['widget_title'] ) {
127 114 $translation = sanitize_text_field( $translation );
128 115 }
129 116