Plugin Directory

Changeset 1607789


Ignore:
Timestamp:
03/04/2017 12:32:53 PM (9 years ago)
Author:
WPBrigade
Message:

Releasing 1.0.1 version.

Location:
under-construction-maintenance-mode
Files:
5 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • under-construction-maintenance-mode/trunk/classes/customizer.php

    r1605890 r1607789  
    5252    ) );
    5353
    54     $wp_customize->add_control(
    55     new WP_Customize_Image_Control(
    56     $wp_customize,
    57     'ucmm_logo',
    58     array(
     54    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'ucmm_wpbrigade_customization[ucmm_logo]', array(
    5955      'label'        => __( 'Logo Image:', 'ucmm-wpbrigade' ),
    6056      'section'  => 'ucmm_wpbrigade_logo_section',
     
    110106    ) );
    111107
    112     $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'setting_background', array(
     108    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'ucmm_wpbrigade_customization[setting_background]', array(
    113109      'label'          => __( 'Background Image:', 'ucmm-wpbrigade' ),
    114110      'section'    => 'ucmm_wpbrigade_background_section',
     
    134130    ) );
    135131
    136     $wp_customize->add_control( 'header_text', array(
     132    $wp_customize->add_control( 'ucmm_wpbrigade_customization[header_text]', array(
    137133      'label'                        => __('Header Text', 'ucmm-wpbrigade'),
    138134      'section'                  => 'ucmm_wpbrigade_text_section',
     
    148144    ) );
    149145
    150     $wp_customize->add_control( 'footer_text', array(
     146    $wp_customize->add_control( 'ucmm_wpbrigade_customization[footer_text]', array(
    151147      'label'                        => __('Footer Text', 'ucmm-wpbrigade'),
    152148      'section'                  => 'ucmm_wpbrigade_text_section',
  • under-construction-maintenance-mode/trunk/readme.txt

    r1605890 r1607789  
    22Contributors: WPBrigade, hiddenpearls, AbdulWahab610
    33Donate link: http://wpbrigade.com/
    4 Tags: coming soon, under construction, maintenance mode,
     4Tags: coming soon, under construction, maintenance mode, behind the scenes, maintenance, comingsoon,
    55Requires at least: 3.0
    6 Tested up to: 4.7
    7 Stable tag: 1.0.0
     6Tested up to: 4.7.2
     7Stable tag: 1.0.1
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Under Construction & Maintenance Mode is a simple plugin for setting up Under Construction, Coming Soon and Maintenance Mode landing pages within 5 seconds using WordPress Customizer.
     11Under Construction is a simple plugin for setting up Under Construction, Coming Soon and Maintenance Mode landing pages within 5 seconds using WordPress Customizer.
    1212
    1313== Description ==
    1414
    1515Under Construction, Maintenance Mode or Coming Soon landing page is needed when you are working hard to launch your website. This plugin helps you to post a message to your users while you can work behind the scenes.
     16
     17== Screenshots ==
     18
     191. Under Construction by WPBrigade - [Demo page](https://wpbrigade.com/wordpress/plugins/construction-maintenance-mode/)
     201. Under Construction by WPBrigade - [settings page](https://wpbrigade.com/wordpress/plugins/construction-maintenance-mode/)
     211. Under Construction by WPBrigade - [Edit page with WordPress Customizer](https://wpbrigade.com/wordpress/plugins/construction-maintenance-mode/)
    1622
    1723
     
    4046== Changelog ==
    4147
     48= 1.0.1 =
     49* Feedback integration.
     50
    4251= 1.0.0 =
    4352* Initial Release.
    44 
    4553
    4654== Upgrade Notice ==
    4755
    4856= 1.0.1 =
    49 Coming Soon.
     57Upgrade Immediately.
  • under-construction-maintenance-mode/trunk/under-construction-maintenance-mode.php

    r1605914 r1607789  
    44* Plugin URI: https://wpbrigade.com/wordpress/plugins/construction-maintenance-mode/
    55* Description: This plugin will Display an Under Construction, Maintenance Mode or Coming Soon landing Page that takes 5 seconds to setup, while you're doing maintenance work on your site.
    6 * Version: 1.0.0
     6* Version: 1.0.1
    77* Author: WPBrigade
    88* Author URI: http://www.WPBrigade.com/
     
    2828    * @var string
    2929    */
    30     public $version = '1.0.0';
     30    public $version = '1.0.1';
    3131
    3232    function __construct() {
     
    4444      $this->define( 'UCMM_WPBRIGADE_ROOT_PATH',  dirname( __FILE__ ) . '/' );
    4545      $this->define( 'UCMM_WPBRIGADE_VERSION', $this->version );
     46      $this->define( 'UCMM_WPBRIGADE_FEEDBACK_SERVER', 'https://wpbrigade.com/' );
    4647      $this->define( 'UCMM_WPBRIGADE_MAIN_FILE', 'under-construction-maintenance-mode.php' );
    4748    }
     
    5253      register_deactivation_hook( __FILE__, array( $this, 'ucmm_deactivation') );
    5354
    54       add_action( 'init',                 array( $this, 'ucmm_redirect_customizer' ) );
    55       add_action( 'plugins_loaded',       array( $this, 'ucmm_textdomain' ) );
    56       add_filter( 'plugin_row_meta',      array( $this, 'ucmm_row_meta'), 10, 2 );
    57       add_action( 'admin_enqueue_scripts',array( $this, 'ucmm_admin_scripts' ) );
    58       add_action( 'parse_request',        array( $this, 'ucmm_parse_request'), 10, 1  );
    59       add_action( 'admin_menu',                   array( $this, 'ucmm_callback_url' ), 99 );
     55      add_action( 'init',                   array( $this, 'ucmm_redirect_customizer' ) );
     56      add_action( 'plugins_loaded',         array( $this, 'ucmm_textdomain' ) );
     57      add_filter( 'plugin_row_meta',        array( $this, 'ucmm_row_meta'), 10, 2 );
     58      add_action( 'admin_enqueue_scripts',  array( $this, 'ucmm_admin_scripts' ) );
     59      add_action( 'parse_request',          array( $this, 'ucmm_parse_request'), 10, 1  );
     60      add_action( 'admin_menu',                     array( $this, 'ucmm_callback_url' ), 99 );
     61      add_action( 'admin_footer',           array( $this, 'ucmm_add_deactive_modal' ) );
     62      add_action( 'wp_ajax_ucmm_deactivate',array( $this, 'ucmm_deactivate' ) );
    6063    }
    6164
     
    167170      wp_enqueue_style( 'ucmm_stlye', plugins_url( 'assets/css/style.css', __FILE__ ), array(), UCMM_WPBRIGADE_VERSION );
    168171      // wp_enqueue_script( 'ucmm_js', plugins_url( 'js/admin-custom.js', __FILE__ ), array(), time() );
     172    }
     173
     174    /**
     175     * Add deactivate modal layout.
     176     */
     177    public function ucmm_add_deactive_modal() {
     178      global $pagenow;
     179
     180      if ( 'plugins.php' !== $pagenow ) {
     181        return;
     182      }
     183
     184      include UCMM_WPBRIGADE_DIR_PATH . 'includes/deactivate_modal.php';
     185    }
     186
     187    function ucmm_deactivate() {
     188
     189      $email         = get_option( 'admin_email' );
     190      $_reason       = sanitize_text_field( wp_unslash( $_POST['reason'] ) );
     191      $reason_detail = sanitize_text_field( wp_unslash( $_POST['reason_detail'] ) );
     192      $reason        = '';
     193
     194      if ( '1' == $_reason ) {
     195        $reason = 'I only needed the plugin for a short period';
     196      } elseif ( '2' == $_reason ) {
     197        $reason = 'I found a better plugin';
     198      } elseif ( '3' == $_reason ) {
     199        $reason = 'The plugin broke my site';
     200      } elseif ( '4' == $_reason ) {
     201        $reason = 'The plugin suddenly stopped working';
     202      } elseif ( '5' == $_reason ) {
     203        $reason = 'I no longer need the plugin';
     204      } elseif ( '6' == $_reason ) {
     205        $reason = 'It\'s a temporary deactivation. I\'m just debugging an issue.';
     206      } elseif ( '7' == $_reason ) {
     207        $reason = 'Other';
     208      }
     209      $fields = array(
     210        'email'                 => $email,
     211        'website'               => get_site_url(),
     212        'action'            => 'Deactivate',
     213        'reason'            => $reason,
     214        'reason_detail'     => $reason_detail,
     215        'blog_language'     => get_bloginfo( 'language' ),
     216        'wordpress_version' => get_bloginfo( 'version' ),
     217        'plugin_version'    => UCMM_WPBRIGADE_VERSION,
     218        'plugin_name'           => 'Under Construction Free',
     219      );
     220
     221      $response = wp_remote_post( UCMM_WPBRIGADE_FEEDBACK_SERVER, array(
     222        'method'      => 'POST',
     223        'timeout'     => 5,
     224        'httpversion' => '1.0',
     225        'blocking'    => false,
     226        'headers'     => array(),
     227        'body'        => $fields,
     228      ) );
     229
     230      wp_die();
    169231    }
    170232
Note: See TracChangeset for help on using the changeset viewer.