Esempio n. 1
0
	public function create_help_screen() {
		global $wp_list_table,$sitemember_screen_manage;
		
	/* 	if($_REQUEST['action']=='view'){
			$wp_list_table = new members_list_Table();
			$this->admin_screen = WP_Screen::get($this->admin_page);
			//$event_per_page = get_option( 'horse_racing_events_per_page', 10 );
			$this->admin_screen->add_option(
				'per_page', 
				array(
					'label' => 'Price per page', 
					'default' => 10, 
					'option' => 'edit_per_page'
				)
			);
		}*/
		
		$wp_list_table = new members_list_Table();
		$this->admin_screen = WP_Screen::get($sitemember_screen_manage[site_members::levelID()]);
		$this->admin_screen->add_option(
			'per_page', 
			array(
				'label' => 'List per page', 
				'default' => 10, 
				'option' => 'list_per_page'
			)
		);
	}
Esempio n. 2
0
function sitemember_menu(){
	global $sitemember_screen_manage;
	add_menu_page('Site Member','Site Member','administrator','site-member','sitemember_ui','dashicons-groups');

	$sitemember_screen = add_submenu_page('site-member','Site Members Overview','Overview','administrator','site-member','sitemember_ui');
		add_submenu_page('site-member','Add Site Member','Add New Event','administrator','site-member-add','sitemember_add_ui');
		/* add_submenu_page('site-member1','Edit Site Member','Edit Site Member','administrator','site-member&action=edit','sitemember_edit_ui');
		 */
		
		foreach(site_members::memberLevel() as $key => $val){
			$sitemember_screen_manage[$key] = add_submenu_page('site-member','Manage All '. $val,$val,'administrator','site-member-list_'.$key,'sitemember_manage_ui');
			add_submenu_page('site-member1','Add '. $val,'Add '. $val,'administrator','site-member-list_'.$key.'&action=add','sitemember_manage_ui');
			add_submenu_page('site-member1','edit '. $val,'edit '.$val,'administrator','site-member-list_'.$key.'&action=edit','sitemember_manage_ui');
			add_submenu_page('site-member1','view '. $val,'view '.$val,'administrator','site-member-list_'.$key.'&action=edit','sitemember_manage_ui');
		}
		
		add_submenu_page('site-member','Settings & Config','Settings & Config','administrator','site-member-settings','sitemember_settings_ui');
		
	
	if(isset($_GET['page'])){
		if(strrpos($_GET['page'],'site-member-list') !== false){
			
			
			if(isset($_GET['action'])== 'add'){
				add_action('admin_print_scripts',array('member_scripts','member_form_add'));
			}
			
			
		}else{
			if(is_admin()){
				if(strrpos($_GET['page'],'site-member') !== false){
					add_action('admin_print_scripts',array('member_scripts','admin'));
					//echo "wow";
				}
			}
		}
		
	}
	
	
}
Esempio n. 3
0
<div class="wrap">
	<h1>
	<? 
		$_levelID = site_members::get_levelID_from_url();
		$_level = site_members::memberLevel($_levelID);
		if(!empty($_level)){
			echo "Manage ".$_level;
		}else{
			die('Request Member Level not found.');
		}
	?>

		<a href="admin.php?page=site-member-list_<?php 
echo $_levelID;
?>
&action=add" class="page-title-action">Add New</a>
	</h1>
		
	<div class="updated below-h2 hidden" id="message" ></div>
	<?
	$member_list = new members_list_Table($_levelID);
	$member_list->prepare_items();
	$member_list->display();
    ?>

</div>
Esempio n. 4
0
function uninstall_site_member()
{
    site_members::uninstall();
}
Esempio n. 5
0
<?

$_options = get_option('site-member-settings');
add_action('wp_print_styles',array('member_scripts','member_form_add'));
add_action('wp_print_scripts',array('member_scripts','member_form_add'));

get_header();
$_keyLevel = site_members::get_frontend_levelID();



$_levelTitle = site_members::memberLevel($_keyLevel);
if(empty($_options['allow_registration'])){
	echo 'registration is currently closed.';
	exit;
}

if(@!in_array('website',$_options['allow_registration_social'])){
	echo 'Site registration is currently not available. please try other options';
	exit;
}

if(@!in_array($_keyLevel,$_options['allow_registration_level'])){
	echo 'Registration for '. $_levelTitle .' is closed. ';
	exit;
}



$_error = '';
if(isset($_POST['submit'])){