Skip to content

Instantly share code, notes, and snippets.

@collegeman
Created May 7, 2012 15:53
Show Gist options
  • Select an option

  • Save collegeman/2628596 to your computer and use it in GitHub Desktop.

Select an option

Save collegeman/2628596 to your computer and use it in GitHub Desktop.
<?php
add_filter('sharepress_supported_post_types', '__my_sharepress_supported_post_types');
function __my_sharepress_supported_post_types($types) {
$types[] = 'bgmp';
return $types;
}
add_filter('filter_sharepress_meta', '__my_filter_sharepress_meta', 10, 3);
function __my_filter_sharepress_meta($meta, $post) {
if ($post->post_type == 'bgmp') {
// maybe make changes to $meta?, e.g...
$meta['message'] = "This is a custom message that overrides what is entered on the post editing screen";
}
return $meta;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment