Skip to content

Instantly share code, notes, and snippets.

@JKring
Created December 10, 2012 22:46
Show Gist options
  • Save JKring/4254026 to your computer and use it in GitHub Desktop.
Save JKring/4254026 to your computer and use it in GitHub Desktop.
Make EM attributes accessible
register_meta('post', '_location_name', 'custom_sanitize_as_is', 'custom_auth_always_allow');
register_meta('post', '_event_name', '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