• artilibere

    (@artilibere)


    I’ve added in my child theme a new taxonomy: “Project” to manage more then one project.

    I tried to use the filter “manage_edit-ticket_columns” to add the project name to the Ticket’s table but it’s overridden by “quality_manage_column_titles” (inc/tickets.php) so I’d to comment the row in the quality theme?

    Anyone knows if there was another way to override (or just add) a column in that table without modifying this great template?

    Thanks a lot,
    Carlo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter artilibere

    (@artilibere)

    I hacked the original quality-control/functions.php that way:


    #AFTER:
    define( ‘QC_INC_PATH’, get_template_directory() . ‘/inc’ );
    #ADD:
    define( ‘QC_INC_PATH_CHILD’, get_stylesheet_directory() . ‘/inc’ );


    #REPLACED:
    // Require other files, to keep things organized.
    require_once( QC_INC_PATH . ‘/options.php’ );
    require_once( QC_INC_PATH . ‘/tickets.php’ );
    require_once( QC_INC_PATH . ‘/updates.php’ );
    require_once( QC_INC_PATH . ‘/widgets/category-taxonomy.php’ );
    #WITH:
    // Require other files, to keep things organized.
    if(file_exists(QC_INC_PATH_CHILD . ‘/options.php’)) require_once( QC_INC_PATH_CHILD . ‘/options.php’);
    else require_once( QC_INC_PATH . ‘/options.php’ );
    if(file_exists(QC_INC_PATH_CHILD . ‘/tickets.php’)) require_once( QC_INC_PATH_CHILD . ‘/tickets.php’ );
    else require_once( QC_INC_PATH . ‘/tickets.php’ );
    if(file_exists(QC_INC_PATH_CHILD . ‘/updates.php’)) require_once( QC_INC_PATH_CHILD . ‘/updates.php’ );
    else require_once( QC_INC_PATH . ‘/updates.php’ );
    if(file_exists(QC_INC_PATH_CHILD . ‘/widgets/category-taxonomy.php’)) require_once( QC_INC_PATH_CHILD . ‘/widgets/category-taxonomy.php’ );
    else require_once( QC_INC_PATH . ‘/widgets/category-taxonomy.php’ );

    So I can override external files in my child theme.

    Spencer Finnell

    (@spencerfinnell)

    You need to remove the filter first, then re-add your own. I should really add my own filter to the list of columns. That would make it easier I think.

    It will be in the next version.

    Hopefully it will get to a point to where you don’t need to override any files, as everything will be hookable and filterable. But that will only happen once people really start trying to hack into it. ??

    Thread Starter artilibere

    (@artilibere)

    Sorry but I cannot get it.
    I tried as you specify in the head comment of your functions.php:

    add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );
    function my_child_theme_setup() {
    remove_filter( ‘manage_posts_custom_column’, ‘quality_manage_columns’ );
    add_filter( ‘manage_posts_custom_column’, ‘my_manage_columns’ );
    }

    but it neither remove the previous filter… where do I did wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Added a new Taxonomy’ is closed to new replies.