Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/uploads/flags/string-translation.tar
Назад
class-wpml-st-string-translation-priority-ajax.php 0000644 00000002110 14721712313 0016416 0 ustar 00 <?php class WPML_ST_String_Translation_Priority_AJAX implements IWPML_Action { /** @var wpdb */ private $wpdb; /** * @param wpdb $wpdb */ public function __construct( wpdb $wpdb ) { $this->wpdb = $wpdb; } public function add_hooks() { add_action( 'wp_ajax_wpml_change_string_translation_priority', array( $this, 'change_string_translation_priority' ) ); } public function change_string_translation_priority() { if ( $this->verify_ajax( 'wpml_change_string_translation_priority_nonce' ) ) { $change_string_translation_priority_dialog = new WPML_Strings_Translation_Priority( $this->wpdb ); $string_ids = array_map( 'intval', $_POST['strings'] ); $priority = (string) filter_var( isset( $_POST['priority'] ) ? $_POST['priority'] : '', FILTER_SANITIZE_SPECIAL_CHARS ); $change_string_translation_priority_dialog->change_translation_priority_of_strings( $string_ids, $priority ); wp_send_json_success(); } } private function verify_ajax( $ajax_action ) { return isset( $_POST['wpnonce'] ) && wp_verify_nonce( $_POST['wpnonce'], $ajax_action ); } } class-wpml-strings-translation-priority.php 0000644 00000001136 14721712313 0015243 0 ustar 00 <?php class WPML_Strings_Translation_Priority { /** * @var wpdb */ private $wpdb; /** * @param wpdb $wpdb */ public function __construct( wpdb $wpdb ) { $this->wpdb = $wpdb; } /** * @param int[] $strings * @param string $priority */ public function change_translation_priority_of_strings( $strings, $priority ) { $update_query = "UPDATE {$this->wpdb->prefix}icl_strings SET translation_priority=%s WHERE id IN (" . wpml_prepare_in( $strings, '%d' ) . ')'; $update_prepare = $this->wpdb->prepare( $update_query, $priority ); $this->wpdb->query( $update_prepare ); } } class-wpml-st-string-translation-ajax-hooks-factory.php 0000644 00000000422 14721712313 0017331 0 ustar 00 <?php class WPML_ST_String_Translation_AJAX_Hooks_Factory implements IWPML_Backend_Action_Loader { public function create() { global $wpdb; $ajax_hooks = array(); $ajax_hooks[] = new WPML_ST_String_Translation_Priority_AJAX( $wpdb ); return $ajax_hooks; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка