admin_url ( 'admin-ajax.php' ),
'nonce' => wp_create_nonce( 'fca_ga_admin_nonce' ),
);
wp_localize_script( 'fca_ga_admin_js', 'adminData', $admin_data );
}
function fca_ga_admin_notice_save() {
echo '
';
echo '
' . __( "Settings saved.", 'fca-ga' ) . '
';
echo '
';
}
function fca_ga_settings_page() {
fca_ga_admin_enqueue();
if ( isSet( $_POST['fca_ga_save'] ) ) {
fca_ga_settings_save();
fca_ga_admin_notice_save();
}
$options = get_option( 'fca_ga', true );
$id = empty ( $options['id'] ) ? '' : $options['id'];
$exclude = empty ( $options['exclude'] ) ? array() : $options['exclude'];
//DEFAULT EXCLUDE TO ADMIN & EDITOR
$exclude = empty ( $options['has_save'] ) ? array( 'Administrator', 'Editor' ) : $exclude;
$html = '';
echo $html;
}
function fca_ga_settings_save() {
$data = fca_ga_escape_input ( $_POST['fca_ga'] );
update_option( 'fca_ga', $data );
}