<?php

global $intense_visions_options;

global $wp_roles;

if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles();

$roles = $wp_roles->get_names();

$roles = array_merge( array( '' => '' ), $roles);

$this->fields = array(
	'id' => array(
		'type' => 'text',
		'title' => __( 'ID', 'intense' ),
		'description' => __( 'optional - used to set the client-side ID', 'intense' ),
		'skinnable' => false
	),
	'roles' => array(
		'type' => 'dropdown',
		'title' => __( 'Roles', 'intense' ),
		'description' => __( 'Only the selected roles will be able to see the content. Leave blank to ignore the role and only check if the user is logged in.', 'intense' ),
		'default' => '',
		'multiple' => true,
		'options' => $roles
	),
	'show_message' => array(
		'type' => 'checkbox',
		'title' => __( 'Show Message', 'intense' ),
		'description' => __( 'show message and login button for users that are not logged in', 'intense' ),
		'default' => 1
	),
	'text' => array(
		'type' => 'textarea',
		'title' => __( 'Text', 'intense' ),
		'default' => __( 'This content is for registered users only', 'intense' ),
		'skinnable' => false
	),
	'background_color' => array(
		'type' => 'color_advanced',
		'title' => __( 'Background Color', 'intense' ),
	),
	'font_color' => array(
		'type' => 'color_advanced',
		'title' => __( 'Font Color', 'intense' ),
		'default' => '#333333'
	),
	'login_title' => array(
		'type' => 'text',
		'title' => __( 'Login Title', 'intense' ),
		'default' => __( 'Login', 'intense' ),
		'skinnable' => false
	),
	'login_url' => array(
		'type' => 'text',
		'title' => __( 'Login URL', 'intense' ),
		'description' => __( 'leave blank to use the default WordPress login url with a redirect back to this page/post', 'intense' ),
	),
	'login_color' => array(
		'type' => 'color_advanced',
		'title' => __( 'Login Button Color', 'intense' ),
		'default' => 'primary'
	),	
	'class' => array(
		'type' => 'text',
		'title' => __( 'CSS Class', 'intense' ),
	),
);
