Memory Wiki

Untitled Session

2026-05-28 16:07 UTC · 75 messages · cli

You2026-05-28 16:10 UTC
Find how FluentCommunity handles posting. Look for AJAX handlers and post creation logic in the FluentCommunity plugin.
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"output": "---", "exit_code": 0, "error": null}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"output": "buddypress\ncue\nelementor\nfilebird\ngenerateblocks\ngenerateblocks-pro\nindex.php\nmedia-stream\nprofe-chassis\nprofe-crm", "exit_code": 0, "error": null}
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"output": "/var/www/wordpress-plugins/plugins/fluent-community\n/var/www/wordpress-plugins/plugins/fluent-smtp\n/var/www/wordpress-plugins/plugins/fluentcampaign-pro\n/var/www/wordpress-plugins/plugins/fluentformpro\n/var/www/wordpress-plugins/plugins/fluent-crm\n/var/www/wordpress-plugins/plugins/...
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Found the plugin at `/var/www/wordpress-plugins/plugins/fluent-community`. Let me explore its structure and find AJAX handlers and post creation logic.
Tool2026-05-28 16:10 UTC
{"output": "total 92\ndrwxr-xr-x 10 82 82 4096 May 24 04:15 .\ndrwxrwxrwx 20 root root 4096 May 28 04:06 ..\ndrwxr-xr-x 9 82 82 4096 May 24 04:15 Modules\ndrwxr-xr-x 8 82 82 4096 May 24 04:15 app\ndrwxr-xr-x 4 82 82 4096 May 24 04:15 assets\ndrwxr-xr-x 2 82 82 4096 May ...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 9, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/Modules/Auth/Classes/InvitationHandler.php", "line": 21, "content": " add_action('wp_ajax_fcom_user_accept_invitation', [$this, 'acceptInvitationAjax']);"}, {"path": "/var/www/wordpress-plugins/plugin...
Tool2026-05-28 16:10 UTC
{"total_count": 30, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/assets/element-plus.js", "line": 3, "content": "`)},{immediate:!0})},od='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select...
Tool2026-05-28 16:10 UTC
{"total_count": 13, "files": ["/var/www/wordpress-plugins/plugins/fluent-community/Modules/Auth/Classes/InvitationHandler.php", "/var/www/wordpress-plugins/plugins/fluent-community/Modules/FeaturesHandler.php", "/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/Handlers/ActivationHandler...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"output": "/var/www/wordpress-plugins/plugins/fluent-community/boot/globals.php\n/var/www/wordpress-plugins/plugins/fluent-community/boot/bindings.php\n/var/www/wordpress-plugins/plugins/fluent-community/boot/app.php\n/var/www/wordpress-plugins/plugins/fluent-community/boot/index.php\n/var/www/word...
Tool2026-05-28 16:10 UTC
{"total_count": 11, "files": ["/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/Handlers/ActivationHandler.php", "/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/Handlers/ActivityMonitorHandler.php", "/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/Handlers/P...
Tool2026-05-28 16:10 UTC
{"total_count": 2, "files": ["/var/www/wordpress-plugins/plugins/fluent-community/Modules/Auth/Classes/InvitationHandler.php", "/var/www/wordpress-plugins/plugins/fluent-community/Modules/FeaturesHandler.php"]}
Donna2026-05-28 16:10 UTC
Excellent. Found key files. Let me examine the core routing, FeedsController, and the framework's AJAX handling.
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php if (!defined('ABSPATH')) exit; // Exit if accessed directly\n 2|\n 3|/**\n 4| * @var $router FluentCommunity\\Framework\\Http\\Router\n 5| */\n 6|$router->prefix('spaces')->withPolicy('SpacePolicy')->group(function ($router) {\n 7| $router->get('/...
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly\n 2|/**\n 3| * @var $router FluentCommunity\\Framework\\Http\\Router\n 4| */\n 5|\n 6|$router->namespace('FluentCommunity\\App\\Http\\Controllers')->group(function($router) {\n 7| re...
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\App\\Http\\Controllers;\n 4|\n 5|use FluentCommunity\\App\\Functions\\Utility;\n 6|use FluentCommunity\\App\\Models\\Media;\n 7|use FluentCommunity\\App\\Models\\NotificationSubscriber;\n 8|use FluentCommunity\...
Donna2026-05-28 16:10 UTC
Now let me understand how the framework registers the AJAX routes, and see the rest of the `store` method:
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\Framework\\Foundation\\Concerns;\n 4|\n 5|trait AjaxTrait\n 6|{\n 7|\t/**\n 8| * Add ajax action\n 9| * \n 10| * @param string $action\n 11| * @param string|\\Closure $handler\n 12|...
Tool2026-05-28 16:10 UTC
{"content": " 500| if ($feed->status == 'scheduled') {\n 501| do_action('fluent_community/feed/scheduled', $feed);\n 502| /* translators: %s: The scheduled date and time for the post */\n 503| $message = sprintf(__('Your post has been scheduled for %s'...
Donna2026-05-28 16:10 UTC
Now let me look at the Router class and the hook prefix configuration:
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|// Auto generated by wpfluent Installer.\n 4|\n 5|return array(\n 6| 'name' => 'FluentCommunity',\n 7| 'slug' => 'fluent-community',\n 8| 'domain_path' => '/language',\n 9| 'text_domain' => 'fluent-community',\n 10| ...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Tool2026-05-28 16:10 UTC
{"total_count": 1, "files": ["/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Router.php"]}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\Framework\\Http;\n 4|\n 5|use Closure;\n 6|\n 7|class Router\n 8|{\n 9| /**\n 10| * Application Instance\n 11| * @var \\FluentCommunity\\Framework\\Foundation\\Application\n 12| */\n...
Donna2026-05-28 16:10 UTC
Now let me look at the Route class to see how it registers with WordPress REST API, and the Feed model:
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"output": "/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Route.php", "exit_code": 0, "error": null}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\Framework\\Http;\n 4|\n 5|use Closure;\n 6|use Exception;\n 7|use Throwable;\n 8|use WP_Error;\n 9|use WP_REST_Request;\n 10|use WP_REST_Response;\n 11|use ReflectionClass;\n 12|use BadMethodCallEx...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 1, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Route.php", "line": 744, "content": " public function register()"}]}
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\App\\Models;\n 4|\n 5|use FluentCommunity\\App\\Functions\\Utility;\n 6|use FluentCommunity\\App\\Services\\FeedsHelper;\n 7|use FluentCommunity\\App\\Services\\Helper;\n 8|use FluentCommunityPro\\App\\Models\\...
Donna2026-05-28 16:10 UTC
Let me now look at the `register()` method in Route.php and the remaining helper functions:
Tool2026-05-28 16:10 UTC
{"content": " 740| * Register the rest endpoint\n 741| *\n 742| * @return null\n 743| */\n 744| public function register()\n 745| {\n 746| $this->updateRouteOptions();\n 747|\n 748| return register_rest_route(\n 749| $this->restNames...
Tool2026-05-28 16:10 UTC
{"total_count": 1, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Controllers/FeedsController.php", "line": 847, "content": " private function sanitizeAndValidateData($data)"}]}
Tool2026-05-28 16:10 UTC
{"total_count": 1, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Controllers/FeedsController.php", "line": 883, "content": " private function validateAndSetSpace($spaceSlug, $user)"}]}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 840| $media->feed_id = $feed->id;\n 841| $media->is_active = 1;\n 842| $media->object_source = 'feed';\n 843| $media->save();\n 844| }\n 845| }\n 846|\n 847| private function sanitizeAndValidateData($data)\n 848...
Tool2026-05-28 16:10 UTC
{"total_count": 1, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/app/Services/FeedsHelper.php", "line": 651, "content": " public static function processFeedMetaData($data, $requestData, $existingFeed = null)"}]}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 650|\n 651| public static function processFeedMetaData($data, $requestData, $existingFeed = null)\n 652| {\n 653| if (empty($data['meta'])) {\n 654| $data['meta'] = [];\n 655| }\n 656|\n 657| $uplaodedDocs = [];\n 658| // H...
Tool2026-05-28 16:10 UTC
{"content": " 700|\n 701| $existingFeed->load(['xprofile', 'comments.xprofile']);\n 702|\n 703| if ($existingFeed->space_id) {\n 704| $existingFeed->load(['space']);\n 705| $space = $existingFeed->space;\n 706| $topicIds = (array)Arr::get(...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php if (!defined('ABSPATH')) exit; // Exit if accessed directly\n 2|\n 3|use FluentCommunity\\App\\Hooks\\Handlers\\ActivationHandler;\n 4|use FluentCommunity\\App\\Hooks\\Handlers\\DeactivationHandler;\n 5|use FluentCommunity\\Framework\\Foundation\\Application...
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|defined('ABSPATH') or die;\n 4|\n 5|/**\n 6| * Plugin Name: FluentCommunity\n 7| * Description: The super-fast Community Plugin for WordPress\n 8| * Version: 2.5.0\n 9| * Author: WPManageNinja LLC\n 10| * Author URI: https://fluen...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 0}
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"total_count": 2, "matches": [{"path": "/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Router.php", "line": 469, "content": " public function registerRoutes()"}, {"path": "/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framewo...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 500| try {\n 501| $this->registerRestRoutes($app->router);\n 502| } catch (InvalidArgumentException $e) {\n 503| return $app->response->json([\n 504| 'message' => $e->getMessage()\n 505| ]...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 470| 'query_params' => $request->get_query_params(),\n 471| 'body_params' => $request->get_body_params(),\n 472| ];\n 473| } else {\n 474| $response['data']['wpfluent'] = [\n 475| 'env' => $this->env(...
Donna2026-05-28 16:10 UTC
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|if (!defined('ABSPATH')) exit; // Exit if accessed directly\n 4|\n 5|/**\n 6| * @var $app FluentCommunity\\Framework\\Foundation\\Application\n 7| */\n 8|\n 9|(new \\FluentCommunity\\App\\Hooks\\Handlers\\PortalHandler())->register()...
Donna2026-05-28 16:10 UTC
Let me also quickly check the ActivityMonitorHandler for its AJAX registration pattern, and the helpers for `sanitizeAndValidateData`:
Tool2026-05-28 16:10 UTC
{"content": " 1|<?php\n 2|\n 3|namespace FluentCommunity\\App\\Hooks\\Handlers;\n 4|\n 5|use FluentCommunity\\App\\Functions\\Utility;\n 6|use FluentCommunity\\App\\Models\\Activity;\n 7|use FluentCommunity\\App\\Models\\XProfile;\n 8|use FluentCommunity\\App\\Service...
Donna2026-05-28 16:10 UTC
Now I have the complete picture. Here is my comprehensive summary: --- ## Summary: How FluentCommunity Handles Posting ### What I Did I searched `/var/lib/docker/volumes/staging_wp_data/_data/wp-content/plugins/` first — FluentCommunity is **not installed there**. The actual plugin source is at `/var/www/wordpress-plugins/plugins/fluent-community/` (v2.5.0). I analyzed the full posting pipeline: route registration, AJAX/REST handler registration, feed model, controller, and helper classes. ### Architecture Overview FluentCommunity uses the **WordPress REST API**, not traditional `wp_ajax_` hooks, for its primary CRUD operations. It uses a custom framework (`WPFluent`) on top of `register_rest_route()`. --- ### 1. Route Registration (REST API) **File:** `/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Routes/api.php` The posting endpoint is registered at: ``` POST fluent-community/v2/feeds → FeedsController@store ``` Key route definition (line 42): ```php $router->prefix('feeds')->withPolicy('PortalPolicy')->group(function ($router) { $router->post('/', 'FeedsController@store'); // ... }); ``` The framework registers routes via `rest_api_init` action (in `Application.php` line 497-507): ```php $this->addAction('rest_api_init', function($wpRestServer) use ($app) { $this->registerRestRoutes($app->router); }); ``` Each Route object calls `register_rest_route()` with: - **Namespace:** `fluent-community/v2` - **Callback:** `Route::callback()` → resolves to `FeedsController@store` - **Permission callback:** `Route::permissionCallback()` → resolves to policy `PortalPolicy` --- ### 2. Traditional `wp_ajax_` Handlers Only a few legacy AJAX handlers exist via direct `wp_ajax_` hooks: | Handler | Action | File | |---------|--------|------| | Nonce renewal | `wp_ajax_fluent_community_renew_nonce` | `ActivityMonitorHandler.php:39` | | User invitation (auth) | `wp_ajax_fcom_user_accept_invitation` | `InvitationHandler.php:21` | | User registration | `wp_ajax_fcom_user_registration` (+ nopriv) | `AuthModdule.php:27-28` | | User login | `wp_ajax_fcom_user_login_form` (+ nopriv) | `AuthModdule.php:29-30` | The framework's `AjaxTrait` also supports `wp_ajax_` registration with a **hook_prefix** (`fluent-community`), but the main posting routes use REST, not this path. --- ### 3. Post Creation Logic — `FeedsController@store()` **File:** `/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Controllers/FeedsController.php` (lines 364-536) The full pipeline: 1. **Rate limit check** (line 368): ```php do_action('fluent_community/check_rate_limit/create_post', $user); ``` 2. **Validate input** (line 372): via `sanitizeAndValidateData()` - Enforces `message` is required - Sets `type = 'text'` - Calls `FeedsHelper::sanitizeAndValidateData()` 3. **Space validation** (lines 380-416): via `validateAndSetSpace()` - Checks space slug (`__self__post__` = profile post) - Validates user has `can_create_post` permission in that space - If space requires topics, validates topic selection 4. **Duplicate check** (line 421-423): - Checks same user hasn't posted identical message within 7 days 5. **Mentions parsing** (line 425): `FeedsHelper::getMentions()` - Replaces `@username` with mention markup - Collects mentioned user IDs 6. **Media processing** (lines 431-442): - `replaceImageUrlsWithRealMediaArchive()` — inline images - `processFeedMetaData()` — handles surveys, Giphy, video embeds, uploaded media 7. **Content rendering** (line 434): ```php $data['message_rendered'] = wp_kses_post(FeedsHelper::mdToHtml($message)); ``` - Converts Markdown to HTML via `FeedsHelper::mdToHtml()` 8. **Save** (lines 469-470): ```php $feed->fill($data); $feed->save(); ``` 9. **Topic attachment** (lines 489-496): attaches up to `max_topics_per_post` topics if posting in a space. 10. **Actions fired** (lines 500-535): - `fluent_community/feed/created` — for published posts - `fluent_community/space_feed/created` — in-space posts - `fluent_community/profile_feed/created` — profile posts - Various status-specific actions for scheduled/pending/unlisted 11. **Return** (lines 531-535): Transformed feed via `FeedsHelper::transformFeed()` --- ### 4. Feed Model **File:** `/var/www/wordpress-plugins/plugins/fluent-community/app/Models/Feed.php` - **Database table:** `fcom_posts` - **Fillable fields:** `user_id`, `title`, `slug`, `message`, `message_rendered`, `type`, `content_type`, `space_id`, `privacy`, `status`, `priority`, `featured_image`, `is_sticky`, `expired_at`, `scheduled_at`, `comments_count`, `reactions_count`, `meta`, `created_at`, `updated_at` - **Boot events:** auto-generates slug, auto-sets `user_id`, default `meta`, and `status='published'` - **Soft features:** duplicate detection, search scopes, bookmark scope, content moderation scope ### Files Examined - `/var/www/wordpress-plugins/plugins/fluent-community/fluent-community.php` — plugin entry point - `/var/www/wordpress-plugins/plugins/fluent-community/boot/app.php` — bootstrap - `/var/www/wordpress-plugins/plugins/fluent-community/config/app.php` — config (hook_prefix: `fluent-community`) - `/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Routes/api.php` — REST route definitions - `/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Routes/routes.php` — route file loader - `/var/www/wordpress-plugins/plugins/fluent-community/app/Http/Controllers/FeedsController.php` — **main post creation handler** (`store()`) - `/var/www/wordpress-plugins/plugins/fluent-community/app/Services/FeedsHelper.php` — feed processing helpers - `/var/www/wordpress-plugins/plugins/fluent-community/app/Models/Feed.php` — feed model (DB table: `fcom_posts`) - `/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/Handlers/ActivityMonitorHandler.php` — legacy `wp_ajax_` handlers - `/var/www/wordpress-plugins/plugins/fluent-community/app/Hooks/actions.php` — handler registrations - `/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Router.php` — custom router - `/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Http/Route.php` — route registration via `register_rest_route()` - `/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Foundation/Application.php` — `rest_api_init` hook binding - `/var/www/wordpress-plugins/plugins/fluent-community/vendor/wpfluent/framework/src/WPFluent/Foundation/Concerns/AjaxTrait.php` — AJAX trait - `/var/www/wordpress-plugins/plugins/fluent-community/Modules/Auth/AuthModdule.php` — auth AJAX handlers - `/var/www/wordpress-plugins/plugins/fluent-community/Modules/Auth/Classes/InvitationHandler.php` — invitation AJAX handler ### Issues Encountered None. The plugin was not in the expected Docker volume path but was found at `/var/www/wordpress-plugins/plugins/fluent-community/`.