Plugin Directory

Changeset 1002155


Ignore:
Timestamp:
10/05/2014 08:13:06 PM (11 years ago)
Author:
technical_mastermind
Message:

Minor bug-fix

Location:
tm-replace-howdy
Files:
1 added
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • tm-replace-howdy/tags/1.4.1/index.php

    r1002147 r1002155  
    151151            case 'custom': // We are in a custom mode, get list from DB
    152152                $options = get_option( 'tm_replace_howdy_values' );
    153                 if ( is_array( $options ) && is_array( $options[1] ) ) {
     153                if ( is_array( $options ) && isset( $options[1] ) && is_array( $options[1] ) ) {
    154154                    $values = $options[1];
    155155                } else {
     
    199199
    200200    function options_save_settings() {
     201        $redirect = false;
    201202        if ( isset( $_POST['tm_replace_howdy_form'] ) ) {
    202203            // Update settings in DB, we are saving
     
    205206                update_option( 'tm_replace_howdy_mode', esc_attr( $mode ) );
    206207            }
    207             if ( isset( $_POST['tm_rh_list'] ) && is_array( $_POST['tm_rh_list'] ) ) {
     208            if ( isset( $_POST['tm_rh_list'] ) ) {
    208209                $list = explode( ';', $_POST['tm_rh_list'] );
    209210                $tmp  = array();
     
    236237            update_option( 'tm_replace_howdy_all_languages', esc_attr( $replace_all ) );
    237238            update_option( 'tm_replace_howdy_save', esc_attr( $save_data ) );
     239            $redirect = true;
    238240        } elseif ( isset( $_POST['tm_replace_howdy_form_defaults'] ) ) {
    239241            // Clear settings in DB, we are resetting
     
    242244            delete_option( 'tm_replace_howdy_all_languages' );
    243245            delete_option( 'tm_replace_howdy_save' );
     246            $redirect = true;
     247        }
     248        if ( $redirect ) {
     249            wp_redirect( admin_url( 'options-general.php?page=tm_replace_howdy' ) );
     250            exit();
    244251        }
    245252    }
  • tm-replace-howdy/tags/1.4.1/readme.txt

    r1002148 r1002155  
    77Requires at least: 3.8
    88Tested up to: 4.0
    9 Stable tag: 1.4.0
     9Stable tag: 1.4.1
    1010
    1111Banish the "Howdy" greeting from the WordPress admin area with this simple to use plugin!
     
    6565
    6666== Changelog ==
     67= 1.4.1 =
     68* Fixed a settings bug
    6769= 1.4.0 =
    6870* Made admin interface translatable. Does NOT apply to lists of phrases.
     
    100102
    101103== Upgrade Notice ==
     104= 1.4.1 =
     105Fixed a settings bug
    102106= 1.4.0 =
    103107Made more robust, cleaned up code, and added some features for developers and translators.
  • tm-replace-howdy/trunk/index.php

    r1002147 r1002155  
    151151            case 'custom': // We are in a custom mode, get list from DB
    152152                $options = get_option( 'tm_replace_howdy_values' );
    153                 if ( is_array( $options ) && is_array( $options[1] ) ) {
     153                if ( is_array( $options ) && isset( $options[1] ) && is_array( $options[1] ) ) {
    154154                    $values = $options[1];
    155155                } else {
     
    199199
    200200    function options_save_settings() {
     201        $redirect = false;
    201202        if ( isset( $_POST['tm_replace_howdy_form'] ) ) {
    202203            // Update settings in DB, we are saving
     
    205206                update_option( 'tm_replace_howdy_mode', esc_attr( $mode ) );
    206207            }
    207             if ( isset( $_POST['tm_rh_list'] ) && is_array( $_POST['tm_rh_list'] ) ) {
     208            if ( isset( $_POST['tm_rh_list'] ) ) {
    208209                $list = explode( ';', $_POST['tm_rh_list'] );
    209210                $tmp  = array();
     
    236237            update_option( 'tm_replace_howdy_all_languages', esc_attr( $replace_all ) );
    237238            update_option( 'tm_replace_howdy_save', esc_attr( $save_data ) );
     239            $redirect = true;
    238240        } elseif ( isset( $_POST['tm_replace_howdy_form_defaults'] ) ) {
    239241            // Clear settings in DB, we are resetting
     
    242244            delete_option( 'tm_replace_howdy_all_languages' );
    243245            delete_option( 'tm_replace_howdy_save' );
     246            $redirect = true;
     247        }
     248        if ( $redirect ) {
     249            wp_redirect( admin_url( 'options-general.php?page=tm_replace_howdy' ) );
     250            exit();
    244251        }
    245252    }
  • tm-replace-howdy/trunk/readme.txt

    r1002148 r1002155  
    77Requires at least: 3.8
    88Tested up to: 4.0
    9 Stable tag: 1.4.0
     9Stable tag: 1.4.1
    1010
    1111Banish the "Howdy" greeting from the WordPress admin area with this simple to use plugin!
     
    6565
    6666== Changelog ==
     67= 1.4.1 =
     68* Fixed a settings bug
    6769= 1.4.0 =
    6870* Made admin interface translatable. Does NOT apply to lists of phrases.
     
    100102
    101103== Upgrade Notice ==
     104= 1.4.1 =
     105Fixed a settings bug
    102106= 1.4.0 =
    103107Made more robust, cleaned up code, and added some features for developers and translators.
Note: See TracChangeset for help on using the changeset viewer.