Support » Plugin: Custom Content Type Manager » Relation field -> Hide other's Private posts

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor fireproofsocks


    That’s a bit tricky… you could filter on the “author” column (you’d have to customize the form so that parameter was visible:, but that still wouldn’t dynamically determine the current user’s ID. This would make a good feature request.

    Thanks for your reply, I appreciate.

    I eventually had to modify the plugin to get it work.

    Here’s what I did:

    File: custom-content-type-manager/ajax-controllers/get_posts.php
    I inserted my code before this line:

    $hash['content'] .= CCTM::parse($item_tpl, $r);

    // Rajesh Soni
    	// 08 March 2013
    	// Hide Private posts from other users (for non-admin users)
    	global $user_ID;
    	if( !current_user_can("administrator") && $r['post_status'] == 'private' && $r['post_author'] != $user_ID)

    That seemed to do the trick!

    — I can now ONLY see my own private posts
    — I can see everybody’s private posts if logged in as an administrator

    Let me know your thoughts.


    Plugin Contributor fireproofsocks


    If you took the time to hack the plugin, please take the time to file a feature request: your edits will be overwritten if/when you update the plugin to the next version.

    For sure, will do that.

    Do you think, this approach of mine is better, mass-usable?

    Just wondering, should this be reported as a Bug?
    I see no option for “Feature request”.


    Plugin Contributor fireproofsocks


    Report it as a bug — I can categorize it as a feature request later. Thanks.

    As for “mass-appeal” — I don’t know. I rely on feature requests for that. 😉


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Relation field -> Hide other's Private posts’ is closed to new replies.