mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-04 07:12:45 +08:00
Support ClassicPress News widget (#65)
Signed-off-by: xxsimoxx <simone@gieffeedizioni.it> Signed-off-by: Joe Dolson <design@joedolson.com> Co-authored-by: xxsimoxx <simone@gieffeedizioni.it> Co-authored-by: Joe Dolson <design@joedolson.com>
This commit is contained in:
parent
8978db5838
commit
e96b524535
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,10 @@ const EVENTS_API = 'https://api.fair.pm/fair/v1/events';
|
|||
* Bootstrap.
|
||||
*/
|
||||
function bootstrap() {
|
||||
// Support existing software like ClassicPress, which removes this feature.
|
||||
if ( ! function_exists( 'wp_print_community_events_markup' ) ) {
|
||||
return;
|
||||
}
|
||||
add_action( 'wp_ajax_get-community-events', __NAMESPACE__ . '\\get_community_events_ajax', 0 );
|
||||
remove_action( 'wp_ajax_get-community-events', 'wp_ajax_get_community_events', 1 );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue