PlayerJS '; } function playerjs_com_admin_html(){ ?>
playerjs.com', '', 'page'); add_settings_field('path', "Path to created player", 'pjs_settings_path', 'page', 'section'); add_settings_field('size', 'Options', 'pjs_settings_size', 'page', 'section'); } function pjs_settings_path(){ $path = get_option('playerjs_com_script_path'); $path = $path ? $path['input'] : ''; if(trim($path)==''){ $path = plugins_url('').'/playerjs/playerjs_default.js'; } $check_path = ''; /*if(strpos(file_get_contents($path),'Player')===false){ $check_path = 'File not found
'; }*/ echo(''.$check_path); } function pjs_settings_size(){ $width = playerjs_com_get_option('width',0,'100%'); $height = playerjs_com_get_option('height',0,'280px'); $customheight = playerjs_com_get_option('customheight',0,''); $align = playerjs_com_get_option('align',0,''); echo('Width '); echo('Height '.($customheight=="custom"?'':'').'
'); echo('Align
'); // custom } function playerjs_com_sanitize_callback( $options ){ if (is_array($options) || is_object($options)){ foreach( $options as $name => & $val ){ if( $name == 'input' ) $val = strip_tags( $val ); if( $name == 'checkbox' ) $val = intval( $val ); } } return $options; }