Skip to content

Instantly share code, notes, and snippets.

@hugocf
Created February 6, 2013 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hugocf/4726663 to your computer and use it in GitHub Desktop.
Save hugocf/4726663 to your computer and use it in GitHub Desktop.
<?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