Subir ajustes de acordeon y SEO

This commit is contained in:
Gabriel
2026-10-23 11:18:13 -06:00
parent 03333c3ce7
commit 14b96152a5
103 changed files with 6638 additions and 5316 deletions
+27
View File
@@ -1462,6 +1462,33 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error( 403, __( 'Invalid post type.' ) );
}
// Reject writes to internal-only builtin post types (e.g. customize_changeset)
// whose intended write path is a dedicated helper, not a generic post API.
$is_internal_only = (
empty( $post_type->public )
&& empty( $post_type->show_in_rest )
&& ! empty( $post_type->_builtin )
);
/**
* Filters whether a post type accepts writes via XML-RPC.
*
* Defaults to false for internal-only builtin post types (public=false,
* show_in_rest=false, _builtin=true), such as customize_changeset, whose
* writes are meant to flow through dedicated helpers. Return true to opt
* a post type back in.
*
* @since 7.1.1
*
* @param bool $allowed Whether the post type accepts XML-RPC writes.
* @param WP_Post_Type $post_type The post type object.
*/
$allowed = apply_filters( 'xmlrpc_allow_post_type_writes', ! $is_internal_only, $post_type );
if ( ! $allowed ) {
return new IXR_Error( 403, __( 'Sorry, this post type is not supported over XML-RPC.' ) );
}
$update = ! empty( $post_data['ID'] );
if ( $update ) {