The members members delete post roles function.
Published Date - July 31, 2023
Deletes all of a post's access roles.
members_delete_post_roles( $post_id );
$post_id
The following example is for adding a hook callback.
if ( !function_exists( 'members_delete_post_roles' ) ) {
require_once ABSPATH . PLUGINDIR . 'membersmembers/inc/functions-content-permissions.php';
}
// The input(s).
$post_id = null;
// NOTICE! Understand what this does before running.
$result = members_delete_post_roles( $post_id );
The function is defined in the following location(s).
members/inc/functions-content-permissions.php
function members_delete_post_roles( $post_id ) {
return delete_post_meta( $post_id, '_members_access_role' );
}