";
_e($select,"wp-smart-preloader");
}
/**
* setting function for home page
*/
public function wsp_preloader_homepage(){
printf(__('','wp-smart-preloader'),"wsp-loader-opt[homepage]",(isset($this->options['homepage']) && $this->options['homepage'] == "1")?'checked="checked"':'' );
}
/**
* setting function fadeout
*/
public function wsp_loader_fadeOut(){
printf(__('
%s
','wp-smart-preloader'),"wsp-loader-opt[fadeout]",(isset($this->options['fadeout']) )?$this->options['fadeout']:'',__('Default:2500 1 second => 1000',"wp-smart-preloader") );
}
/**
* setting function delay
*/
public function wsp_loader_delay(){
printf(__('
%s
','wp-smart-preloader'),"wsp-loader-opt[delay]",(isset($this->options['delay']) )?$this->options['delay']:'',__('Default:1500 1 second => 1000',"wp-smart-preloader") );
}
/**
* setting function custom css
*/
public function wsp_loader_custom_css(){
printf("Want to change Look and feel. Add your desired css here :)","wp-smart-preloader");
echo " ";
printf("Or add CSS for your Custom html5 animation :)","wp-smart-preloader");
echo "
";
printf(__('','wp-smart-preloader'),"wsp-loader-opt[custom_css]",isset($this->options['custom_css'])? esc_attr( $this->options['custom_css'] ):'',"wsp-loader-opt[custom_css]" );
}
public function wsp_custom_animation(){
printf("Want to add you own custom html5 animation? Enter your html code here.","wp-smart-preloader");
echo "
";
printf(__('','wp-smart-preloader'),"wsp-loader-opt[custom_animation]",isset($this->options['custom_animation'])? esc_attr( $this->options['custom_animation'] ):'',"wsp-loader-opt[custom_animation]" );
}
/**
* [wsp_sanitize sanitize function for setting]
*/
public function wsp_sanitize( $input ){
foreach($input as $k => $v) {
$newinput[$k] = trim($v);
// Check the input is a letter or a number
if(!preg_match('/^[A-Z0-9 _]*$/i', $v)) {
$newinput[$k] = '';
}
}
return $input;
}
/**
* [wsp_section_info function for section info]
* @return [echo] [display info]
*/
public function wsp_section_info(){
_e('WP Smart Preloader Setting:','wp-smart-preloader');
}
/**
* [wsp_uninstall to delete options after uninstall]
*/
public function wsp_uninstall(){
delete_option( 'wsp-loader-opt' );
}
}
// if( is_admin() ){
$wp_smart_preloader = new WP_smart_preloader();
// }