Plugin Directory

Changeset 3339334


Ignore:
Timestamp:
08/05/2025 01:56:40 AM (8 months ago)
Author:
chamawp
Message:

readme.txt

Location:
chama/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • chama/trunk/assets/css/admin.css

    r3327875 r3339334  
    270270    color: #0a4b78;
    271271}
     272.chamawp_page_chama-settings #wpfooter {
     273    position: relative;
     274}
    272275
    273276.chama-test-mode-label {
  • chama/trunk/assets/css/frontend.css

    r3327875 r3339334  
    148148.chama-form input[type="url"],
    149149.chama-form textarea {
     150    box-sizing: border-box;
    150151    background-color: #FFF;
    151152    border: 1px solid var(--chama-content-text-color);
     
    163164    padding: 0 14px;
    164165
     166}
     167.chama-input-wrapper input[type="number"] {
     168  width: auto !important;
     169  flex: 1 1 auto;
    165170}
    166171
  • chama/trunk/inc/metaboxes.php

    r3327875 r3339334  
    1313
    1414    ];
    15     $excluded_post_types = ['chama_tier', 'chama_commission', 'chama_campaign', 'attachment', 'slide'];
     15    $excluded_post_types = ['chama_newsletter', 'chama_tier', 'chama_commission', 'chama_campaign', 'attachment', 'slide'];
    1616    $post_types          = get_post_types($args);
    1717    $filtered_post_types = array_diff($post_types, $excluded_post_types);
  • chama/trunk/inc/options.php

    r3327875 r3339334  
    800800
    801801        ];
    802         $excluded_post_types  = ['page', 'attachment', 'chama_tier', 'chama_commission', 'chama_campaign', 'slide'];
     802        $excluded_post_types  = ['page', 'attachment', 'chama_newsletter', 'chama_tier', 'chama_commission', 'chama_campaign', 'slide'];
    803803        $post_types           = get_post_types($args);
    804804        $filtered_post_types  = array_diff($post_types, $excluded_post_types);
     
    13101310
    13111311        //Require membership for commenting
    1312         $chama_require_mebership_for_comments_args = [
     1312        $chama_require_membership_for_comments_args = [
    13131313            'option'         => 'chama_require_mebership_for_comments',
    13141314            'checkbox_value' => 'yes',
     
    13171317        ];
    13181318
    1319         add_settings_field("chama_require_mebership_for_comments", "Commenting for members only", 'chama_checkbox_option_generator', $page_slug, "chama_protection_section", $chama_require_mebership_for_comments_args);
     1319        add_settings_field("chama_require_mebership_for_comments", "Commenting for members only", 'chama_checkbox_option_generator', $page_slug, "chama_protection_section", $chama_require_membership_for_comments_args);
    13201320        // phpcs:ignore PluginCheck.CodeAnalysis.SettingSanitization.register_settingDynamic
    13211321        register_setting($settings_group, "chama_require_mebership_for_comments", ['type' => 'string', 'sanitize_callback' => 'sanitize_text_field']);
     
    13381338
    13391339        ];
    1340         $excluded_post_types  = ['chama_tier', 'chama_commission', 'chama_campaign', 'attachment', 'slide'];
     1340        $excluded_post_types  = ['chama_newsletter', 'chama_tier', 'chama_commission', 'chama_campaign', 'attachment', 'slide', 'page'];
    13411341        $post_types           = get_post_types($args);
    13421342        $filtered_post_types  = array_diff($post_types, $excluded_post_types);
  • chama/trunk/inc/protection.php

    r3327875 r3339334  
    207207        }
    208208
     209        //check global restriction
     210        $post_option       = 'chama_' . $post_type . '_post_type';
     211        $global_post_level = get_option($post_option);
     212        $protected         = $global_post_level === '0' ? true : $global_post_level;
     213        if ($protected) {
     214            return [
     215                'post_level'   => $global_post_level,
     216                'is_protected' => true,
     217            ];
     218        }
     219
    209220        return [
    210221            'post_level'   => false,
     
    270281        global $post, $current_user;
    271282        $post_type           = get_post_type($post->ID);
    272         $excluded_post_types = ['chama_tier', 'chama_commission', 'chama_campaign', 'chama_donation', 'chama_fund', 'chama_com_order', 'chama_subscription', 'slide'];
     283        $excluded_post_types = ['chama_newsletter', 'chama_tier', 'chama_commission', 'chama_campaign', 'chama_donation', 'chama_fund', 'chama_com_order', 'chama_subscription', 'slide'];
    273284        if ($post && in_array($post->post_type, $excluded_post_types)) {
    274285            return $content;
     
    318329    function chama_restricted_content_message($post_level)
    319330    {
    320          // Enqueue the registered style
     331        // Enqueue the registered style
    321332        wp_enqueue_style('chama-protected-content');
    322333        ob_start();
     
    461472            if (! chama_can_user_access_post($post_level, $current_user->ID)) {
    462473                $chama_hide_content = true;
    463                 $metadata = '';
     474                $metadata           = '';
    464475                ob_start();
    465476                chama_restricted_content_message($post_level_formatted);
  • chama/trunk/readme.txt

    r3328342 r3339334  
    1 === ChamaWP - Monetize with donations, memberships, crowdfunding, commissions & restricted content ===
     1=== ChamaWP – Monetize With Donations, Memberships, Crowdfunding, Commissions & Restricted Content ===
    22Author: Leetoo
    33Contributors: chamawp
     
    77Tested up to: 6.8
    88Requires PHP: 7.4
    9 Stable tag: 1.0.5
     9Stable tag: 1.0.5b
    1010Text Domain: chama
    1111License: GPLv3 or later
     
    8181== Changelog ==
    8282
     83= 1.0.6 - 2025-08-04 =
     84* UPDATE: Added support for setting a global membership tier for Custom Post Types.
     85* FIX: Resolved styling issues for input fields on the front end and footer text in the admin dashboard.
     86
    8387= 1.0.5 - 2025-07-13 =
    8488* UPDATE: Improved logic on some functions to accomodate nonce checks.
Note: See TracChangeset for help on using the changeset viewer.