admin管理员组文章数量:1026989
Request generated by fullcalendar js, which implemented by plugin WP FullCalendar (github link for code)
Request url:
http://sitename/admin-ajax.php?action=WP_FullCalendar&type=event&month=2&year=2019&start=2019-02-25&end=2019-04-08&_=1553274882245
Plugin contain following code:
add_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax') );
So i figured out that request should be handled by WP_FullCalendar::ajax
method, but then i edit it directly nothing changes. I tried log some debug info into file, but seem like this method not running at all (init method still running). All caches are turned off. Author of plugin not responding.
I want to apply the_title
filter on titles of events, so it will be translated by WPMultilang plugin.
What should i do to achieve this?
Request generated by fullcalendar js, which implemented by plugin WP FullCalendar (github link for code)
Request url:
http://sitename/admin-ajax.php?action=WP_FullCalendar&type=event&month=2&year=2019&start=2019-02-25&end=2019-04-08&_=1553274882245
Plugin contain following code:
add_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax') );
So i figured out that request should be handled by WP_FullCalendar::ajax
method, but then i edit it directly nothing changes. I tried log some debug info into file, but seem like this method not running at all (init method still running). All caches are turned off. Author of plugin not responding.
I want to apply the_title
filter on titles of events, so it will be translated by WPMultilang plugin.
What should i do to achieve this?
Share Improve this question asked Mar 22, 2019 at 17:31 Only minusOnly minus 12 bronze badges1 Answer
Reset to default -1WP_Fullcalendar::ajax
overrided by WP_EventsManager
plugin in file em-wpfc.php
, if wpfc and wpem used in combination.
Here is my final code in functions.php
/**
* Translate WP_Fullcalendar titles for events
* @param $items
* @return array
*/
function wp_fc_translate($items)
{
foreach ($items as &$item) {
$item['title'] = apply_filters('the_title', $item['title']);
}
return $items;
}
add_action('wpfc_events', 'wp_fc_translate');
Request generated by fullcalendar js, which implemented by plugin WP FullCalendar (github link for code)
Request url:
http://sitename/admin-ajax.php?action=WP_FullCalendar&type=event&month=2&year=2019&start=2019-02-25&end=2019-04-08&_=1553274882245
Plugin contain following code:
add_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax') );
So i figured out that request should be handled by WP_FullCalendar::ajax
method, but then i edit it directly nothing changes. I tried log some debug info into file, but seem like this method not running at all (init method still running). All caches are turned off. Author of plugin not responding.
I want to apply the_title
filter on titles of events, so it will be translated by WPMultilang plugin.
What should i do to achieve this?
Request generated by fullcalendar js, which implemented by plugin WP FullCalendar (github link for code)
Request url:
http://sitename/admin-ajax.php?action=WP_FullCalendar&type=event&month=2&year=2019&start=2019-02-25&end=2019-04-08&_=1553274882245
Plugin contain following code:
add_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax') );
So i figured out that request should be handled by WP_FullCalendar::ajax
method, but then i edit it directly nothing changes. I tried log some debug info into file, but seem like this method not running at all (init method still running). All caches are turned off. Author of plugin not responding.
I want to apply the_title
filter on titles of events, so it will be translated by WPMultilang plugin.
What should i do to achieve this?
Share Improve this question asked Mar 22, 2019 at 17:31 Only minusOnly minus 12 bronze badges1 Answer
Reset to default -1WP_Fullcalendar::ajax
overrided by WP_EventsManager
plugin in file em-wpfc.php
, if wpfc and wpem used in combination.
Here is my final code in functions.php
/**
* Translate WP_Fullcalendar titles for events
* @param $items
* @return array
*/
function wp_fc_translate($items)
{
foreach ($items as &$item) {
$item['title'] = apply_filters('the_title', $item['title']);
}
return $items;
}
add_action('wpfc_events', 'wp_fc_translate');
本文标签: pluginsHow to change response of adminajax request
版权声明:本文标题:plugins - How to change response of admin-ajax request? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745658637a2161751.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论