Edit Flow
Story Budget empty categories (1 post)

  1. cjaimet
    Posted 3 years ago #

    I've noticed that regardless of the filters I apply, the story budget always shows all categories. I don't need to wade through empty categories especially when I've filtered them out. Is there a plan to hide these or add a toggle so I can hide them?

    I hacked the print_term function and moved the "if ( !empty( $posts ))" conditional so it surrounds all the HTML but I'm going to lose that when I upgrade the plugin next.

    Love the plugin, btw.

    function print_term( $term ) {
    		global $wpdb;
    		$posts = $this->get_posts_for_term( $term, $this->user_filters );
    		if ( !empty( $posts ) ):
    			// Don't display the message for $no_matching_posts
    			$this->no_matching_posts = false;
    	<div class="postbox<?php if ( !empty( $posts )) echo ' postbox-has-posts'; ?>">
    		<div class="handlediv" title="<?php _e( 'Click to toggle', 'edit-flow' ); ?>"><br /></div>
    		<h3 class='hndle'><span><?php echo esc_html( $term->name ); ?></span></h3>
    		<div class="inside">
    			<table class="widefat post fixed story-budget" cellspacing="0">
    						<?php foreach( (array)$this->term_columns as $key => $name ): ?>
    						<th scope="col" id="<?php echo esc_attr( sanitize_key( $key ) ); ?>" class="manage-column column-<?php echo esc_attr( sanitize_key( $key ) ); ?>" ><?php echo esc_html( $name ); ?></th>
    						<?php endforeach; ?>
    					foreach ($posts as $post)
    						$this->print_post( $post, $term );
    			<?php endif; ?>


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Edit Flow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic