PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.2.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.2.0
2.2.0 2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 All 43 releases
← All changes | app/Hooks/filters.php +10 -0 1.13 → 2.2.0 View file →
@@ -1,8 +1,10 @@
1 1 <?php
2 2 //if accessed directly exit
3 3 if(!defined( 'ABSPATH' )) exit;
4 4
5 +use FluentBoards\App\Hooks\Handlers\RestLocaleHandler;
6 +
5 7 /**
6 8 * All registered filter's handlers should be in app\Hooks\Handlers,
7 9 * addFilter is similar to add_filter and addCustomFilter is just a
8 10 * wrapper over add_filter which will add a prefix to the hook name
@@ -18,4 +20,12 @@
18 20 $app->addCustomFilter('ajax_options_non_board_wordpress_users', 'TaskHandler@searchNonBoardWordpressUsers', 10, 3);
19 21 $app->addCustomFilter('ajax_options_crm_contacts', 'TaskHandler@searchContact', 10, 3);
20 22 $app->addCustomFilter('task_attachment_file_upload', 'FileHandler@handleUpload', 10, 1);
21 23 $app->addCustomFilter('wp_editor_media_file_upload', 'FileHandler@handleMediaFileUpload', 10, 1 );
24 +$app->addCustomFilter('board_find', 'BoardHandler@attachFolderToBoard', 10, 1);
25 +
26 +$restLocaleHandler = new RestLocaleHandler(
27 + $app->config->get('app.rest_namespace'),
28 + $app->config->get('app.rest_version')
29 +);
30 +$app->addFilter('rest_request_before_callbacks', [$restLocaleHandler, 'switchToUserLocale'], 1, 3);
31 +$app->addFilter('rest_request_after_callbacks', [$restLocaleHandler, 'restoreLocale'], PHP_INT_MAX, 3);