WordPress.org

Ready to get started?Download WordPress

Forums

bbPress Moderation
Help Needed! (1 post)

  1. mariz_p
    Member
    Posted 6 months ago #

    I am currently modifying the bbpress moderation plugin like adding a user notification, only the registered author can see his pending topic.

    Now I just need help for this, I want to show the pending posts to the profile area only. It would really be awkward if you will see your pending post in the most popular tabs or categories. I hope someone here can help contribute to this beautiful plugin.

    Below are my modified codes:

    function query($bbp) {
    
    		global $current_user, $post;
    
    		if (get_option(self::TD . 'always_display')) {
    			$post_author = wp_get_current_user();
    
    			if ( (current_user_can('moderate')) || (current_user_can('subscriber')) ) {
    
    					add_filter('posts_where', array($this, 'posts_where'));
    
    			} else{
    
    			}
    		}
    			else
    			{
    
    				// remove_filter('posts_where', array($this, 'posts_where'));
    			}
    
    		return $bbp;
    	}

    Now the add filter there is the reason why we see the pending posts. I am planning to just show it the topics created in the profile area of bbpress. I use the do_action( 'bbp_template_before_user_topics_created' ); to get it as a template and show it's result there but I guess I'm wrong.

    I hope you can help me.

    Thanks.

    http://wordpress.org/plugins/bbpressmoderation/

Reply

You must log in to post.

About this Plugin

About this Topic