PluginProbe ʕ •ᴥ•ʔ
Strong Testimonials / 2.33
Strong Testimonials v2.33
3.3.3 3.3.2 3.3.1 trunk 1.0.1 2.30.9 2.31.10 2.32 2.32.1 2.32.2 2.32.3 2.32.4 2.33 2.34 2.35 2.36 2.37 2.38 2.38.1 2.39 2.39.1 2.39.2 2.39.3 2.40.0 2.40.1 2.40.2 2.40.3 2.40.4 2.40.5 2.40.6 2.40.7 2.41.0 2.41.1 2.50.0 2.50.1 2.50.2 2.50.3 2.50.4 2.51.0 2.51.1 2.51.2 2.51.3 2.51.4 2.51.5 2.51.6 2.51.7 2.51.8 2.51.9 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0
strong-testimonials / admin / view-list-order.php
strong-testimonials / admin Last commit date
about 7 years ago css 7 years ago img 8 years ago js 7 years ago menu 8 years ago partials 7 years ago scss 7 years ago settings 7 years ago admin-notices.php 8 years ago admin.php 7 years ago class-strong-testimonials-admin-category-list.php 8 years ago class-strong-testimonials-admin-list.php 7 years ago class-strong-testimonials-admin-scripts.php 8 years ago class-strong-testimonials-defaults.php 7 years ago class-strong-testimonials-help.php 8 years ago class-strong-testimonials-list-table.php 7 years ago class-strong-testimonials-page-shortcodes.php 7 years ago class-strong-testimonials-post-editor.php 7 years ago class-strong-testimonials-updater.php 7 years ago class-strong-views-list-table.php 8 years ago class-walker-strong-category-checklist.php 7 years ago class-walker-strong-form-category-checklist.php 7 years ago compat.php 8 years ago custom-fields-ajax.php 8 years ago custom-fields.php 7 years ago form-preview.php 8 years ago view-list-order.php 8 years ago views-ajax.php 7 years ago views-validate.php 7 years ago views.php 7 years ago
view-list-order.php
56 lines
1 <?php
2 /**
3 * Function for managing the last sort order on the view list table per user.
4 */
5
6 /**
7 * Save
8 */
9 function wpmtst_save_view_list_order() {
10 $name = $_REQUEST['name'];
11 $order = $_REQUEST['order'];
12 $success = '';
13 if ( in_array( $name, array( 'name', 'id' ) ) ) {
14 $success = update_user_meta( get_current_user_id(), 'strong_view_list_order', array( $name, $order ) );
15 }
16 echo $success;
17 wp_die();
18 }
19 add_action( 'wp_ajax_wpmtst_save_view_list_order', 'wpmtst_save_view_list_order' );
20
21
22 /**
23 * Fetch
24 */
25 function wpmtst_fetch_view_list_order() {
26 global $pagenow;
27
28 if ( $pagenow == 'edit.php'
29 && isset( $_GET['post_type'] )
30 && 'wpm-testimonial' == $_GET['post_type']
31 && isset( $_GET['page'] )
32 && 'testimonial-views' == $_GET['page']
33 && ! isset( $_GET['orderby'] )
34 && ! isset( $_GET['action'] ) )
35 {
36 $order = get_user_meta( get_current_user_id(), 'strong_view_list_order', true );
37 if ( $order ) {
38 $url = admin_url( "edit.php?post_type=wpm-testimonial&page=testimonial-views&orderby={$order[0]}&order={$order[1]}" );
39 wp_redirect( $url );
40 exit;
41 }
42 }
43 }
44 add_action( 'admin_init', 'wpmtst_fetch_view_list_order' );
45
46
47 /**
48 * Clear
49 */
50 function wpmtst_clear_view_list_order() {
51 delete_user_meta( get_current_user_id(), 'strong_view_list_order' );
52 $url = 'edit.php?post_type=wpm-testimonial&page=testimonial-views';
53 wp_redirect( $url );
54 }
55 add_action( 'admin_post_clear-view-sort', 'wpmtst_clear_view_list_order' );
56