Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from billerickson/patch-1
Browse files Browse the repository at this point in the history
Add filter to disable metabox on add form. Props @billerickson
  • Loading branch information
jtsternberg committed Jan 14, 2015
2 parents 42b3147 + 786d416 commit 059522e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Taxonomy_MetaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public function hooks() {

// Display our form data
add_action( $this->taxonomy .'_edit_form', array( $this, 'metabox_edit' ), 8, 2 );
add_action( $this->taxonomy .'_add_form_fields', array( $this, 'metabox_edit' ), 8, 2 );
if( apply_filters( 'taxonomy_metadata_display_on_' . $this->taxonomy . '_add_form', true ) )
add_action( $this->taxonomy .'_add_form_fields', array( $this, 'metabox_edit' ), 8, 2 );

// Save our form data
add_action( 'created_'. $this->taxonomy, array( $this, 'save_data' ) );
Expand Down

0 comments on commit 059522e

Please sign in to comment.