Changeset 63677
- Timestamp:
- 09/17/2026 05:57:46 PM (less than one hour ago)
- Location:
- branches/7.1
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/7.1
-
branches/7.1/src/wp-includes/class-wp-xmlrpc-server.php
r63006 r63677 1463 1463 } 1464 1464 1465 // Reject writes to internal-only builtin post types (e.g. customize_changeset) 1466 // whose intended write path is a dedicated helper, not a generic post API. 1467 $is_internal_only = ( 1468 empty( $post_type->public ) 1469 && empty( $post_type->show_in_rest ) 1470 && ! empty( $post_type->_builtin ) 1471 ); 1472 1473 /** 1474 * Filters whether a post type accepts writes via XML-RPC. 1475 * 1476 * Defaults to false for internal-only builtin post types (public=false, 1477 * show_in_rest=false, _builtin=true), such as customize_changeset, whose 1478 * writes are meant to flow through dedicated helpers. Return true to opt 1479 * a post type back in. 1480 * 1481 * @since 7.1.1 1482 * 1483 * @param bool $allowed Whether the post type accepts XML-RPC writes. 1484 * @param WP_Post_Type $post_type The post type object. 1485 */ 1486 $allowed = apply_filters( 'xmlrpc_allow_post_type_writes', ! $is_internal_only, $post_type ); 1487 1488 if ( ! $allowed ) { 1489 return new IXR_Error( 403, __( 'Sorry, this post type is not supported over XML-RPC.' ) ); 1490 } 1491 1465 1492 $update = ! empty( $post_data['ID'] ); 1466 1493
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)