Changeset 2123377
- Timestamp:
- 07/15/2019 05:30:08 PM (5 years ago)
- Location:
- wp-custom-body-class
- Files:
-
- 3 edited
- 22 copied
Legend:
- Unmodified
- Added
- Removed
-
wp-custom-body-class/tags/0.7.1/core/classes/Processor.php
r2118841 r2123377 85 85 */ 86 86 function run() { 87 87 88 // if the status has been generated we skip execution 88 89 if ( $this->status !== null ) { … … 90 91 } 91 92 92 $this->status = array 93 ( 93 $this->status = array( 94 94 'state' => 'nominal', 95 95 'errors' => array(), … … 100 100 $option_key = $this->meta->get( 'settings-key', null ); 101 101 102 if ( $option_key === null ) {103 throw new Exception( 'Missing option_key in plugin configuration.' );104 }105 106 102 if ( current_user_can( 'manage_options' ) && $this->form_was_submitted() ) { 107 103 108 wp_verify_nonce( 'wp-custom-body-class-settings-nonce', 'wp-custom-body-class-save-settings' ); 104 if( ! isset( $_POST['wp-custom-body-class-settings-nonce'] ) || ! wp_verify_nonce( $_POST['wp-custom-body-class-settings-nonce'], 'wp-custom-body-class-save-settings' ) ) { 105 die( '<h2>Cheatin uh?</h2>' ); 106 } 107 108 if ( $option_key === null ) { 109 throw new Exception( 'Missing option_key in plugin configuration.' ); 110 } 109 111 110 112 $input = $this->cleanup_input( $_POST ); -
wp-custom-body-class/tags/0.7.1/custom_body_class.php
r2118841 r2123377 4 4 Plugin URI: https://a.lup.dev 5 5 Description: A plugin which allows you to add a custom CSS class the HTML body tag 6 Version: 0.7. 06 Version: 0.7. 7 7 Author: Andrei Lupu 8 8 Author URI: https://a.lup.dev -
wp-custom-body-class/tags/0.7.1/readme.txt
r2118841 r2123377 4 4 Requires at least: 4.9.0 5 5 Tested up to: 5.2.0 6 Stable tag: 0.7. 06 Stable tag: 0.7. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 == Changelog == 25 25 26 = 0.6.0 = 26 = 0.7.1 = 27 * Update: Check for nonce existence on settings page form. 28 29 = 0.7.0 = 27 30 * Update: Better escapes for the plugin's settings page. 28 31 * Update: Modified textdomain as the plugin's name. -
wp-custom-body-class/trunk/core/classes/Processor.php
r2118841 r2123377 85 85 */ 86 86 function run() { 87 87 88 // if the status has been generated we skip execution 88 89 if ( $this->status !== null ) { … … 90 91 } 91 92 92 $this->status = array 93 ( 93 $this->status = array( 94 94 'state' => 'nominal', 95 95 'errors' => array(), … … 100 100 $option_key = $this->meta->get( 'settings-key', null ); 101 101 102 if ( $option_key === null ) {103 throw new Exception( 'Missing option_key in plugin configuration.' );104 }105 106 102 if ( current_user_can( 'manage_options' ) && $this->form_was_submitted() ) { 107 103 108 wp_verify_nonce( 'wp-custom-body-class-settings-nonce', 'wp-custom-body-class-save-settings' ); 104 if( ! isset( $_POST['wp-custom-body-class-settings-nonce'] ) || ! wp_verify_nonce( $_POST['wp-custom-body-class-settings-nonce'], 'wp-custom-body-class-save-settings' ) ) { 105 die( '<h2>Cheatin uh?</h2>' ); 106 } 107 108 if ( $option_key === null ) { 109 throw new Exception( 'Missing option_key in plugin configuration.' ); 110 } 109 111 110 112 $input = $this->cleanup_input( $_POST ); -
wp-custom-body-class/trunk/custom_body_class.php
r2118841 r2123377 4 4 Plugin URI: https://a.lup.dev 5 5 Description: A plugin which allows you to add a custom CSS class the HTML body tag 6 Version: 0.7. 06 Version: 0.7. 7 7 Author: Andrei Lupu 8 8 Author URI: https://a.lup.dev -
wp-custom-body-class/trunk/readme.txt
r2118841 r2123377 4 4 Requires at least: 4.9.0 5 5 Tested up to: 5.2.0 6 Stable tag: 0.7. 06 Stable tag: 0.7. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 == Changelog == 25 25 26 = 0.6.0 = 26 = 0.7.1 = 27 * Update: Check for nonce existence on settings page form. 28 29 = 0.7.0 = 27 30 * Update: Better escapes for the plugin's settings page. 28 31 * Update: Modified textdomain as the plugin's name.
Note: See TracChangeset
for help on using the changeset viewer.