Alex Howes
Forum Replies Created
-
AuthorPosts
-
Thanks for the tips Kiran 🙂 In case anyone else is interested in doing this, I’ve pasted my code below.
add_filter( 'comments_open', 'close_comments_to_author', 10, 2 ); function close_comments_to_author( $open, $post_id ) { $post = get_post( $post_id ); if ( geodir_is_page('detail') && is_user_logged_in() && geodir_get_current_posttype() == 'gd_place' ) { $current_user = wp_get_current_user()->ID; $post_author = $post->post_author; if ($current_user == $post_author) { $open = false; } else { $open = true; } } else { $open = false; } return $open; }
Ok, cool, thanks. Looking forward to V2! 😀
Guust- I had a look in there and unticked the option for reviewer filling in name and email addresses, but reviews are still not anonymous if the user is logged in.
Alex- Is there a filter I could use to blank user details in reviews on the server side? E.g. an action or filter that is called when a review is saved, which I could hook into and delete author information?
Ok, fair enough, thanks anyway 🙂
Did anyone get a chance to look at this?
Alex
Hi Kiran,
Thanks for your reply. I’ve had a look at the code- can I simply use the WP function wp_set_object_terms with $post_category set to an array containing the category ID?
Alex
Hi Stiofan and Alex,
I want to delete the listings programmatically rather than manually recover them from trash. I had a look through the CODEX documentation but couldn’t find anything relevant. Do you know how there might be a way?
I’ve not yet used the API, Alex. Would there be a way to do it like that? Could you suggest how? I’m a bit reluctant to use the API though because I don’t want the endpoint pages to be public.
Thanks,
AlexI was also wondering if there’s a GD function to check the category of a listing programmatically?
Hi Kor,
I have a form (separate to GD) and when it’s submitted I’d like to change the category of the user’s listing by specifying the listing ID. I’ve created the form and have written a php snippet to hook into the form submit action. I was wondering if you knew what GD function I could use to change the listing category programmatically. I considered using geodir_save_post_meta but the category field looked complicated, so I wasn’t sure.
Alex
Ah cool, thanks 🙂
I know this might sound like a stupid question, but how do I know if I’m using the API or not?
Cool, thanks! 🙂
Cool, great. Do you know if there’s a way I can find the html of my current email template? (Sorry, I’m quite new to all this!)
Hi Stiofan,
My site is a job and review site. My CPTS are farms, jobs, and resumes, where farms and jobs are linked. Like most job sites, when someone applies to a job the application is sent via a form to avoid displaying the email address publicly on the site. Workers can list resumes on my site and employers can pay to see their contact details, which are sent to them in an email (and not displayed publicly).
Although I’ve hidden all contact details on my site, I’m concerned about them being public in the JSON endpoints, partly because of the paying for contact details side of things, and partly because most people don’t want their contact details displayed publicly.
Alex
Great, thanks! 🙂
Hi Stiofan,
I agree that making non-personal data public is expected, but as for names, telephone numbers, email addresses, and possibly addresses, I think these ought to be protected. A lot of sites assure their users that they will never display contact details publicly, or at least offer the option to keep them hidden.
Is there a way to hide the JSON endpoint pages? Or to protect them with a password, or something?
Alex
-
AuthorPosts