• 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.

    https://www.ads-software.com/plugins/bbpressmoderation/

  • The topic ‘Help Needed!’ is closed to new replies.