/** * Transition for when the user decides to change the FB App. */ private static function transition_edit_app() { Instant_Articles_Option_FB_App::delete_option(); Instant_Articles_Option_FB_Page::delete_option(); return update_option('instant-articles-current-state', self::STATE_APP_SETUP); }
/** * Edits the App ID and App Secret within the APP_SETUP state. */ public static function edit_app() { if (!current_user_can('manage_options')) { wp_die(esc_html('You do not have sufficient permissions to access this page.')); } $current_state = Instant_Articles_Wizard_State::get_current_state(); if ($current_state !== Instant_Articles_Wizard_State::STATE_APP_SETUP) { die; } Instant_Articles_Option_FB_App::delete_option(); self::render(true); die; }