Created
February 6, 2013 22:55
-
-
Save hugocf/4726663 to your computer and use it in GitHub Desktop.
Full custom functionality plugin example for:
http://wordpress.org/support/topic/how-can-i-change-protected-params-xmlrpc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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