This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Ninja Tables - Current Month Date Range Filter | |
| * | |
| * Automatically applies the current month date range | |
| * to a Ninja Tables custom date range filter on page load. | |
| * | |
| * Date Format: DD/MM/YYYY | |
| * | |
| * Example: | |
| * From Date: 01/06/2026 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| # Ninja Tables FooTable Pagination at Top | |
| Moves the existing FooTable pagination controls in Ninja Tables / Ninja Tables Pro from the table footer to above the table. | |
| This is intended for Ninja Tables using the default FooTable renderer. | |
| ## Usage | |
| 1. Add `JS` to the table's Custom JS field. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Temporary Fluent Forms workaround: | |
| // Preserve plus-addressed emails when passing email through redirect query string. | |
| add_filter('fluentform/submission_confirmation', function ($returnData, $form, $confirmation, $insertId = null, $formData = []) { | |
| $sourceFormId = 29; // Form #1 ID | |
| $emailFieldName = 'email'; // Form #1 email field name | |
| $queryKey = 'email'; // Redirect URL query key: ?email= | |
| if ((int) $form->id !== $sourceFormId || empty($returnData['redirectUrl'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!function_exists('fcom_snippet_pwa_portal_start_url')) { | |
| add_action('init', function () { | |
| $fcomPwa = isset($_GET['fcom_pwa']) ? sanitize_key($_GET['fcom_pwa']) : ''; | |
| if ($fcomPwa === 'manifest') { | |
| fcom_snippet_pwa_serve_manifest(); | |
| } | |
| if ($fcomPwa === 'sw') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('ninja_table_rendering_table_vars', function ($tableVars, $tableId) { | |
| if (empty($tableVars['provider']) || $tableVars['provider'] !== 'raw_sql') { | |
| return $tableVars; | |
| } | |
| if (empty($tableVars['render_type']) || $tableVars['render_type'] !== 'ajax_table') { | |
| return $tableVars; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * FluentCommunity Course Toggle (Collapsible Section) – Shortcode Snippet | |
| * | |
| * This snippet adds a simple collapsible / toggle (accordion-style) section | |
| * to FluentCommunity course lessons using a shortcode. | |
| * | |
| * ---------------------- | |
| * Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('fluent_community/leaderboard_api_response', function ($response, $xProfiles, $requestData) { | |
| if (empty($response['leaderboard']) || !is_array($response['leaderboard'])) { | |
| return $response; | |
| } | |
| foreach ($response['leaderboard'] as $groupIndex => $group) { | |
| if (empty($group['items']) || !is_array($group['items'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!defined('ABSPATH')) { | |
| return; | |
| } | |
| if (!class_exists('FCOM_Leaderboard_Optout_Profile_Field_Snippet')) { | |
| class FCOM_Leaderboard_Optout_Profile_Field_Snippet | |
| { | |
| const FIELD_SLUG = '_hide_from_leaderboard'; | |
| const GROUP_SLUG = '_privacy_settings'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Auto Welcome DM from Admin to New User (FluentCommunity Chat) | |
| */ | |
| defined('ABSPATH') || exit; | |
| add_action('user_register', function ($user_id) { | |
| // ---- CHANGE THESE TWO VALUES ---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('rest_pre_dispatch', function ($result, $server, $request) { | |
| // If another handler already returned something, respect it | |
| if (!empty($result)) { | |
| return $result; | |
| } |
NewerOlder