Changeset 64177
- Timestamp:
- 10/06/2026 05:42:44 PM (5 weeks ago)
- Location:
- branches/5.3
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
src/js/_enqueues/admin/common.js (modified) (1 diff)
-
src/wp-includes/class-http.php (modified) (1 diff)
-
src/wp-includes/class-wp-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/5.3
- Property svn:mergeinfo changed
/trunk merged: 64127-64128,64130-64133
- Property svn:mergeinfo changed
-
branches/5.3/src/js/_enqueues/admin/common.js
r46250 r64177 339 339 link.parent('li').addClass('active'); 340 340 341 panel = $( link.attr('href') );341 panel = $( document ).find( link.attr('href') ); 342 342 343 343 // Panels -
branches/5.3/src/wp-includes/class-http.php
r46468 r64177 975 975 // Strip all /path/../ out of the path. 976 976 while ( strpos( $path, '../' ) > 1 ) { 977 $path = preg_replace( '![^/]+/\.\./!', '', $path ); 977 $path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count ); 978 if ( 0 === $segment_replacement_count ) { 979 break; 980 } 978 981 } 979 982 -
branches/5.3/src/wp-includes/class-wp-oembed.php
r46768 r64177 76 76 '#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i' => array( 'https://api.instagram.com/oembed', true ), 77 77 '#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ), 78 '#https?://(.+\.)?imgur\.com/.*#i' => array( 'https://api.imgur.com/oembed', true ),79 78 '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'https://api.meetup.com/oembed', true ), 80 79 '#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'https://issuu.com/oembed_wp', true ), … … 159 158 * | Flickr | flic.kr | 3.6.0 | 160 159 * | Spotify | spotify.com | 3.6.0 | 161 * | Imgur | imgur.com | 3.9.0 |162 160 * | Meetup.com | meetup.com | 3.9.0 | 163 161 * | Meetup.com | meetu.ps | 3.9.0 | … … 211 209 * | Funny or Die | funnyordie.com | 3.0.0 | 5.1.0 | 212 210 * | CollegeHumor | collegehumor.com | 4.0.0 | 5.3.1 | 211 * | Imgur | imgur.com | 3.9.0 | 7.1.3 | 213 212 * 214 213 * @see wp_oembed_add_provider() -
branches/5.3/src/wp-includes/class-wp-query.php
r54562 r64177 3046 3046 } 3047 3047 3048 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) {3049 /** This filter is documented in wp-includes/query.php */3050 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );3051 3052 /** This filter is documented in wp-includes/query.php */3053 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );3054 3055 /** This filter is documented in wp-includes/query.php */3056 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );3057 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';3058 3059 /** This filter is documented in wp-includes/query.php */3060 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );3061 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';3062 3063 /** This filter is documented in wp-includes/query.php */3064 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );3065 3066 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";3067 $comments = $wpdb->get_results( $comments_request );3068 // Convert to WP_Comment3069 $this->comments = array_map( 'get_comment', $comments );3070 $this->comment_count = count( $this->comments );3071 }3072 3073 3048 // Check post status to determine if post should be displayed. 3074 3049 if ( ! empty( $this->posts ) && ( $this->is_single || $this->is_page ) ) { … … 3121 3096 } 3122 3097 3098 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) { 3099 /** This filter is documented in wp-includes/query.php */ 3100 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 3101 3102 /** This filter is documented in wp-includes/query.php */ 3103 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 3104 3105 /** This filter is documented in wp-includes/query.php */ 3106 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 3107 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 3108 3109 /** This filter is documented in wp-includes/query.php */ 3110 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 3111 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 3112 3113 /** This filter is documented in wp-includes/query.php */ 3114 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) ); 3115 3116 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; 3117 $comments = $wpdb->get_results( $comments_request ); 3118 // Convert to WP_Comment 3119 $this->comments = array_map( 'get_comment', $comments ); 3120 $this->comment_count = count( $this->comments ); 3121 } 3122 3123 3123 // Put sticky posts at the top of the posts array 3124 3124 $sticky_posts = get_option( 'sticky_posts' ); -
branches/5.3/src/wp-includes/post.php
r54562 r64177 4723 4723 do_action( 'transition_post_status', $new_status, $old_status, $post ); 4724 4724 4725 /** 4726 * Fires when a post is transitioned from one status to another. 4727 * 4728 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4729 * refer to the old and new post statuses, respectively. 4730 * 4731 * @since 2.3.0 4732 * 4733 * @param WP_Post $post Post object. 4734 */ 4735 do_action( "{$old_status}_to_{$new_status}", $post ); 4736 4737 /** 4738 * Fires when a post is transitioned from one status to another. 4739 * 4740 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4741 * refer to the new post status and post type, respectively. 4742 * 4743 * Please note: When this action is hooked using a particular post status (like 4744 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4745 * first transitioned to that status from something else, as well as upon 4746 * subsequent post updates (old and new status are both the same). 4747 * 4748 * Therefore, if you are looking to only fire a callback when a post is first 4749 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4750 * 4751 * @since 2.3.0 4752 * 4753 * @param int $post_id Post ID. 4754 * @param WP_Post $post Post object. 4755 */ 4756 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4725 $new_status_object = get_post_status_object( $new_status ); 4726 $old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status; 4727 $post_type_object = get_post_type_object( $post->post_type ); 4728 4729 if ( $new_status_object && $old_status_valid ) { 4730 /** 4731 * Fires when a post is transitioned from one status to another. 4732 * 4733 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4734 * refer to the old and new post statuses, respectively. 4735 * 4736 * @since 2.3.0 4737 * 4738 * @param WP_Post $post Post object. 4739 */ 4740 do_action( "{$old_status}_to_{$new_status}", $post ); 4741 } 4742 4743 if ( $new_status_object && $post_type_object ) { 4744 /** 4745 * Fires when a post is transitioned from one status to another. 4746 * 4747 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4748 * refer to the new post status and post type, respectively. 4749 * 4750 * Please note: When this action is hooked using a particular post status (like 4751 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4752 * first transitioned to that status from something else, as well as upon 4753 * subsequent post updates (old and new status are both the same). 4754 * 4755 * Therefore, if you are looking to only fire a callback when a post is first 4756 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4757 * 4758 * @since 2.3.0 4759 * 4760 * @param int $post_id Post ID. 4761 * @param WP_Post $post Post object. 4762 */ 4763 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4764 } 4757 4765 } 4758 4766 -
branches/5.3/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r60833 r64177 551 551 } 552 552 553 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {553 if ( ! empty( $request['sticky'] ) && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) { 554 554 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 555 555 } … … 706 706 } 707 707 708 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {708 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 ) ) ) { 709 709 return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) ); 710 710 }
Note:
See TracChangeset
for help on using the changeset viewer.