WordPress.org

Ready to get started?Download WordPress

Forums

Custom Taxonomy Sort
conflicting "manage_{$name}_custom_column" functions (4 posts)

  1. Marc Steel
    Member
    Posted 2 years ago #

    I have a plugin applying a filter on the same custom column and they are in conflict, one of the columns comes in blank.

    Any advice on this situation?

    Thanks,

    Marc

    http://wordpress.org/extend/plugins/custom-taxonomy-sort/

  2. Marc Steel
    Member
    Posted 2 years ago #

    To be more specific, the loop in your add_taxonomy_actions is calling column_value(). I'm doing something similar and apparently only one will "win", depending on filter sort order. Any other custom columns return as false.

  3. Marc Steel
    Member
    Posted 2 years ago #

  4. Marc Steel
    Member
    Posted 2 years ago #

    Got it, the answer is pretty simple really...

    I switched the manage_{$name}_custom_column filter order on my plugin to higher number and added in the logic from your plugin.

    So the column_value() method on my plugin looks like this:

    function column_value( $empty = '', $custom_column, $term_id ) {
      if ( 'season' == $custom_column )
        return get_metadata($this->taxonomy, $term_id, 'season', true);
      if ( 'order' == $custom_column )
        return get_term_meta( $term_id, 'tax-order', true );
    }

    In closing, I learned a lot from your plugin and am using it's sorting functionality, thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic