validate_page() )
{
return;
}
//Add custom styles
wp_enqueue_style(array(
'acps-admin-styles',
'acps-chzn-styles'
));
//Add custom scripts
wp_enqueue_script(array(
'acps-chzn-scripts',
));
//Declare settings using filter
$this->settings = apply_filters('acps/get_settings', 'all');
}
//Options page callback function
public function create_admin_page()
{
//Set class property
$this->options = get_option( 'acps_options' );
?>
Advanced Custom Post Search Settings
General settings effect all of your search forms.';
echo 'General Settings
';
}
//Results page setting callback function
public function results_page_setting_callback()
{
$acps_all_pages = get_pages();
$acps_pages = false;
foreach( $acps_all_pages as $acps_page ):
$acps_pages[$acps_page->ID] = $acps_page->post_title;
endforeach;
echo '';
}
//Form style callback function
public function form_styles_setting_callback()
{
if(isset( $this->options['acps_form_styles'] ))
{
printf(
'',
isset( $this->options['acps_form_styles'] ) ? esc_attr( $this->options['acps_form_styles']) : ''
);
}
else
{
printf(
'',
isset( $this->options['acps_form_styles'] ) ? esc_attr( $this->options['acps_form_styles']) : ''
);
}
}
}
if( is_admin() )
$acps_settings_page = new acps_settings_page();