Plugin Directory

Changeset 3039873


Ignore:
Timestamp:
02/22/2024 06:18:13 PM (2 years ago)
Author:
aihimel
Message:

v1.4.2

Location:
wc-call-for-price
Files:
69 added
8 edited

Legend:

Unmodified
Added
Removed
  • wc-call-for-price/trunk/functions.php

    r2950927 r3039873  
    2626    }
    2727}
    28 
    2928
    3029/**
     
    9190    return ! empty( get_option( $option_name ) );
    9291}
     92
     93/**
     94 * @param $option_name
     95 * @param $compare_to
     96 * @param $echo
     97 *
     98 * @return void
     99 */
     100function wcp_is_checked( $option_name, $compare_to = Constants::ON, $echo = true ) {
     101    $value = get_option( $option_name, Constants::OFF );
     102    $result = $value === $compare_to;
     103    if ( $result ) {
     104        if ( $echo ) {
     105            echo 'checked';
     106        }
     107        return true;
     108    }
     109    return false;
     110}
  • wc-call-for-price/trunk/includes/AdminFormSave.php

    r2950927 r3039873  
    77
    88namespace WCPress\WCP;
    9 
    10 use Automattic\WooCommerce\Internal\DependencyManagement\ContainerException;
    119
    1210class AdminFormSave {
     
    6260        $this->update_checkbox( Constants::ONLY_EMPTY_PRICE );
    6361        $this->update_checkbox( Constants::SHOW_ON_ALL_PRODUCTS );
    64 
    65         $this->update_text( Constants::TEXT );
    6662    }
    6763
     
    7773     */
    7874    function save_button_settings( $form_slug ) {
     75        $this->update_checkbox( Constants::SHOW_TEXT );
     76        $this->update_text( Constants::TEXT );
     77
    7978        $this->update_checkbox( Constants::SHOW_PRESET_IMAGE );
    8079        $this->update_checkbox( Constants::SHOW_UPLOADED_IMAGE );
     
    191190        update_option( $input_name, $value );
    192191    }
    193 
    194192}
  • wc-call-for-price/trunk/includes/Constants.php

    r2950927 r3039873  
    1616    const SHOW_PRESET_IMAGE = 'wc_call_for_price__show_image';
    1717    const PRESET_IMAGE_NAME = 'wc_call_for_price__image';
     18    const SHOW_TEXT = 'wc_call_for_price__show_text';
    1819    const TEXT = 'wc_call_for_price__text';
    1920    const OFF = 'off';
     
    5556    const ADMIN_FORM_NONCE_ACTION = 'wcp_admin_field_nonce_action';
    5657
     58    // Default string
     59    const DEFAULT_BUTTON_TEXT = 'Call For Price';
     60
    5761}
  • wc-call-for-price/trunk/languages/wc-call-for-price.pot

    r2950927 r3039873  
    1 # Copyright (C) 2023 Aftabul Islam
     1# Copyright (C) 2024 WCPress
    22# This file is distributed under the GPLv3 or later.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WC Call For Price 1.3.0\n"
     5"Project-Id-Version: WC Call For Price 1.4.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-call-for-price\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-08-09T16:13:10+00:00\n"
     12"POT-Creation-Date: 2024-02-22T17:50:31+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.8.1\n"
     14"X-Generator: WP-CLI 2.9.0\n"
    1515"X-Domain: wc-call-for-price\n"
    1616
     
    2929
    3030#. Author of the plugin
    31 msgid "Aftabul Islam"
     31msgid "WCPress"
    3232msgstr ""
    3333
    3434#. Author URI of the plugin
    35 msgid "https://profiles.wordpress.org/aihimel"
    36 msgstr ""
    37 
    38 #: includes/AdminMenu.php:32
    39 msgid "WooCommerce Call For Price"
    40 msgstr ""
    41 
    42 #: includes/AdminMenu.php:33
    43 #: includes/Render.php:104
    44 #: includes/Render.php:118
    45 msgid "Call For Price"
    46 msgstr ""
    47 
    48 #: includes/AdminMenu.php:49
    49 msgid "You don't have permission to access this page"
    50 msgstr ""
    51 
    52 #: includes/AdminMenu.php:65
    53 msgid "Settings"
     35msgid "https://wcpress.net/wc-call-for-price-woocommerce-plugin"
    5436msgstr ""
    5537
     
    8769
    8870#: templates/admin/pages/action_settings.php:81
    89 #: templates/admin/pages/button_settings.php:127
    90 #: templates/admin/pages/general_settings.php:79
     71#: templates/admin/pages/button_settings.php:153
     72#: templates/admin/pages/general_settings.php:70
    9173#: templates/admin/pages/rules_settings.php:75
    9274msgid "Save Settings"
     
    9779msgstr ""
    9880
    99 #: templates/admin/pages/button_settings.php:25
     81#: templates/admin/pages/button_settings.php:26
     82msgid "Text"
     83msgstr ""
     84
     85#: templates/admin/pages/button_settings.php:31
     86msgid "Show Text"
     87msgstr ""
     88
     89#: templates/admin/pages/button_settings.php:41
     90msgid "Check to show only text on a simple html button."
     91msgstr ""
     92
     93#: templates/admin/pages/button_settings.php:44
     94msgid "Text To Show :"
     95msgstr ""
     96
     97#: templates/admin/pages/button_settings.php:46
     98msgid "Write here what you want to see on front end. Plain text or HTML."
     99msgstr ""
     100
     101#: templates/admin/pages/button_settings.php:51
    100102msgid "Select Image"
    101103msgstr ""
    102104
    103 #: templates/admin/pages/button_settings.php:27
     105#: templates/admin/pages/button_settings.php:53
    104106msgid "Show Image :"
    105107msgstr ""
    106108
    107 #: templates/admin/pages/button_settings.php:30
     109#: templates/admin/pages/button_settings.php:56
    108110msgid "Check this box if you want to select an image form some specific list of \"Call for price\" images."
    109111msgstr ""
    110112
    111 #: templates/admin/pages/button_settings.php:46
     113#: templates/admin/pages/button_settings.php:72
    112114msgid "Check any one form here."
    113115msgstr ""
    114116
    115 #: templates/admin/pages/button_settings.php:51
     117#: templates/admin/pages/button_settings.php:77
    116118msgid "Upload Image"
    117119msgstr ""
    118120
    119 #: templates/admin/pages/button_settings.php:53
     121#: templates/admin/pages/button_settings.php:79
    120122msgid "Show Uploaded Image :"
    121123msgstr ""
    122124
    123 #: templates/admin/pages/button_settings.php:55
     125#: templates/admin/pages/button_settings.php:81
    124126msgid "Check this box if you want to show your uploaded image."
    125127msgstr ""
    126128
    127 #: templates/admin/pages/button_settings.php:64
     129#: templates/admin/pages/button_settings.php:90
    128130msgid "Upload Your Image"
    129131msgstr ""
    130132
    131 #: templates/admin/pages/button_settings.php:74
     133#: templates/admin/pages/button_settings.php:100
    132134msgid "If you want to upload your custom image, upload here."
    133135msgstr ""
    134136
    135 #: templates/admin/pages/button_settings.php:80
     137#: templates/admin/pages/button_settings.php:106
    136138msgid "Button Attributes"
    137139msgstr ""
    138140
    139 #: templates/admin/pages/button_settings.php:91
     141#: templates/admin/pages/button_settings.php:117
    140142msgid "Button height in pixel"
    141143msgstr ""
    142144
    143 #: templates/admin/pages/button_settings.php:104
     145#: templates/admin/pages/button_settings.php:130
    144146msgid "Button width in pixel"
    145147msgstr ""
    146148
    147 #: templates/admin/pages/button_settings.php:117
     149#: templates/admin/pages/button_settings.php:143
    148150msgid "Button alt attribute text"
    149151msgstr ""
     
    183185#: templates/admin/pages/general_settings.php:60
    184186msgid "If checked, this will show call for price on all products."
    185 msgstr ""
    186 
    187 #: templates/admin/pages/general_settings.php:65
    188 msgid "Text"
    189 msgstr ""
    190 
    191 #: templates/admin/pages/general_settings.php:67
    192 msgid "Text To Show :"
    193 msgstr ""
    194 
    195 #: templates/admin/pages/general_settings.php:69
    196 msgid "Write here what you want to see on front end. Plain text or HTML."
    197187msgstr ""
    198188
  • wc-call-for-price/trunk/readme.txt

    r3032324 r3039873  
    55Tested up to: 6.4
    66WC requires at least: 5.0.0
    7 WC tested up to: 8.3
     7WC tested up to: 8.6
    88Requires PHP: 7.2
    9 Stable tag: 1.4.1
     9Stable tag: 1.4.2
    1010License: GPLv3 or later
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    126126== Changelog ==
    127127
    128 = 1.4.1 (6 February 2023)
     128- 1.4.2 (22 February 2023) =
     129* ✅ **Feature:** Now you will be able to show `text only` with links.
     130* 🪛 **Tweak:** Text to show is reorganized with button tab
     131
     132= 1.4.1 (6 February 2023) =
    129133* 🪛 **Tweak:** Button css theme conflict issue fixed
    130134
  • wc-call-for-price/trunk/templates/admin/pages/button_settings.php

    r2950927 r3039873  
    2222<form class="" method="POST" action="">
    2323    <?php wp_nonce_field( Constants::ADMIN_FORM_NONCE_ACTION, Constants::NONCE_FIELD_NAME ); ?>
     24
     25    <fieldset>
     26      <legend><?php esc_html_e( 'Text', 'wc-call-for-price' ); ?></legend>
     27      <div class="checkbox">
     28          <label
     29            for="<?php echo esc_attr( Constants::SHOW_TEXT ); ?>"
     30          >
     31              <?php esc_html_e( 'Show Text', 'wc-call-for-price' ); ?>
     32          </label>
     33          <input
     34              type="checkbox"
     35              <?php if(get_option(Constants::SHOW_TEXT, Constants::OFF) == Constants::ON) echo 'checked'; ?>
     36              id="<?php echo esc_attr( Constants::SHOW_TEXT ); ?>"
     37              name="<?php echo esc_attr( Constants::SHOW_TEXT ); ?>"
     38              class="wcp-rquery"
     39              data-uncheck="#wc_call_for_price__show_image"
     40          >
     41          <p class="help-block"><?php esc_html_e( 'Check to show only text on a simple html button.', 'wc-call-for-price'); ?></p>
     42      </div>
     43      <div class="form-group">
     44        <label for="wc_call_for_price__text"><?php esc_html_e( 'Text To Show :', 'wc-call-for-price' ); ?> </label>
     45        <input type="text" class="form-control" id="wc_call_for_price__text" name='wc_call_for_price__text' value='<?php echo esc_attr( get_option('wc_call_for_price__text') );?>'>
     46        <p class="help-block"><?php esc_html_e( 'Write here what you want to see on front end. Plain text or HTML.', 'wc-call-for-price'); ?></p>
     47      </div>
     48    </fieldset>
     49
    2450    <fieldset>
    2551        <legend><?php esc_html_e( 'Select Image', 'wc-call-for-price' ); ?></legend>
    2652        <div class="checkbox">
    2753            <label for='wc_call_for_price__show_image'><?php esc_html_e( 'Show Image :', 'wc-call-for-price' ); ?></label>
    28             <input type="checkbox" <?php if(get_option('wc_call_for_price__show_image') == 'on') echo 'checked'; ?> id='wc_call_for_price__show_image' name='wc_call_for_price__show_image'>
     54            <input class="wcp-rquery" type="checkbox" <?php if(get_option('wc_call_for_price__show_image') == 'on') echo 'checked'; ?> id='wc_call_for_price__show_image' name='wc_call_for_price__show_image'>
    2955            <p class="help-block">
    3056                <?php esc_html_e( 'Check this box if you want to select an image form some specific list of "Call for price" images.', 'wc-call-for-price' ); ?>
  • wc-call-for-price/trunk/templates/admin/pages/general_settings.php

    r2950927 r3039873  
    2121        <label for="activate"><?php esc_html_e( 'Activate', 'wc-call-for-price' ); ?>: </label>
    2222        <input
    23                 type="checkbox"
    24                 name="<?php echo esc_attr( Constants::WCP_ACTIVATE ); ?>"
    25                 id="activate"
    26                 value="<?php echo esc_attr( Constants::ON ); ?>"
    27                 <?php checked( get_option( Constants::WCP_ACTIVATE ), Constants::ON, true ) ?>
     23            type="checkbox"
     24            name="<?php echo esc_attr( Constants::WCP_ACTIVATE ); ?>"
     25            id="activate"
     26            value="<?php echo esc_attr( Constants::ON ); ?>"
     27            <?php checked( get_option( Constants::WCP_ACTIVATE ), Constants::ON, true ) ?>
    2828        />
    2929        <p class="help-block">
     
    6262    </fieldset>
    6363
    64     <fieldset>
    65         <legend><?php esc_html_e( 'Text', 'wc-call-for-price' ); ?></legend>
    66         <div class="form-group">
    67             <label for="wc_call_for_price__text"><?php esc_html_e( 'Text To Show :', 'wc-call-for-price' ); ?> </label>
    68             <input type="text" class="form-control" id="wc_call_for_price__text" name='wc_call_for_price__text' value='<?php echo esc_attr( get_option('wc_call_for_price__text') );?>'>
    69             <p class="help-block"><?php esc_html_e( 'Write here what you want to see on front end. Plain text or HTML.', 'wc-call-for-price'); ?></p>
    70         </div>
    71     </fieldset>
    72 
    7364    <button
    7465            type="submit"
  • wc-call-for-price/trunk/wc-call-for-price.php

    r3032324 r3039873  
    33 * Plugin Name: WC Call For Price
    44 * Plugin URI: http://www.wordpress.org/wc-call-for-price
    5  * Version: 1.4.1
     5 * Version: 1.4.2
    66 * Author: WCPress
    77 * Author URI: https://wcpress.net/wc-call-for-price-woocommerce-plugin
Note: See TracChangeset for help on using the changeset viewer.