Changeset 64181
- Timestamp:
- 10/06/2026 05:43:16 PM (5 weeks ago)
- Location:
- branches/4.9
- 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.9
- Property svn:mergeinfo changed
/trunk merged: 64127-64128,64130-64133
- Property svn:mergeinfo changed
-
branches/4.9/src/wp-admin/js/common.js
r42012 r64181 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.9/src/wp-includes/class-http.php
r41907 r64181 932 932 // Strip all /path/../ out of the path. 933 933 while ( strpos( $path, '../' ) > 1 ) { 934 $path = preg_replace( '![^/]+/\.\./!', '', $path ); 934 $path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count ); 935 if ( 0 === $segment_replacement_count ) { 936 break; 937 } 935 938 } 936 939 -
branches/4.9/src/wp-includes/class-oembed.php
r41681 r64181 79 79 '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i' => array( 'https://api.instagram.com/oembed', true ), 80 80 '#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ), 81 '#https?://(.+\.)?imgur\.com/.*#i' => array( 'https://api.imgur.com/oembed', true ),82 81 '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'https://api.meetup.com/oembed', true ), 83 82 '#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'https://issuu.com/oembed_wp', true ), … … 165 164 * | Flickr | flic.kr | Yes | 3.6.0 | 166 165 * | Spotify | spotify.com | Yes | 3.6.0 | 167 * | Imgur | imgur.com | Yes | 3.9.0 |168 166 * | Meetup.com | meetup.com | Yes | 3.9.0 | 169 167 * | Meetup.com | meetu.ps | Yes | 3.9.0 | … … 212 210 * | Rdio | rd.io | Yes | 3.6.0 | 4.4.1 | 213 211 * | Vine | vine.co | Yes | 4.1.0 | 4.9.0 | 212 * | Imgur | imgur.com | Yes | 3.9.0 | 7.1.3 | 214 213 * 215 214 * @see wp_oembed_add_provider() -
branches/4.9/src/wp-includes/class-wp-query.php
r54569 r64181 2872 2872 } 2873 2873 2874 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {2875 /** This filter is documented in wp-includes/query.php */2876 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );2877 2878 /** This filter is documented in wp-includes/query.php */2879 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );2880 2881 /** This filter is documented in wp-includes/query.php */2882 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );2883 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';2884 2885 /** This filter is documented in wp-includes/query.php */2886 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );2887 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';2888 2889 /** This filter is documented in wp-includes/query.php */2890 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );2891 2892 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";2893 $comments = $wpdb->get_results($comments_request);2894 // Convert to WP_Comment2895 $this->comments = array_map( 'get_comment', $comments );2896 $this->comment_count = count($this->comments);2897 }2898 2899 2874 // Check post status to determine if post should be displayed. 2900 2875 if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { … … 2945 2920 } 2946 2921 2922 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) { 2923 /** This filter is documented in wp-includes/query.php */ 2924 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 2925 2926 /** This filter is documented in wp-includes/query.php */ 2927 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 2928 2929 /** This filter is documented in wp-includes/query.php */ 2930 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 2931 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2932 2933 /** This filter is documented in wp-includes/query.php */ 2934 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 2935 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 2936 2937 /** This filter is documented in wp-includes/query.php */ 2938 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 2939 2940 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; 2941 $comments = $wpdb->get_results($comments_request); 2942 // Convert to WP_Comment 2943 $this->comments = array_map( 'get_comment', $comments ); 2944 $this->comment_count = count($this->comments); 2945 } 2946 2947 2947 // Put sticky posts at the top of the posts array 2948 2948 $sticky_posts = get_option('sticky_posts'); -
branches/4.9/src/wp-includes/post.php
r54569 r64181 4229 4229 do_action( 'transition_post_status', $new_status, $old_status, $post ); 4230 4230 4231 /** 4232 * Fires when a post is transitioned from one status to another. 4233 * 4234 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4235 * refer to the old and new post statuses, respectively. 4236 * 4237 * @since 2.3.0 4238 * 4239 * @param WP_Post $post Post object. 4240 */ 4241 do_action( "{$old_status}_to_{$new_status}", $post ); 4242 4243 /** 4244 * Fires when a post is transitioned from one status to another. 4245 * 4246 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4247 * refer to the new post status and post type, respectively. 4248 * 4249 * Please note: When this action is hooked using a particular post status (like 4250 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4251 * first transitioned to that status from something else, as well as upon 4252 * subsequent post updates (old and new status are both the same). 4253 * 4254 * Therefore, if you are looking to only fire a callback when a post is first 4255 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4256 * 4257 * @since 2.3.0 4258 * 4259 * @param int $post_id Post ID. 4260 * @param WP_Post $post Post object. 4261 */ 4262 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4231 $new_status_object = get_post_status_object( $new_status ); 4232 $old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status; 4233 $post_type_object = get_post_type_object( $post->post_type ); 4234 4235 if ( $new_status_object && $old_status_valid ) { 4236 /** 4237 * Fires when a post is transitioned from one status to another. 4238 * 4239 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4240 * refer to the old and new post statuses, respectively. 4241 * 4242 * @since 2.3.0 4243 * 4244 * @param WP_Post $post Post object. 4245 */ 4246 do_action( "{$old_status}_to_{$new_status}", $post ); 4247 } 4248 4249 if ( $new_status_object && $post_type_object ) { 4250 /** 4251 * Fires when a post is transitioned from one status to another. 4252 * 4253 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4254 * refer to the new post status and post type, respectively. 4255 * 4256 * Please note: When this action is hooked using a particular post status (like 4257 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4258 * first transitioned to that status from something else, as well as upon 4259 * subsequent post updates (old and new status are both the same). 4260 * 4261 * Therefore, if you are looking to only fire a callback when a post is first 4262 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4263 * 4264 * @since 2.3.0 4265 * 4266 * @param int $post_id Post ID. 4267 * @param WP_Post $post Post object. 4268 */ 4269 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4270 } 4263 4271 } 4264 4272 -
branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r60837 r64181 544 544 } 545 545 546 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {546 if ( ! empty( $request['sticky'] ) && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) { 547 547 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 548 548 } … … 686 686 } 687 687 688 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {688 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 ) ) ) { 689 689 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 690 690 }
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)