Plugin Directory

Changeset 1661938


Ignore:
Timestamp:
05/22/2017 02:51:57 AM (9 years ago)
Author:
chithien175
Message:

update 1.0.5

Location:
wp-rest-api-contact
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-rest-api-contact/assets/readme.txt

    r1658982 r1661938  
    55Requires at least: 4.5
    66Tested up to: 4.7.4
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: MIT
    99License URI: http://opensource.org/licenses/MIT
     
    3333== Changelog ==
    3434
     35= 1.0.5 =
     36* New Page: NPA Tools .
     37
    3538= 1.0.4 =
    3639* Required token for API .
     
    4952
    5053== Upgrade Notice ==
     54
     55= 1.0.5 =
     56* New Page: NPA Tools .
    5157
    5258= 1.0.4 =
     
    7379- Show the list all subscribers.
    7480- Send mail to list all subscribers.
     81- Open / close modules of the WP REST API NPA plugin.
  • wp-rest-api-contact/trunk/includes/class.wprac-custom-controller.php

    r1658980 r1661938  
    2222        $instance = self::getInstance();
    2323
     24        $tools_options = get_option('wprac-tools-options-custom');
     25
    2426        /*********************
    2527         * Dang ky scripts
     
    3032
    3133        //========================
     34        // Run Tools Controller
     35        //========================
     36       
     37        WPRAC_Tools_Controller::run();
     38
     39        //========================
    3240        // Run API Contact
    3341        //========================
     42        if( $tools_options && $tools_options['wprac_contact_api'] == 'on' ){
     43            WPRAC_Api_Contact_Controller::run();
     44        }
    3445       
    35         WPRAC_Api_Contact_Controller::run();
    3646
    3747        //========================
    3848        // Run API Newsletter
    3949        //========================
    40        
    41         WPRAC_Api_Newsletter_Controller::run();
     50        if( $tools_options && $tools_options['wprac_newsletter_api'] == 'on' ){
     51            WPRAC_Api_Newsletter_Controller::run();
     52        }
    4253
    4354        return $instance;
     
    6677        }else{
    6778            update_option('wprac_plugin_version', WPRAC_VERSION);
     79        }
     80
     81        /*************************************
     82         *  Kiểm tra tools option
     83         *************************************/
     84        $tools_options = get_option('wprac-tools-options-custom');
     85        if(!$tools_options){
     86            add_option('wprac-tools-options-custom',array(
     87                'wprac_contact_api' => 'on',
     88                'wprac_newsletter_api' => 'on'
     89            ) );
    6890        }
    6991
     
    107129       
    108130        /**********************************
     131         * Hủy contact tools option
     132         **********************************/
     133        delete_option('wprac-tools-options-custom');
     134
     135        /**********************************
    109136         * Hủy contact config custom option
    110137         **********************************/
  • wp-rest-api-contact/trunk/readme.txt

    r1658980 r1661938  
    55Requires at least: 4.5
    66Tested up to: 4.7.4
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: MIT
    99License URI: http://opensource.org/licenses/MIT
     
    3333== Changelog ==
    3434
     35= 1.0.5 =
     36* New Page: NPA Tools .
     37
    3538= 1.0.4 =
    3639* Required token for API .
     
    4952
    5053== Upgrade Notice ==
     54
     55= 1.0.5 =
     56* New Page: NPA Tools .
    5157
    5258= 1.0.4 =
     
    7379- Show the list all subscribers.
    7480- Send mail to list all subscribers.
     81- Open / close modules of the WP REST API NPA plugin.
  • wp-rest-api-contact/trunk/wp-rest-api-npa.php

    r1658980 r1661938  
    55Description: Create REST API endpoint for Contact and Subscribe Newsletter, manager to list all contacts, manager to list all subscribe newsletter, send mail to the list all subscibers.
    66Author: Thien Pham, NPA
    7 Version: 1.0.4
     7Version: 1.0.5
    88Author URI: https://www.facebook.com/thien.pham.5074
    99Text Domain: tp-custom
     
    1818}
    1919
    20 define('WPRAC_VERSION', '1.0.4');
     20define('WPRAC_VERSION', '1.0.5');
    2121define('WPRAC_MINIMUM_WP_VERSION', '4.6');
    2222define('WPRAC_PLUGIN_URL', plugin_dir_url(__FILE__));
     
    3434 *******************/
    3535require_once(WPRAC_PLUGIN_DIR . 'includes/class.wprac-custom-controller.php');
     36
     37/*******************
     38 *
     39 *Include tools-controller
     40 *
     41 *******************/
     42require_once(WPRAC_PLUGIN_DIR . 'includes/class.wprac-tools-controller.php');
    3643
    3744
     
    5663WPRAC_Controller::run();
    5764
    58 //nganluong/f2a6bfe8a876f4d5016e6645d53c5027
    5965
    6066
    6167
    6268
    63 
Note: See TracChangeset for help on using the changeset viewer.