Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #24 from ericandrewlewis/master

Fix Developer: Plugin Setup lightbox options save if filesystem is not 'direct'
  • Loading branch information...
commit fea4ff8ea04ae4bb358c30e47ca4d96a4f0b3913 2 parents d6b3dbb + a79987b
@mjangda mjangda authored
Showing with 3 additions and 8 deletions.
  1. +3 −8 developer.php
View
11 developer.php
@@ -164,7 +164,6 @@ public function admin_init() {
register_setting( self::OPTION, self::OPTION, array( $this, 'settings_validate' ) );
-
wp_register_script( 'a8c-developer', plugins_url( 'developer.js', __FILE__ ), array( 'jquery' ), self::VERSION );
$strings = array(
'settings_slug' => self::PAGE_SLUG,
@@ -184,14 +183,10 @@ public function admin_init() {
wp_register_style( 'a8c-developer', plugins_url( 'developer.css', __FILE__ ), array(), self::VERSION );
-
// Handle the submission of the lightbox form if step 2 won't be shown
- if ( ! empty( $_POST['a8c_developer_action'] ) ) {
- if ( 'lightbox_step_1' == $_POST['a8c_developer_action'] && ! empty( $_POST['a8c_developer_project_type'] ) && check_admin_referer( 'a8c_developer_action_lightbox_step_1' ) ) {
- $this->save_project_type( $_POST['a8c_developer_project_type'] );
-
- add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
- }
+ if ( ! empty( $_POST['action'] ) && 'a8c_developer_lightbox_step_1' == $_POST['action'] && ! empty( $_POST['a8c_developer_project_type'] ) && check_admin_referer( 'a8c_developer_lightbox_step_1' ) ) {
+ $this->save_project_type( $_POST['a8c_developer_project_type'] );
+ add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
}
if ( ! get_option( self::OPTION ) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.