Changeset 56177
- Timestamp:
- 07/09/2023 08:15:03 PM (15 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark.php
r55398 r56177 405 405 case 'link_category': // array( ints ) 406 406 $value = array_map( 'absint', (array) $value ); 407 // We return here so that the categories aren't filtered. 408 // The 'link_category' filter is for the name of a link category, not an array of a link's link categories. 407 /* 408 * We return here so that the categories aren't filtered. 409 * The 'link_category' filter is for the name of a link category, not an array of a link's link categories. 410 */ 409 411 return $value; 410 412 -
trunk/src/wp-includes/canonical.php
r55988 r56177 47 47 } 48 48 49 // If we're not in wp-admin and the post has been published and preview nonce 50 // is non-existent or invalid then no need for preview in query. 49 /* 50 * If we're not in wp-admin and the post has been published and preview nonce 51 * is non-existent or invalid then no need for preview in query. 52 */ 51 53 if ( is_preview() && get_query_var( 'p' ) && 'publish' === get_post_status( get_query_var( 'p' ) ) ) { 52 54 if ( ! isset( $_GET['preview_id'] ) … … 690 692 $redirect_host_low = strtolower( $redirect['host'] ); 691 693 692 // Ignore differences in host capitalization, as this can lead to infinite redirects. 693 // Only redirect no-www <=> yes-www. 694 /* 695 * Ignore differences in host capitalization, as this can lead to infinite redirects. 696 * Only redirect no-www <=> yes-www. 697 */ 694 698 if ( $original_host_low === $redirect_host_low 695 699 || ( 'www.' . $original_host_low !== $redirect_host_low -
trunk/src/wp-includes/capabilities.php
r54891 r56177 173 173 174 174 break; 175 // edit_post breaks down to edit_posts, edit_published_posts, or 176 // edit_others_posts. 175 /* 176 * edit_post breaks down to edit_posts, edit_published_posts, or 177 * edit_others_posts. 178 */ 177 179 case 'edit_post': 178 180 case 'edit_page': … … 618 620 case 'upload_themes': 619 621 case 'update_core': 620 // Disallow anything that creates, deletes, or updates core, plugin, or theme files. 621 // Files in uploads are excepted. 622 /* 623 * Disallow anything that creates, deletes, or updates core, plugin, or theme files. 624 * Files in uploads are excepted. 625 */ 622 626 if ( ! wp_is_file_mod_allowed( 'capability_update_core' ) ) { 623 627 $caps[] = 'do_not_allow'; -
trunk/src/wp-includes/class-wp-admin-bar.php
r55580 r56177 314 314 } 315 315 316 // Add the root node. 317 // Clear it first, just in case. Don't mess with The Root. 316 /* 317 * Add the root node. 318 * Clear it first, just in case. Don't mess with The Root. 319 */ 318 320 $this->remove_node( 'root' ); 319 321 $this->add_node( … … 363 365 $default = $this->_get_node( $default_id ); 364 366 365 // The default group is added here to allow groups that are 366 // added before standard menu items to render first. 367 /* 368 * The default group is added here to allow groups that are 369 * added before standard menu items to render first. 370 */ 367 371 if ( ! $default ) { 368 // Use _set_node because add_node can be overloaded. 369 // Make sure to specify default settings for all properties. 372 /* 373 * Use _set_node because add_node can be overloaded. 374 * Make sure to specify default settings for all properties. 375 */ 370 376 $this->_set_node( 371 377 array( … … 386 392 $parent = $default; 387 393 388 // Groups in groups aren't allowed. Add a special 'container' node. 389 // The container will invisibly wrap both groups. 394 /* 395 * Groups in groups aren't allowed. Add a special 'container' node. 396 * The container will invisibly wrap both groups. 397 */ 390 398 } elseif ( 'group' === $parent->type && 'group' === $node->type ) { 391 399 $container_id = $parent->id . '-container'; … … 394 402 // We need to create a container for this group, life is sad. 395 403 if ( ! $container ) { 396 // Use _set_node because add_node can be overloaded. 397 // Make sure to specify default settings for all properties. 404 /* 405 * Use _set_node because add_node can be overloaded. 406 * Make sure to specify default settings for all properties. 407 */ 398 408 $this->_set_node( 399 409 array( … … 448 458 */ 449 459 final protected function _render( $root ) { 450 // Add browser classes. 451 // We have to do this here since admin bar shows on the front end. 460 /* 461 * Add browser classes. 462 * We have to do this here since admin bar shows on the front end. 463 */ 452 464 $class = 'nojq nojs'; 453 465 if ( wp_is_mobile() ) { -
trunk/src/wp-includes/class-wp-customize-control.php
r55276 r56177 608 608 $dropdown = str_replace( '<select', '<select ' . $this->get_link() . ' id="' . esc_attr( $input_id ) . '" ' . $describedby_attr, $dropdown ); 609 609 610 // Even more hacikly add auto-draft page stubs. 611 // @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call. See <https://github.com/xwp/wp-customize-posts/pull/250>. 610 /* 611 * Even more hacikly add auto-draft page stubs. 612 * @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call. 613 * See <https://github.com/xwp/wp-customize-posts/pull/250>. 614 */ 612 615 $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' ); 613 616 if ( $nav_menus_created_posts_setting && current_user_can( 'publish_pages' ) ) { -
trunk/src/wp-includes/class-wp-customize-manager.php
r55990 r56177 272 272 } 273 273 274 // The theme and messenger_channel should be supplied via $args, 275 // but they are also looked at in the $_REQUEST global here for back-compat. 274 /* 275 * The theme and messenger_channel should be supplied via $args, 276 * but they are also looked at in the $_REQUEST global here for back-compat. 277 */ 276 278 if ( ! isset( $args['theme'] ) ) { 277 279 if ( isset( $_REQUEST['customize_theme'] ) ) { … … 566 568 add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) ); 567 569 } else { 568 // If the requested theme is not the active theme and the user doesn't have 569 // the switch_themes cap, bail. 570 /* 571 * If the requested theme is not the active theme and the user doesn't have 572 * the switch_themes cap, bail. 573 */ 570 574 if ( ! current_user_can( 'switch_themes' ) ) { 571 575 $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) ); … … 906 910 public function wp_loaded() { 907 911 908 // Unconditionally register core types for panels, sections, and controls 909 // in case plugin unhooks all customize_register actions. 912 /* 913 * Unconditionally register core types for panels, sections, and controls 914 * in case plugin unhooks all customize_register actions. 915 */ 910 916 $this->register_panel_type( 'WP_Customize_Panel' ); 911 917 $this->register_panel_type( 'WP_Customize_Themes_Panel' ); … … 5270 5276 ); 5271 5277 5272 // Input type: checkbox. 5273 // With custom value. 5278 // Input type: checkbox, with custom value. 5274 5279 $this->add_control( 5275 5280 'display_header_text', … … 5294 5299 ); 5295 5300 5296 // Input type: color. 5297 // With sanitize_callback. 5301 // Input type: color, with sanitize_callback. 5298 5302 $this->add_setting( 5299 5303 'background_color', … … 5603 5607 ); 5604 5608 5605 // If the theme is using the default background callback, we can update 5606 // the background CSS using postMessage. 5609 /* 5610 * If the theme is using the default background callback, we can update 5611 * the background CSS using postMessage. 5612 */ 5607 5613 if ( get_theme_support( 'custom-background', 'wp-head-callback' ) === '_custom_background_cb' ) { 5608 5614 foreach ( array( 'color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment' ) as $prop ) { -
trunk/src/wp-includes/class-wp-editor.php
r56031 r56177 459 459 $key = array_search( 'spellchecker', $plugins, true ); 460 460 if ( false !== $key ) { 461 // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. 462 // It can be added with 'mce_external_plugins'. 461 /* 462 * Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. 463 * It can be added with 'mce_external_plugins'. 464 */ 463 465 unset( $plugins[ $key ] ); 464 466 } -
trunk/src/wp-includes/class-wp-embed.php
r55990 r56177 213 213 $this->last_attr = $attr; 214 214 215 // KSES converts & into & and we need to undo this. 216 // See https://core.trac.wordpress.org/ticket/11311 215 /* 216 * KSES converts & into & and we need to undo this. 217 * See https://core.trac.wordpress.org/ticket/11311 218 */ 217 219 $url = str_replace( '&', '&', $url ); 218 220 -
trunk/src/wp-includes/class-wp-image-editor-gd.php
r54226 r56177 325 325 */ 326 326 public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { 327 // If destination width/height isn't specified, 328 // use same as width/height from source. 327 /* 328 * If destination width/height isn't specified, 329 * use same as width/height from source. 330 */ 329 331 if ( ! $dst_w ) { 330 332 $dst_w = $src_w;
Note: See TracChangeset
for help on using the changeset viewer.