Changeset 64176
- Timestamp:
- 10/06/2026 05:42:36 PM (5 weeks ago)
- Location:
- branches/5.4
- 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.4
- Property svn:mergeinfo changed
/trunk merged: 64127-64128,64130-64133
- Property svn:mergeinfo changed
-
branches/5.4/src/js/_enqueues/admin/common.js
r47122 r64176 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.4/src/wp-includes/class-http.php
r47346 r64176 989 989 // Strip all /path/../ out of the path. 990 990 while ( strpos( $path, '../' ) > 1 ) { 991 $path = preg_replace( '![^/]+/\.\./!', '', $path ); 991 $path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count ); 992 if ( 0 === $segment_replacement_count ) { 993 break; 994 } 992 995 } 993 996 -
branches/5.4/src/wp-includes/class-wp-oembed.php
r47216 r64176 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 ), … … 160 159 * | Flickr | flic.kr | 3.6.0 | 161 160 * | Spotify | spotify.com | 3.6.0 | 162 * | Imgur | imgur.com | 3.9.0 |163 161 * | Meetup.com | meetup.com | 3.9.0 | 164 162 * | Meetup.com | meetu.ps | 3.9.0 | … … 213 211 * | Funny or Die | funnyordie.com | 3.0.0 | 5.1.0 | 214 212 * | CollegeHumor | collegehumor.com | 4.0.0 | 5.3.1 | 213 * | Imgur | imgur.com | 3.9.0 | 7.1.3 | 215 214 * 216 215 * @see wp_oembed_add_provider() -
branches/5.4/src/wp-includes/class-wp-query.php
r54559 r64176 3061 3061 } 3062 3062 3063 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) {3064 /** This filter is documented in wp-includes/query.php */3065 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );3066 3067 /** This filter is documented in wp-includes/query.php */3068 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );3069 3070 /** This filter is documented in wp-includes/query.php */3071 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );3072 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';3073 3074 /** This filter is documented in wp-includes/query.php */3075 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );3076 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';3077 3078 /** This filter is documented in wp-includes/query.php */3079 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );3080 3081 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";3082 $comments = $wpdb->get_results( $comments_request );3083 // Convert to WP_Comment.3084 $this->comments = array_map( 'get_comment', $comments );3085 $this->comment_count = count( $this->comments );3086 }3087 3088 3063 // Check post status to determine if post should be displayed. 3089 3064 if ( ! empty( $this->posts ) && ( $this->is_single || $this->is_page ) ) { … … 3144 3119 } 3145 3120 3121 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) { 3122 /** This filter is documented in wp-includes/query.php */ 3123 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 3124 3125 /** This filter is documented in wp-includes/query.php */ 3126 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 3127 3128 /** This filter is documented in wp-includes/query.php */ 3129 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 3130 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 3131 3132 /** This filter is documented in wp-includes/query.php */ 3133 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 3134 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 3135 3136 /** This filter is documented in wp-includes/query.php */ 3137 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) ); 3138 3139 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; 3140 $comments = $wpdb->get_results( $comments_request ); 3141 // Convert to WP_Comment. 3142 $this->comments = array_map( 'get_comment', $comments ); 3143 $this->comment_count = count( $this->comments ); 3144 } 3145 3146 3146 // Put sticky posts at the top of the posts array. 3147 3147 $sticky_posts = get_option( 'sticky_posts' ); -
branches/5.4/src/wp-includes/post.php
r54559 r64176 4761 4761 do_action( 'transition_post_status', $new_status, $old_status, $post ); 4762 4762 4763 /** 4764 * Fires when a post is transitioned from one status to another. 4765 * 4766 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4767 * refer to the old and new post statuses, respectively. 4768 * 4769 * @since 2.3.0 4770 * 4771 * @param WP_Post $post Post object. 4772 */ 4773 do_action( "{$old_status}_to_{$new_status}", $post ); 4774 4775 /** 4776 * Fires when a post is transitioned from one status to another. 4777 * 4778 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4779 * refer to the new post status and post type, respectively. 4780 * 4781 * Please note: When this action is hooked using a particular post status (like 4782 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4783 * first transitioned to that status from something else, as well as upon 4784 * subsequent post updates (old and new status are both the same). 4785 * 4786 * Therefore, if you are looking to only fire a callback when a post is first 4787 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4788 * 4789 * @since 2.3.0 4790 * 4791 * @param int $post_id Post ID. 4792 * @param WP_Post $post Post object. 4793 */ 4794 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4763 $new_status_object = get_post_status_object( $new_status ); 4764 $old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status; 4765 $post_type_object = get_post_type_object( $post->post_type ); 4766 4767 if ( $new_status_object && $old_status_valid ) { 4768 /** 4769 * Fires when a post is transitioned from one status to another. 4770 * 4771 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4772 * refer to the old and new post statuses, respectively. 4773 * 4774 * @since 2.3.0 4775 * 4776 * @param WP_Post $post Post object. 4777 */ 4778 do_action( "{$old_status}_to_{$new_status}", $post ); 4779 } 4780 4781 if ( $new_status_object && $post_type_object ) { 4782 /** 4783 * Fires when a post is transitioned from one status to another. 4784 * 4785 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4786 * refer to the new post status and post type, respectively. 4787 * 4788 * Please note: When this action is hooked using a particular post status (like 4789 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4790 * first transitioned to that status from something else, as well as upon 4791 * subsequent post updates (old and new status are both the same). 4792 * 4793 * Therefore, if you are looking to only fire a callback when a post is first 4794 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4795 * 4796 * @since 2.3.0 4797 * 4798 * @param int $post_id Post ID. 4799 * @param WP_Post $post Post object. 4800 */ 4801 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4802 } 4795 4803 } 4796 4804 -
branches/5.4/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r60832 r64176 592 592 } 593 593 594 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {594 if ( ! empty( $request['sticky'] ) && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) { 595 595 return new WP_Error( 596 596 'rest_cannot_assign_sticky', … … 771 771 } 772 772 773 if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts) ) {773 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 ) ) ) { 774 774 return new WP_Error( 775 775 'rest_cannot_assign_sticky',
Note:
See TracChangeset
for help on using the changeset viewer.