Changeset 2237
- Timestamp:
- 12/29/2015 08:34:42 PM (10 years ago)
- Location:
- sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles
- Files:
-
- 4 edited
-
class-translation-editors-list-table.php (modified) (4 diffs)
-
js/rosetta-roles.js (modified) (4 diffs)
-
rosetta-roles.php (modified) (9 diffs)
-
views/edit-translation-editor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/class-translation-editors-list-table.php
r2197 r2237 48 48 */ 49 49 public function __construct( $args = array() ) { 50 global $wpdb;51 52 50 parent::__construct( array( 53 51 'singular' => 'translation-editor', … … 67 65 */ 68 66 public function prepare_items() { 69 $search =isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';67 $search = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : ''; 70 68 $per_page = $this->get_items_per_page( 'translation_editors_per_page', 10 ); 71 $paged =$this->get_pagenum();69 $paged = $this->get_pagenum(); 72 70 73 71 $role__in = $this->user_roles; … … 81 79 'role__in' => $role__in, 82 80 'search' => $search, 83 'fields' => 'all_with_meta' 81 'fields' => 'all_with_meta', 84 82 ); 85 83 … … 226 224 $class_html = ''; 227 225 if ( ! empty( $class ) ) { 228 $class_html = sprintf(226 $class_html = sprintf( 229 227 ' class="%s"', 230 228 esc_attr( $class ) -
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/js/rosetta-roles.js
r2228 r2237 244 244 updateIsActive: function() { 245 245 this.model.set( 'isActive', true ); 246 } ,246 } 247 247 }); 248 248 … … 263 263 collection: collection 264 264 }) ); 265 } ,265 } 266 266 }); 267 267 … … 306 306 attributes: { 307 307 placeholder: l10n.searchPlaceholder, 308 type: 'search' ,308 type: 'search' 309 309 }, 310 310 … … 312 312 'input': 'search', 313 313 'keyup': 'search', 314 'keydown': 'search' ,314 'keydown': 'search' 315 315 }, 316 316 -
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/rosetta-roles.php
r2228 r2237 125 125 * The list used in wp_dropdown_roles() on users list table. 126 126 * 127 * @param array $ all_roles List of roles.127 * @param array $roles List of roles. 128 128 * @return array Filtered list of editable roles. 129 129 */ … … 233 233 $args = array( 234 234 'default' => 10, 235 'option' => 'translation_editors_per_page' 235 'option' => 'translation_editors_per_page', 236 236 ); 237 237 add_screen_option( $option, $args ); … … 285 285 */ 286 286 private function load_translation_editors() { 287 global $wpdb;288 289 287 $list_table = $this->get_translation_editors_list_table(); 290 288 $action = $list_table->current_action(); … … 395 393 */ 396 394 private function load_edit_translation_editor( $user_id ) { 397 global $wpdb;398 399 395 $redirect = menu_page_url( 'translation-editors', false ); 400 396 … … 623 619 */ 624 620 private function render_edit_translation_editor( $user_id ) { 625 global $wpdb;626 627 621 $projects = $this->get_translate_projects(); 628 622 $project_tree = $this->get_project_tree( $projects, 0, 1 ); … … 642 636 wp_localize_script( 'rosetta-roles', '_rosettaProjectsSettings', array( 643 637 'l10n' => array( 644 'searchPlaceholder' => esc_attr__( 'Search...', 'rosetta' ) 638 'searchPlaceholder' => esc_attr__( 'Search...', 'rosetta' ), 645 639 ), 646 640 'data' => $project_tree, 647 'accessList' => $project_access_list 641 'accessList' => $project_access_list, 648 642 ) ); 649 643 … … 689 683 $messages['error'][ $_REQUEST['error'] ] 690 684 ); 691 } elseif ( isset( $_REQUEST['update'], $messages['update'][ $_REQUEST['update'] ] ) ) {685 } elseif ( isset( $_REQUEST['update'], $messages['update'][ $_REQUEST['update'] ] ) ) { 692 686 $message = sprintf( 693 687 '<div class="notice notice-success"><p>%s</p></div>', … … 705 699 */ 706 700 private function get_translation_editors_list_table() { 707 global $wpdb;708 701 static $list_table; 709 702 … … 742 735 'user_id' => $user_id, 743 736 'association' => 'translation-editor', 744 ) 737 ), 745 738 ); 746 739 -
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/views/edit-translation-editor.php
r1786 r2237 18 18 <li id="project-all" class="active"> 19 19 <label> 20 <input name="projects[]" value="all" type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects', 'rosetta' ); ?>20 <input name="projects[]" value="all" type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects', 'rosetta' ); ?> 21 21 </label> 22 22 <div class="sub-projects-wrapper">
Note: See TracChangeset
for help on using the changeset viewer.