cladif
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Revisionize FunctionI tried this:
1- I removed the (publish_posts) feature from the Subscriber user role
2- I placed this code in my functions.php
add_action('save_post', 'submit_for_review_update', 25 ); function submit_for_review_update($post_id) { if (empty($post_id)) { return; } $post = get_post($post_id); if (!is_object($post)) { return; } if ($post->post_type=='revision') { return; } $current_user = wp_get_current_user(); if (in_array('author', $current_user->roles) && $post->post_status=='publish') { $my_post = array( 'ID' => $post_id, 'post_status' => 'pending', ); remove_action('save_post', 'submit_for_review_update', 25); wp_update_post($my_post); add_action('save_post', 'submit_for_review_update', 25); } }
Technically this works, now when a post is edited it is automatically sent as ‘Pending’
The problem now is that the edited post disappears from my theme until it is approved again.What I would need now is the status that the “Revisionize” plugin assigns, (Revision, Draft) so the old Post stays live and will be replaced when the new post is approved.
Forum: Developing with WordPress
In reply to: Revisionize FunctionThanks so much for the explanation..
Assuming that the one to review is a PostType and not a profile, how can I insert a call for review in the frontend?
——————
Example.
1) The user sends the Post from the frontend by filling out a Form, and waits for an admin to accept it to be Live.
(To do this I used Taxonomies and some Custom Fields) age, name, city etc …
In this way I built a profile page, but using a Post Type. Hope this makes sense !!! ??2) Once approved by the admin, the user has the option to edit the post and submit the review.
——————-* I managed to build Point 1
* I would like to understand how to do point 2, right now the changes
made ad post, they immediately become live. Instead I would have
need to moderate it before it goes Live.In this case I think that with the REVISIONIZE plugin it might be possible to create a revision?
Looking for an impossible solution !! ??
Forum: Plugins
In reply to: [Revision Manager TMC] Create Revision Button on PostHi,
I would be interested in the question of “caephil”
Is there a guide or can you please, point me a way on how to create a shortcode for this?Thanks.
Forum: Fixing WordPress
In reply to: Last Viewed PostFirst of all I would like to thank you very much for your availability!
In this way I can show “last seen posts” only for registered users on my site, right? I would need to show last posts seen to any user of the site, even unregistered.
I tried to achieve this through cookies, using the “setcookie” function in my post.php file and it seems to register cookies.
this is the cookie I set:
setcookie(“recent_views”, $taxonomy_profile, time()+3600); /* expire in 1 hour */the problem I have now is that I don’t know how to show results :/
Forum: Fixing WordPress
In reply to: Last Viewed PostUnfortunately this plugin doesn’t show pictures for me, but what I’d like to understand how to get the “last viewed” function without any plugins.