Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/uploads/flags/ui-elements.tar
Назад
class-wpml-ui-screen-options-factory.php 0000644 00000001733 14721645260 0014400 0 ustar 00 <?php /** * @package wpml-core */ class WPML_UI_Screen_Options_Factory { /** @var SitePress $sitepress */ private $sitepress; public function __construct( SitePress $sitepress ) { $this->sitepress = $sitepress; } /** * @param string $option_name * @param int $default_per_page * * @return WPML_UI_Screen_Options_Pagination */ public function create_pagination( $option_name, $default_per_page ) { $pagination = new WPML_UI_Screen_Options_Pagination( $option_name, $default_per_page ); $pagination->init_hooks(); return $pagination; } public function create_help_tab( $id, $title, $content ) { if ( is_callable( $title ) ) { $title = $title(); } if ( is_callable( $content ) ) { $content = $content(); } $help_tab = new WPML_UI_Help_Tab( $this->sitepress->get_wp_api(), $id, $title, $content ); $help_tab->init_hooks(); return $help_tab; } public function create_admin_table_sort() { return new WPML_Admin_Table_Sort(); } } class-wpml-ui-help-tab.php 0000644 00000001273 14721645260 0011456 0 ustar 00 <?php /** * @package wpml-core */ class WPML_UI_Help_Tab { private $wp_api; private $id; private $title; private $content; public function __construct( WPML_WP_API $wp_api, $id, $title, $content ) { $this->wp_api = $wp_api; $this->id = $id; $this->title = $title; $this->content = $content; } public function init_hooks() { $this->wp_api->add_action( 'admin_head', array( $this, 'add_help_tab' ) ); } public function add_help_tab() { $screen = $this->wp_api->get_current_screen(); if ( null !== $screen ) { $screen->add_help_tab( array( 'id' => $this->id, 'title' => $this->title, 'content' => $this->content, ) ); } } } class-wpml-ui-pagination.php 0000644 00000000545 14721645260 0012114 0 ustar 00 <?php /** * @package wpml-core */ class WPML_UI_Pagination extends WP_List_Table { public function __construct( $total, $number_per_page ) { parent::__construct(); $this->set_pagination_args( array( 'total_items' => $total, 'per_page' => $number_per_page, ) ); } public function show() { $this->pagination( 'bottom' ); } } class-wpml-ui-unlock-button.php 0000644 00000001260 14721645260 0012562 0 ustar 00 <?php class WPML_UI_Unlock_Button { public function render( $disabled, $unlocked, $radio_name, $unlocked_name ) { if ( $disabled && ! $unlocked ) { ?> <button type="button" class="button-secondary wpml-button-lock js-wpml-sync-lock" title="<?php esc_html_e( 'This setting is controlled by a wpml-config.xml file. Click here to unlock and override this setting.', 'sitepress' ); ?>" data-radio-name="<?php echo $radio_name; ?>" data-unlocked-name="<?php echo $unlocked_name; ?>"> <i class="otgs-ico-lock"></i> </button> <?php } ?> <input type="hidden" name="<?php echo $unlocked_name; ?>" value="<?php echo $unlocked ? '1' : '0'; ?>"> <?php } } class-wpml-ui-screen-options-pagination.php 0000644 00000002450 14721645260 0015057 0 ustar 00 <?php /** * @package wpml-core */ class WPML_UI_Screen_Options_Pagination { /** * @var string $option_name */ private $option_name; /** * @var int $default_per_page */ private $default_per_page; /** * WPML_UI_Screen_Options_Pagination constructor. * * @param string $option_name * @param int $default_per_page */ public function __construct( $option_name, $default_per_page ) { $this->option_name = $option_name; $this->default_per_page = $default_per_page; } public function init_hooks() { add_action( 'admin_head', array( $this, 'add_screen_options' ) ); add_filter( 'set-screen-option', array( $this, 'set_screen_options_filter' ), 10, 3 ); add_filter( 'set_screen_option_' . $this->option_name, [ $this, 'set_screen_options_filter' ], 10, 3 ); } public function add_screen_options() { add_screen_option( 'per_page', array( 'default' => $this->default_per_page, 'option' => $this->option_name, ) ); } public function set_screen_options_filter( $value, $option, $set_value ) { return $option === $this->option_name ? $set_value : $value; } public function get_items_per_page() { $page_size = (int) get_user_option( $this->option_name ); if ( ! $page_size ) { $page_size = $this->default_per_page; } return $page_size; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка