-
AuthorPosts
-
April 19, 2015 at 8:06 pm #430926
Hey there, hope you’re well today..!
Please it is possible for you to implement something like the following code inside your Combo-Widget to prevent the comments-section to show ActionScheduler-entries? It’s tested and seems to work nice.. Thank You and best regards
Path —> /enfold/framework/php/class-framework-widgets.php
if (!function_exists('avia_get_comment_list')) { function avia_get_comment_list($avia_new_query) { $time_format = apply_filters( 'avia_widget_time', get_option('date_format')." - ".get_option('time_format'), 'avia_get_comment_list' ); global $avia_config; $comments = get_comments($avia_new_query); if(!empty($comments)) : echo '<ul class="news-wrap">'; foreach($comments as $comment) { if ($comment->comment_author != 'ActionScheduler') { $gravatar_alt = esc_html($comment->comment_author); echo '<li class="news-content">'; echo "<a class='news-link' title='".get_the_title($comment->comment_post_ID)."' href='".get_comment_link($comment)."'>"; echo "<span class='news-thumb'>"; echo get_avatar($comment,'48', '', $gravatar_alt); echo "</span>"; echo "<strong class='news-headline'>".avia_backend_truncate($comment->comment_content, 55," "); if($time_format) { echo "<span class='news-time'>".get_comment_date($time_format, $comment->comment_ID)." ".__('by','avia_framework')." ".$comment->comment_author."</span>"; } echo "</strong>"; echo "</a>"; echo '</li>'; } } echo "</ul>"; wp_reset_postdata(); endif; } }
April 20, 2015 at 6:31 pm #431488Hey Bruno!
You can add all of that to a child theme functions.php file so you do not have to redo it on each update.
Best regards,
ElliottApril 20, 2015 at 6:43 pm #431496Hey Elliot!
Sure I can do this, but I think it’s an improvement for other users too, if there are no tasks from ActionScheduler inside their comment-widget. So I think it’s better just to implement it inside the theme itself..?
Thank you, best regards,
Bruno
April 21, 2015 at 2:56 pm #432032Hey!
You can request for the feature and if enough votes are met, maybe, we can can add it in the future updates: https://kriesi.at/support/enfold-feature-requests/
Regards,
IsmaelApril 21, 2015 at 7:48 pm #432309Hello Ismael,
I’m a little bit confused now. This isn’t a feature request. I’ve sent you a fix for a given problem. I don’t think that anybody need messages from WordPress-ActionScheduler inside it`s comment-widget.
Inside ActionScheduler-Messages there are Infos about payments (Woo Subscriptions) or messages from sent emails to clients with Follow-Up-Emails and Sensei.Thank you, best regards.
April 22, 2015 at 4:50 pm #432945Hey!
I’m not sure what you mean by “WordPress-ActionScheduler”. Is it this plugin? https://wordpress.org/plugins/call-to-action-scheduler/
Is this related? https://wordpress.org/support/topic/actionscheduler-comment-on-every-post_id
Best regards,
Elliott- This reply was modified 9 years, 7 months ago by Elliott.
April 22, 2015 at 5:48 pm #433002Hello,
I think Scheduled Actions are very similar to cron-jobs. You can use them in plugins with
<?php wp_schedule_event($timestamp, $recurrence, $hook, $args); ?>
Woo – Subscriptions and Woo – Follow up Emails use them to handle their recurring actions.
If you install a plugin with this hook, below your “Tools” – Tab in the admin menu automatically appears a new section called “Scheduled Tabs”. It’s a new posttype similar to comments, but as you can see in the screenshot, they handle with sensitive datas.
If you don’t filter them out in a similar way I described in my first post, they appear in your combo-widget and anybody can see them. I think no one want this.
If you var_dump the output you can see that for every message the author for this widget is “ActionScheduler”. So I think it is a good way to filter them out.
Thank you, best regards
BrunoApril 22, 2015 at 5:49 pm #433004Here is a var_dump from one of it:
$comments array (3) object stdClass {38} public comment_ID -> string(4) "2975" public comment_post_ID -> string(4) "2924" public comment_author -> string(15) "ActionScheduler" public comment_author_email -> string(0) "" public comment_author_url -> string(0) "" public comment_author_IP -> string(0) "" public comment_date -> string(19) "2015-04-21 19:08:58" public comment_date_gmt -> string(19) "2015-04-21 17:08:58" public comment_content -> string(14) "action created" public comment_karma -> string(1) "0" public comment_approved -> string(1) "1" public comment_agent -> string(15) "ActionScheduler" public comment_type -> string(10) "action_log" public comment_parent -> string(1) "0" public user_id -> string(1) "0" public ID -> string(4) "2924" public post_author -> string(1) "0" public post_date -> string(19) "2015-04-30 15:06:39" public post_date_gmt -> string(19) "2015-04-30 13:06:39" public post_content -> string(45) "{"user_id":21,"subscription_key":"2880_2763"}" public post_title -> string(30) "scheduled_subscription_payment" public post_excerpt -> string(0) "" public post_status -> string(7) "pending" public comment_status -> string(4) "open" public ping_status -> string(4) "open" public post_password -> string(0) "" public post_name -> string(0) "" public to_ping -> string(0) "" public pinged -> string(0) "" public post_modified -> string(19) "2015-04-30 15:06:39" public post_modified_gmt -> string(19) "2015-04-30 13:06:39" public post_content_filtered -> string(0) "" public post_parent -> string(1) "0" public guid -> string (68) "http://our-domain.de/?post_type=scheduled-actio …" http://our-domain.de/?post_type=scheduled-action&p=2924 public menu_order -> string(1) "0" public post_type -> string(16) "scheduled-action" public post_mime_type -> string(0) "" public comment_count -> string(1) "1"
April 23, 2015 at 5:19 pm #433617Hey!
It seems like it’s plugin related though. We flagged this for Kriesi so please wait to hear from him.
Best regards,
Elliott- This reply was modified 9 years, 7 months ago by Elliott.
April 24, 2015 at 9:54 am #434000Sure it’s plugin related. They create a new sort of comments.
Thank you and best regards
BrunoApril 28, 2015 at 6:07 pm #436249 -
AuthorPosts
- The topic ‘Prevent ActionScheduler Comments inside your Combo Widget’ is closed to new replies.