Request::post( 'enable_pctag', $this->safe ), 'pctag_id' => ( Request::check( 'pctag_id' ) ? sanitize_text_field( $_POST['pctag_id'] ) : '' ), 'pctag_remove_settings' => Request::post( 'pctag_remove_settings', $this->safe ), 'boost-robot' => Request::post( 'boost-robot', $this->safe ), 'boost-alt' => Request::post( 'boost-alt', $this->safe ), 'pctag-mobilook' => Request::post( 'pctag-mobilook', $this->safe ), 'pctag-bigta' => Request::post( 'pctag-bigta', $this->safe ), 'pctag-vidseo' => Request::post( 'pctag-vidseo', $this->safe ), ]; update_option( 'pctag', $options ); // update options echo '

' . esc_html__( 'Settings saved.', 'add-pinterest-conversion-tags' ) . '

'; } $options = new Option(); $notification = new \Pagup\Pctag\Controllers\NotificationController(); echo $notification->support(); //set active class for navigation tabs $active_tab = ( isset( $_GET['tab'] ) && in_array( $_GET['tab'], $this->safe ) ? sanitize_key( $_GET['tab'] ) : 'pctag-settings' ); //Plugin::dd($_POST); //var_dump(Option::all()); // purchase notification $purchase_url = "options-general.php?page=pctag-pricing"; $get_pro = sprintf( wp_kses( __( 'Get Pro version to enable', "add-pinterest-conversion-tags" ), array( 'a' => array( 'href' => array(), 'target' => array(), ), ) ), esc_url( $purchase_url ) ); // Return Views if ( $active_tab == 'pctag-settings' ) { return Plugin::view( 'settings', compact( 'active_tab', 'options', 'get_pro', 'success' ) ); } if ( $active_tab == 'pctag-faq' ) { return Plugin::view( "faq", compact( 'active_tab' ) ); } if ( $active_tab == 'pctag-recs' ) { return Plugin::view( "recommendations", compact( 'active_tab' ) ); } } } $settings = new SettingsController();