Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better removal of workflow states
  • Loading branch information
benbalter committed Sep 25, 2011
1 parent 202a510 commit fe115ee
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions remove-workflow-states.php
@@ -1,13 +1,15 @@
<?php
/*
Plugin Name: Remove Workflow State
Plugin URI:
Plugin Name: WP Document Revisions - Remove Workflow State
Plugin URI: https://github.com/benbalter/WP-Document-Revisions-Code-Cookbook
Description: Removes Workflow State Taxonomy from Documents
Version: 1.0
Author: Benjamin J. Balter
Author URI: http://ben.balter.com
License: GPL2
*/


function wpdr_remove_workflow_init_hooks() {
if ( !class_exists( 'Document_Revisions' ) )
return;
Expand All @@ -21,10 +23,10 @@ function wpdr_remove_workflow_admin_hooks() {
if ( !class_exists( 'Document_Revisions' ) )
return;

$wpdr = Document_Revisions::$instance;
remove_filter( 'manage_edit-document_columns', array( &$wpdr, 'add_workflow_state_column' ) );
remove_action( 'manage_document_posts_custom_column', array( &$wpdr, 'workflow_state_column_cb' ) );
remove_action( 'save_post', array( &$wpdr, 'workflow_state_save' ) );
$wpdra = Document_Revisions::$instance->admin;
remove_filter( 'manage_edit-document_columns', array( &$wpdra, 'add_workflow_state_column' ) );
remove_action( 'manage_document_posts_custom_column', array( &$wpdra, 'workflow_state_column_cb' ) );
remove_action( 'save_post', array( &$wpdra, 'workflow_state_save' ) );

}

Expand All @@ -33,5 +35,5 @@ function wpdr_remove_workflow_metabox() {
}

add_action( 'plugins_loaded', 'wpdr_remove_workflow_init_hooks' );
add_action( 'admin_init', 'wpdr_remove_workflow_admin_hooks' );
add_action( 'admin_init', 'wpdr_remove_workflow_admin_hooks', 0);
add_action( 'document_edit', 'wpdr_remove_workflow_metabox' );

0 comments on commit fe115ee

Please sign in to comment.