Changeset 63715 for branches/4.7/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 09/17/2026 09:15:04 PM (6 hours ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 63656-63657,63659-63660,63665,63669,63672
- Property svn:mergeinfo changed
-
branches/4.7/src/wp-includes/class-wp-xmlrpc-server.php
r49399 r63715 1331 1331 return new IXR_Error( 403, __( 'Invalid post type.' ) ); 1332 1332 1333 // Reject writes to internal-only builtin post types (e.g. customize_changeset) 1334 // whose intended write path is a dedicated helper, not a generic post API. 1335 $is_internal_only = ( 1336 empty( $post_type->public ) 1337 && empty( $post_type->show_in_rest ) 1338 && ! empty( $post_type->_builtin ) 1339 ); 1340 1341 /** 1342 * Filters whether a post type accepts writes via XML-RPC. 1343 * 1344 * Defaults to false for internal-only builtin post types (public=false, 1345 * show_in_rest=false, _builtin=true), such as customize_changeset, whose 1346 * writes are meant to flow through dedicated helpers. Return true to opt 1347 * a post type back in. 1348 * 1349 * @since 7.1.1 1350 * 1351 * @param bool $allowed Whether the post type accepts XML-RPC writes. 1352 * @param WP_Post_Type $post_type The post type object. 1353 */ 1354 $allowed = apply_filters( 'xmlrpc_allow_post_type_writes', ! $is_internal_only, $post_type ); 1355 1356 if ( ! $allowed ) { 1357 return new IXR_Error( 403, __( 'Sorry, this post type is not supported over XML-RPC.' ) ); 1358 } 1359 1333 1360 $update = ! empty( $post_data['ID'] ); 1334 1361
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)