Plugin Directory

Changeset 1119235


Ignore:
Timestamp:
03/23/2015 10:54:22 PM (11 years ago)
Author:
tychay
Message:

Show an updated error message on theme save

Previously, it'd just show weird debugging code. Not cool!

Location:
one-click-child-theme/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • one-click-child-theme/trunk/one-click-child-theme.php

    r1117387 r1119235  
    5858                // $error is rendered below
    5959            } else {
    60                 var_dump($result);
    61                 var_dump(switch_theme( $result['parent_template'], $result['new_theme'] ));
     60                //var_dump($result);
     61                switch_theme( $result['parent_template'], $result['new_theme'] );
     62                add_settings_error(
     63                    '',
     64                    'one-click-child-theme',
     65                    sprintf(__('<a href="%s">Theme switched!</a>', 'one-click-child-theme'),
     66                        admin_url( 'themes.php' )
     67                    ),
     68                    'updated'
     69                );
     70                //add_action( 'admin_notices', array('OneClickChildTheme','adminNoticeThemeCreated') );
    6271                // TODO: put a redirect in here somehow?
    6372                //wp_redirect( admin_url('themes.php') ); //buffer issue :-(
    64                 printf( __('<a href="%s">Theme switched!</a>', 'one-click-child-theme'), admin_url( 'themes.php' ) );
    65                 exit;
     73                //printf( __('<a href="%s">Theme switched!</a>', 'one-click-child-theme'), admin_url( 'themes.php' ) );
     74                //exit;
    6675            }
    6776        }
  • one-click-child-theme/trunk/panel.php

    r1119233 r1119235  
    55 * @author terry chay <[email protected]>
    66 */
     7
     8settings_errors();
    79?>
    810<div class="wrap">
Note: See TracChangeset for help on using the changeset viewer.