Changeset 64175
- Timestamp:
- 10/06/2026 05:42:29 PM (5 weeks ago)
- Location:
- branches/5.5
- 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.5
- Property svn:mergeinfo changed
/trunk merged: 64127-64128,64130-64133
- Property svn:mergeinfo changed
-
branches/5.5/src/js/_enqueues/admin/common.js
r48925 r64175 672 672 link.parent('li').addClass('active'); 673 673 674 panel = $( link.attr('href') );674 panel = $( document ).find( link.attr('href') ); 675 675 676 676 // Panels. -
branches/5.5/src/wp-includes/class-http.php
r48630 r64175 994 994 // Strip all /path/../ out of the path. 995 995 while ( strpos( $path, '../' ) > 1 ) { 996 $path = preg_replace( '![^/]+/\.\./!', '', $path ); 996 $path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count ); 997 if ( 0 === $segment_replacement_count ) { 998 break; 999 } 997 1000 } 998 1001 -
branches/5.5/src/wp-includes/class-wp-oembed.php
r49361 r64175 74 74 '#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ), 75 75 '#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ), 76 '#https?://(.+\.)?imgur\.com/.*#i' => array( 'https://api.imgur.com/oembed', true ),77 76 '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i' => array( 'https://api.meetup.com/oembed', true ), 78 77 '#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'https://issuu.com/oembed_wp', true ), … … 145 144 * | Flickr | flic.kr | 3.6.0 | 146 145 * | Spotify | spotify.com | 3.6.0 | 147 * | Imgur | imgur.com | 3.9.0 |148 146 * | Meetup.com | meetup.com | 3.9.0 | 149 147 * | Meetup.com | meetu.ps | 3.9.0 | … … 201 199 * | Instagram TV | instagr.am | 5.1.0 | 5.5.2 | 202 200 * | Facebook | facebook.com | 4.7.0 | 5.5.2 | 201 * | Imgur | imgur.com | 3.9.0 | 7.1.3 | 203 202 * 204 203 * @see wp_oembed_add_provider() -
branches/5.5/src/wp-includes/class-wp-query.php
r54556 r64175 3072 3072 } 3073 3073 3074 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) {3075 /** This filter is documented in wp-includes/query.php */3076 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );3077 3078 /** This filter is documented in wp-includes/query.php */3079 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );3080 3081 /** This filter is documented in wp-includes/query.php */3082 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );3083 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';3084 3085 /** This filter is documented in wp-includes/query.php */3086 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );3087 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';3088 3089 /** This filter is documented in wp-includes/query.php */3090 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );3091 3092 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";3093 $comments = $wpdb->get_results( $comments_request );3094 // Convert to WP_Comment.3095 $this->comments = array_map( 'get_comment', $comments );3096 $this->comment_count = count( $this->comments );3097 }3098 3099 3074 // Check post status to determine if post should be displayed. 3100 3075 if ( ! empty( $this->posts ) && ( $this->is_single || $this->is_page ) ) { … … 3155 3130 } 3156 3131 3132 if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) { 3133 /** This filter is documented in wp-includes/query.php */ 3134 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 3135 3136 /** This filter is documented in wp-includes/query.php */ 3137 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 3138 3139 /** This filter is documented in wp-includes/query.php */ 3140 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 3141 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 3142 3143 /** This filter is documented in wp-includes/query.php */ 3144 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 3145 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 3146 3147 /** This filter is documented in wp-includes/query.php */ 3148 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) ); 3149 3150 $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; 3151 $comments = $wpdb->get_results( $comments_request ); 3152 // Convert to WP_Comment. 3153 $this->comments = array_map( 'get_comment', $comments ); 3154 $this->comment_count = count( $this->comments ); 3155 } 3156 3157 3157 // Put sticky posts at the top of the posts array. 3158 3158 $sticky_posts = get_option( 'sticky_posts' ); -
branches/5.5/src/wp-includes/post.php
r54556 r64175 4907 4907 do_action( 'transition_post_status', $new_status, $old_status, $post ); 4908 4908 4909 /** 4910 * Fires when a post is transitioned from one status to another. 4911 * 4912 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4913 * refer to the old and new post statuses, respectively. 4914 * 4915 * @since 2.3.0 4916 * 4917 * @param WP_Post $post Post object. 4918 */ 4919 do_action( "{$old_status}_to_{$new_status}", $post ); 4920 4921 /** 4922 * Fires when a post is transitioned from one status to another. 4923 * 4924 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4925 * refer to the new post status and post type, respectively. 4926 * 4927 * Please note: When this action is hooked using a particular post status (like 4928 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4929 * first transitioned to that status from something else, as well as upon 4930 * subsequent post updates (old and new status are both the same). 4931 * 4932 * Therefore, if you are looking to only fire a callback when a post is first 4933 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4934 * 4935 * @since 2.3.0 4936 * 4937 * @param int $post_id Post ID. 4938 * @param WP_Post $post Post object. 4939 */ 4940 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4909 $new_status_object = get_post_status_object( $new_status ); 4910 $old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status; 4911 $post_type_object = get_post_type_object( $post->post_type ); 4912 4913 if ( $new_status_object && $old_status_valid ) { 4914 /** 4915 * Fires when a post is transitioned from one status to another. 4916 * 4917 * The dynamic portions of the hook name, `$new_status` and `$old status`, 4918 * refer to the old and new post statuses, respectively. 4919 * 4920 * @since 2.3.0 4921 * 4922 * @param WP_Post $post Post object. 4923 */ 4924 do_action( "{$old_status}_to_{$new_status}", $post ); 4925 } 4926 4927 if ( $new_status_object && $post_type_object ) { 4928 /** 4929 * Fires when a post is transitioned from one status to another. 4930 * 4931 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`, 4932 * refer to the new post status and post type, respectively. 4933 * 4934 * Please note: When this action is hooked using a particular post status (like 4935 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is 4936 * first transitioned to that status from something else, as well as upon 4937 * subsequent post updates (old and new status are both the same). 4938 * 4939 * Therefore, if you are looking to only fire a callback when a post is first 4940 * transitioned to a status, use the {@see 'transition_post_status'} hook instead. 4941 * 4942 * @since 2.3.0 4943 * 4944 * @param int $post_id Post ID. 4945 * @param WP_Post $post Post object. 4946 */ 4947 do_action( "{$new_status}_{$post->post_type}", $post->ID, $post ); 4948 } 4941 4949 } 4942 4950 -
branches/5.5/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r60831 r64175 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.