/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/e2e-tests/plugins/rtl.php
27 строк
790 B
Noruzzaman
Docs: Add missing @global documentation in rtl.php and meta-box.php (#75082)
30 янв 2026, 19:16
Не верифицирован
30 янв 2026, 19:16
ae58ba3
Код
Авторство
О чём код?
<?php /** * Plugin Name: Gutenberg Test Plugin, Activate RTL * Plugin URI: https://github.com/WordPress/gutenberg * Author: Gutenberg Team / Yoav Farhi * * Based on the code from http://wordpress.org/extend/plugins/rtl-tester/. * * @package gutenberg-test-plugin-activate-rtl */ /** * Set the locale's and styles' text direction to RTL. * @global WP_Locale $wp_locale WordPress Locale object. * @global WP_Styles $wp_styles WordPress Styles object. */ function gutenberg_test_plugin_activate_rtl_set_direction() { global $wp_locale, $wp_styles; $wp_locale->text_direction = 'rtl'; if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { $wp_styles = new WP_Styles(); } $wp_styles->text_direction = 'rtl'; } add_action( 'init', 'gutenberg_test_plugin_activate_rtl_set_direction' );