Changeset 64182
- Timestamp:
- 10/06/2026 05:43:22 PM (5 weeks ago)
- Location:
- branches/4.8
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
src/wp-admin/js/common.js (modified) (1 diff)
-
src/wp-includes/class-http.php (modified) (1 diff)
-
src/wp-includes/class-oembed.php (modified) (3 diffs)
-
src/wp-includes/class-wp-query.php (modified) (2 diffs)
-
src/wp-includes/post.php (modified) (1 diff)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/trunk merged: 64127-64128,64130-64133
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-admin/js/common.js
r40648 r64182 169 169 link.parent('li').addClass('active'); 170 170 171 panel = $( link.attr('href') );171 panel = $( document ).find( link.attr('href') ); 172 172 173 173 // Panels -
branches/4.8/src/wp-includes/class-http.php
r40689 r64182 945 945 // Strip all /path/../ out of the path. 946 946 while ( strpos( $path, '../' ) > 1 ) { 947 $path = preg_replace( '![^/]+/\.\./!', '', $path ); 947 $path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count ); 948 if ( 0 === $segment_replacement_count ) { 949 break; 950 } 948 951 } 949 952 -
branches/4.8/src/wp-includes/class-oembed.php
r41025 r64182 84 84 '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i' => array( 'https://api.instagram.com/oembed', true ), 85 85 '#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ), 86 '#https?://(.+\.)?imgur\.com/.*#i' => array( 'http://api.imgur.com/oembed', true ),87 86 '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'https://api.meetup.com/oembed', true ), 88 87 '#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'https://issuu.com/oembed_wp', true ), … … 157 156 * | Flickr | flic.kr | Yes | 3.6.0 | 158 157 * | Spotify | spotify.com | Yes | 3.6.0 | 159 * | Imgur | imgur.com | Yes | 3.9.0 |160 158 * | Meetup.com | meetup.com | Yes | 3.9.0 | 161 159 * | Meetup.com | meetu.ps | Yes | 3.9.0 | … … 195 193 * | Rdio | rdio.com | Yes | 3.6.0 | 4.4.1 | 196 194 * | Rdio | rd.io | Yes | 3.6.0 | 4.4.1 | 195 * | Imgur | imgur.com | Yes | 3.9.0 | 7.1.3 | 197 196 * 198 197 * @see wp_oembed_add_provider() -
branches/4.8/src/wp-includes/class-wp-query.php
r54568 r64182 2897 2897 } 2898 2898 2899 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {2900 /** This filter is documented in wp-includes/query.php */2901 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );2902 2903 /** This filter is documented in wp-includes/query.php */2904 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );2905 2906 /** This filter is documented in wp-includes/query.php */2907 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );2908 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';2909 2910 /** This filter is documented in wp-includes/query.php */2911 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );2912 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';2913 2914 /** This filter is documented in wp-includes/query.php */2915 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );2916 2917 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";2918 $comments = $wpdb->get_results($comments_request);2919 // Convert to WP_Comment2920 $this->comments = array_map( 'get_comment', $comments );2921 $this->comment_count = count($this->comments);2922 }2923 2924 2899 // Check post status to determine if post should be displayed. 2925 2900 if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { … … 2970 2945 } 2971 2946 2947 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) { 2948 /** This filter is documented in wp-includes/query.php */ 2949 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 2950 2951 /** This filter is documented in wp-includes/query.php */ 2952 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 2953 2954 /** This filter is documented in wp-includes/query.php */ 2955 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 2956 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2957 2958 /** This filter is documented in wp-includes/query.php */ 2959 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 2960 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 2961 2962 /** This filter is documented in wp-includes/query.php */ 2963 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 2964 2965 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; 2966 $comments = $wpdb->get_results($comments_request); 2967 // Convert to WP_Comment 2968 $this->comments = array_map( 'get_comment', $comments ); 2969 $this->comment_count = count($this->comments); 2970 } 2971 2972 2972 // Put sticky posts at the top of the posts array 2973 2973 $sticky_posts = get_option('sticky_posts'); -
branches/4.8/src/wp-includes/post.php
r54568 r64182 4066 4066 do_action( 'transition_post_status', $new_status, $old_status, $post ); 4067 4067 4068 /** 4069 * Fires when a post is transitioned from one status to another. 4070 * 4071 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4072 * refer to the old and new post statuses, respectively. 4073 * 4074 * @since 2.3.0 4075 * 4076 * @param WP_Post $post Post object. 4077 */ 4078 do_action( "{$old_status}_to_{$new_status}", $post ); 4079 4080 /** 4081 * Fires when a post is transitioned from one status to another. 4082 * 4083 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4084 * refer to the new post status and post type, respectively. 4085 * 4086 * Please note: When this action is hooked using a particular post status (like 4087 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4088 * first transitioned to that status from something else, as well as upon 4089 * subsequent post updates (old and new status are both the same). 4090 * 4091 * Therefore, if you are looking to only fire a callback when a post is first 4092 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4093 * 4094 * @since 2.3.0 4095 * 4096 * @param int $post_id Post ID. 4097 * @param WP_Post $post Post object. 4098 */ 4099 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4068 $new_status_object = get_post_status_object( $new_status ); 4069 $old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status; 4070 $post_type_object = get_post_type_object( $post->post_type ); 4071 4072 if ( $new_status_object && $old_status_valid ) { 4073 /** 4074 * Fires when a post is transitioned from one status to another. 4075 * 4076 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4077 * refer to the old and new post statuses, respectively. 4078 * 4079 * @since 2.3.0 4080 * 4081 * @param WP_Post $post Post object. 4082 */ 4083 do_action( "{$old_status}_to_{$new_status}", $post ); 4084 } 4085 4086 if ( $new_status_object && $post_type_object ) { 4087 /** 4088 * Fires when a post is transitioned from one status to another. 4089 * 4090 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4091 * refer to the new post status and post type, respectively. 4092 * 4093 * Please note: When this action is hooked using a particular post status (like 4094 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4095 * first transitioned to that status from something else, as well as upon 4096 * subsequent post updates (old and new status are both the same). 4097 * 4098 * Therefore, if you are looking to only fire a callback when a post is first 4099 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4100 * 4101 * @since 2.3.0 4102 * 4103 * @param int $post_id Post ID. 4104 * @param WP_Post $post Post object. 4105 */ 4106 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4107 } 4100 4108 } 4101 4109 -
branches/4.8/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r60838 r64182 554 554 } 555 555 556 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {556 if ( ! empty( $request['sticky'] ) && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) { 557 557 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 558 558 } … … 698 698 } 699 699 700 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {700 if ( isset( $request['sticky'] ) && is_sticky( $post->ID ) !== (bool) $request['sticky'] && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) { 701 701 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 702 702 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)