( Request::check( 'twitter_id' ) ? sanitize_text_field( wp_unslash( $_POST['twitter_id'] ) ) : '' ),
'remove_settings' => Request::post( 'remove_settings', $safe ),
];
update_option( 'add-twitter-pixel', $options );
// update options
echo '
' . esc_html__( 'Settings saved.', 'add-twitter-pixel' ) . '
';
}
$options = new Option();
$text_domain = Plugin::domain();
$notification = new \Pagup\Twitter\Controllers\NotificationController();
echo $notification->support();
//set active class for navigation tabs
$active_tab = ( isset( $_GET['tab'] ) && in_array( $_GET['tab'], $safe ) ? sanitize_key( $_GET['tab'] ) : 'atp-settings' );
//Plugin::dd($_POST);
//var_dump(Option::all());
// purchase notification
$purchase_url = "options-general.php?page=add-twitter-pixel-pricing";
$get_pro = sprintf( wp_kses( __( 'Get Pro version to enable', $text_domain ), array(
'a' => array(
'href' => array(),
'target' => array(),
),
) ), esc_url( $purchase_url ) );
// Return Views
if ( $active_tab == 'atp-settings' ) {
return Plugin::view( 'settings', compact(
'active_tab',
'options',
'text_domain',
'get_pro',
'success'
) );
}
if ( $active_tab == 'atp-faq' ) {
return Plugin::view( "faq", compact( 'active_tab', 'text_domain' ) );
}
}
}
$settings = new SettingsController();