Cancel post save

I’d hooked to ‘wp_insert_post_empty_content’ filter. See https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-includes/post.php#L2748 //hook at the very end of all filters to prevent other filters from overwriting your return value ( 99 should be high enaugh ) add_filter( ‘wp_insert_post_empty_content’, ‘my_cancel_post_save_function’, 99, 2 ); function my_cancel_post_save_function( $maybe_empty, $postarr ) { if ( true === wp_is_post_revision( $postarr[ ‘ID’ ] ) ) { //postarr … Read more

Custom post type Admin Page

1. The easiest way is to use the plugin “Admin Columns”, to show the picture in columns https://wordpress.org/plugins/codepress-admin-columns/ 2. You also can code your own admin page with the function add_submenu_page(). http://codex.wordpress.org/Function_Reference/add_submenu_page You can create a query, loop through the posts and show the pictures.

Removing fields from the Media Uploader/Gallery

You can do this via a filter. Add the following to functions.php. You can also add your own fields this way… // edit fields in media upload area add_filter(‘attachment_fields_to_edit’, ‘remove_media_upload_fields’, 10000, 2); function remove_media_upload_fields( $form_fields, $post ) { // remove unnecessary fields unset( $form_fields[‘image-size’] ); unset( $form_fields[‘post_excerpt’] ); unset( $form_fields[‘post_content’] ); unset( $form_fields[‘url’] ); unset( … Read more