Skip to content
Browse files

better removal of workflow states

  • Loading branch information...
1 parent 202a510 commit fe115ee4c387b5280aeba7a34d15cb9b2e53e430 @benbalter committed Sep 25, 2011
Showing with 9 additions and 7 deletions.
  1. +9 −7 remove-workflow-states.php
View
16 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;
@@ -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' ) );
}
@@ -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.
Something went wrong with that request. Please try again.