Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/*
Plugin Name: Custom Functionality Plugin
Description: Custom functionality specific for this site, regardless of the theme used.
Version: 1.0
Author: Example
Author URI: http://example.com
*/
/* =Unprotect certain custom fields
------------------------------------------------------------ */
register_meta( 'post', '_mf_write_panel_id', 'custom_sanitize_as_is', 'custom_auth_always_allow');
function custom_sanitize_as_is( $meta_value, $meta_key, $meta_type ) {
return $meta_value;
}
function custom_auth_always_allow( $allowed, $meta_key, $post_id, $user_id, $cap, $caps ) {
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.