Changeset 6287 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author.php
- Timestamp:
- 12/19/2017 04:22:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author.php
r3506 r6287 15 15 */ 16 16 public static function display() { 17 $post = get_post(); 18 $value = empty( $post->ID ) ? get_current_user_id() : $post->post_author; 19 $user = new \WP_User( $value ); 17 $post = get_post(); 18 $value = empty( $post->ID ) ? get_current_user_id() : $post->post_author; 19 $user = new \WP_User( $value ); 20 $source = add_query_arg( array( 21 'action' => 'plugin-author-lookup', 22 '_ajax_nonce' => wp_create_nonce( 'wporg_plugins_author_lookup' ), 23 ), admin_url( 'admin-ajax.php' ) ); 20 24 21 25 ?> … … 27 31 jQuery( function( $ ) { 28 32 $( '#post_author_username' ).autocomplete( { 29 source: '<?php echo add_query_arg( array( 'action' => 'plugin-author-lookup', '_ajax_nonce' => wp_create_nonce( 'wporg_plugins_author_lookup' ) ), admin_url( 'admin-ajax.php' )); ?>',33 source: '<?php echo esc_js( $source ); ?>', 30 34 minLength: 2, 31 35 delay: 700,
Note: See TracChangeset
for help on using the changeset viewer.