. */ //define('WP_DEBUG', true); class YouTubePrefs { public static $version = '11.2'; public static $opt_version = 'version'; public static $optembedwidth = null; public static $optembedheight = null; public static $defaultheight = null; public static $defaultwidth = null; public static $oembeddata = null; public static $opt_center = 'centervid'; public static $opt_glance = 'glance'; public static $opt_autoplay = 'autoplay'; public static $opt_debugmode = 'debugmode'; public static $opt_old_script_method = 'old_script_method'; public static $opt_cc_load_policy = 'cc_load_policy'; public static $opt_iv_load_policy = 'iv_load_policy'; public static $opt_loop = 'loop'; public static $opt_modestbranding = 'modestbranding'; public static $opt_rel = 'rel'; public static $opt_showinfo = 'showinfo'; public static $opt_playsinline = 'playsinline'; public static $opt_autohide = 'autohide'; public static $opt_controls = 'controls'; public static $opt_theme = 'theme'; public static $opt_color = 'color'; public static $opt_listType = 'listType'; public static $opt_wmode = 'wmode'; public static $opt_vq = 'vq'; public static $opt_html5 = 'html5'; public static $opt_dohl = 'dohl'; public static $opt_hl = 'hl'; public static $opt_ssl = 'ssl'; public static $opt_ogvideo = 'ogvideo'; public static $opt_nocookie = 'nocookie'; public static $opt_playlistorder = 'playlistorder'; public static $opt_acctitle = 'acctitle'; public static $opt_pro = 'pro'; public static $opt_oldspacing = 'oldspacing'; public static $opt_responsive = 'responsive'; public static $opt_responsive_all = 'responsive_all'; public static $opt_origin = 'origin'; public static $opt_widgetfit = 'widgetfit'; public static $opt_evselector_light = 'evselector_light'; public static $opt_defaultdims = 'defaultdims'; public static $opt_defaultwidth = 'width'; public static $opt_defaultheight = 'height'; public static $opt_defaultvol = 'defaultvol'; public static $opt_vol = 'vol'; public static $opt_apikey = 'apikey'; public static $opt_schemaorg = 'schemaorg'; public static $opt_ftpostimg = 'ftpostimg'; public static $opt_spdc = 'spdc'; public static $opt_spdcexp = 'spdcexp'; public static $opt_migrate = 'migrate'; public static $opt_migrate_youtube = 'migrate_youtube'; public static $spdcprefix = 'ytpref'; public static $spdcall = 'youtubeprefs_spdcall'; public static $opt_dynload = 'dynload'; public static $opt_dyntype = 'dyntype'; public static $opt_gallery_pagesize = 'gallery_pagesize'; public static $opt_gallery_apikey = 'gallery_apikey'; public static $opt_gallery_columns = 'gallery_columns'; public static $opt_gallery_style = 'gallery_style'; public static $opt_gallery_scrolloffset = 'gallery_scrolloffset'; public static $opt_gallery_showtitle = 'gallery_showtitle'; public static $opt_gallery_showpaging = 'gallery_showpaging'; public static $opt_gallery_thumbplay = 'gallery_thumbplay'; public static $opt_gallery_autonext = 'gallery_autonext'; public static $opt_gallery_channelsub = 'gallery_channelsub'; public static $opt_gallery_channelsublink = 'gallery_channelsublink'; public static $opt_gallery_channelsubtext = 'gallery_channelsubtext'; public static $opt_gallery_customarrows = 'gallery_customarrows'; public static $opt_gallery_customprev = 'gallery_customprev'; public static $opt_gallery_customnext = 'gallery_customnext'; public static $opt_gallery_showdsc = 'gallery_showdsc'; public static $opt_gallery_thumbcrop = 'gallery_thumbcrop'; public static $opt_admin_off_scripts = 'admin_off_scripts'; public static $opt_alloptions = 'youtubeprefs_alloptions'; public static $alloptions = null; public static $yt_options = array(); //public static $epbase = 'http://localhost:2346'; public static $epbase = '//www.embedplus.com'; public static $double_plugin = false; public static $scriptsprinted = 0; public static $min = '.min'; public static $badentities = array('×', '×', '–', '–', '&', '&', '&'); public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&'); /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// //public static $ytregex = '@^[\r\n]{0,1}[[:blank:]]*https?://(?:www\.)?(?:(?:youtube.com/watch\?)|(?:youtu.be/))([^\s"]+)[[:blank:]]*[\r\n]{0,1}$@im'; public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im'; public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im'; public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i'; /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// public function __construct() { add_action('admin_init', array("YouTubePrefs", 'check_double_plugin_warning')); self::$alloptions = get_option(self::$opt_alloptions); if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<')) { self::initoptions(); } if (self::$alloptions[self::$opt_oldspacing] == 1) { self::$ytregex = self::$oldytregex; } self::$optembedwidth = intval(get_option('embed_size_w')); self::$optembedheight = intval(get_option('embed_size_h')); self::$yt_options = array( self::$opt_autoplay, self::$opt_cc_load_policy, self::$opt_iv_load_policy, self::$opt_loop, self::$opt_modestbranding, self::$opt_rel, self::$opt_showinfo, self::$opt_playsinline, self::$opt_autohide, self::$opt_controls, self::$opt_html5, self::$opt_hl, self::$opt_theme, self::$opt_color, self::$opt_listType, self::$opt_wmode, self::$opt_vq, 'index', 'list', 'start', 'end' ); add_action('media_buttons', 'YouTubePrefs::media_button_wizard', 11); self::do_ytprefs(); add_action('admin_menu', 'YouTubePrefs::ytprefs_plugin_menu'); if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8) { add_action('admin_bar_menu', 'YouTubePrefs::ytprefs_admin_bar', 100); add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefs_admin_bar_scripts')); add_action('admin_enqueue_scripts', array('YouTubePrefs', 'ytprefs_admin_bar_scripts')); } if (!is_admin()) { if (self::$alloptions[self::$opt_old_script_method] == 1) { add_action('wp_print_scripts', array('YouTubePrefs', 'jsvars')); add_action('wp_enqueue_scripts', array('YouTubePrefs', 'jsvars')); } add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefsscript'), 100); add_action('wp_enqueue_scripts', array('YouTubePrefs', 'fitvids'), 101); if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_ogvideo] == 1) { add_action('wp_head', array('YouTubePrefs', 'do_ogvideo')); } } if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { self::$min = ''; } } public static function ytprefs_admin_bar_scripts() { if (current_user_can('edit_posts')) { wp_enqueue_script('__ytprefs__bar', plugins_url('scripts/ytprefs-bar' . self::$min . '.js', __FILE__), array('jquery')); wp_localize_script('__ytprefs__bar', '_EPYTA_', array( 'ajaxurl' => admin_url('admin-ajax.php'), 'security' => wp_create_nonce('embedplus-nonce'), 'pluginurl' => plugins_url('/', __FILE__) )); } } public static function ytprefs_admin_bar($wp_admin_bar) { $args = array( 'id' => 'ytprefs-bar-cache', 'title' => 'Clear YouTube Cache', 'href' => '#', 'meta' => array( 'class' => '' ) ); $wp_admin_bar->add_node($args); } public static function show_glance_list() { $glancehref = self::show_glance(); $cnt = self::get_glance_count(); //display via list return '
You currently do not have any YouTube embeds yet.
'; } } wp_reset_postdata(); ?> To remove this feature from your dashboard, simply uncheck Show "At a Glance" Embed Links in the plugin settings page ».This post/page contains a video that has been removed from YouTube.';
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
{
$thehtml .='
Activate delete video tracking to catch these cases »';
}
$thehtml .= '';
}
}
catch (Exception $ex)
{
}
}
else if (isset($linkparams['list']))
{
// if playlist
try
{
$odata = self::get_oembed('https://youtube.com/playlist?list=' . $linkparams['list'], 1920, 1280);
$postlink = get_permalink($postid);
if ($odata != null && !is_wp_error($odata))
{
$_name = esc_attr(sanitize_text_field($odata->title));
$_description = esc_attr(sanitize_text_field($odata->author_name));
$_thumbnailUrl = esc_url($odata->thumbnail_url);
$thehtml .= '';
$thehtml .= '
This post/page contains a video that has been removed from YouTube.';
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
{
$thehtml .='
Activate delete video tracking to catch these cases »';
}
$thehtml .= '';
}
}
catch (Exception $ex)
{
}
}
}
}
if ($currpost != null)
{
$result['type'] = 'success';
$result['data'] = $thehtml;
}
else
{
$result['type'] = 'error';
}
echo json_encode($result);
}
else
{
$result['type'] = 'error';
header("Location: " . $_SERVER["HTTP_REFERER"]);
}
die();
}
public static function my_embedplus_glance_count()
{
$result = array();
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{
$thehtml = '';
try
{
if (version_compare(get_bloginfo('version'), '3.8', '>='))
{
$result['container'] = '#dashboard_right_now ul';
$thehtml .= self::show_glance_list();
}
else
{
$result['container'] = '#dashboard_right_now .table_content table tbody';
$thehtml .= self::show_glance_table();
}
$result['type'] = 'success';
$result['data'] = $thehtml;
}
catch (Exception $e)
{
$result['type'] = 'error';
}
echo json_encode($result);
}
else
{
$result['type'] = 'error';
header("Location: " . $_SERVER["HTTP_REFERER"]);
}
die();
}
public static function media_button_wizard()
{
add_thickbox();
$wizhref = self::$epbase . '/wpembedcode-simple-search-' . YouTubePrefs::$version . '.aspx?pluginversion=' . YouTubePrefs::$version .
'&wpversion=' . get_bloginfo('version') .
'&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) .
'&dashurl=' . urlencode(admin_url('admin.php?page=youtube-ep-analytics-dashboard')) .
'&blogwidth=' . YouTubePrefs::get_blogwidth() .
'&domain=' . urlencode(site_url()) .
'&prokey=' . urlencode(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) .
'&myytdefaults=' . urlencode(http_build_query(YouTubePrefs::$alloptions)) .
'&random=' . rand(1, 1000) .
'&TB_iframe=true&width=950&height=800';
?>
YouTube
' . $_SERVER['QUERY_STRING'] .'';
if ($pagenow == 'plugins.php' || strpos($_SERVER['QUERY_STRING'], 'youtube-my-preferences') !== false ||
strpos($_SERVER['QUERY_STRING'], 'embedplus-video-analytics-dashboard') !== false ||
strpos($_SERVER['QUERY_STRING'], 'youtube-ep-analytics-dashboard') !== false ||
strpos($_SERVER['QUERY_STRING'], 'embedplus-official-options') !== false)
{
?>
CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . ''; return $gallobj; } $jsonResult = json_decode($apiResult['body']); if (isset($jsonResult->error)) { if (isset($jsonResult->error->message)) { $gallobj->html = '
PRO Analytics', 'manage_options', 'youtube-ep-analytics-dashboard', 'YouTubePrefs::epstats_show_options');
}
else
{
add_menu_page('YouTube Settings', 'YouTube Free', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options', plugins_url('images/youtubeicon16.png', __FILE__), '10.000392854349');
add_submenu_page('youtube-my-preferences', '', '', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options');
add_submenu_page('youtube-my-preferences', 'YouTube PRO', '
' . __('YouTube Analytics Dashboard') . "Logging you in below... (You can also click here to launch your dashboard in a new tab)
'; } else { //// header echo "This tab is here to provide direct access to analytics. Graphs and other data about your site will show below after you activate PRO.
'; // ooopointer if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)) { $new_pointer_content .= __("This update adds improved wizard and gallery options to Free and Pro versions. A \"clear YouTube cache\" shortcut was added to Pro versions »"); } else { $new_pointer_content .= __("This update adds improved wizard and gallery options to Free and Pro versions. A \"clear YouTube cache\" shortcut was added to Pro versions."); } $new_pointer_content .= '
'; return array( $prefix . 'new_items' => array( 'content' => $new_pointer_content, 'anchor_id' => 'a.toplevel_page_youtube-my-preferences', //'#ytprefs_glance_button', 'edge' => 'top', 'align' => 'left', 'active' => (!in_array($prefix . 'new_items', $dismissed) ) ), ); } public static function postchecked($idx) { return isset($_POST[$idx]) && $_POST[$idx] == (true || 'on'); } public static function ytprefs_show_options() { if (!current_user_can('manage_options')) { wp_die(__('You do not have sufficient permissions to access this page.')); } if (self::$double_plugin) { //add_action('admin_notices', array("YouTubePrefs", "double_plugin_warning")); self::double_plugin_warning(); } // variables for the field and option names $ytprefs_submitted = 'ytprefs_submitted'; // Read in existing option values from database $all = get_option(self::$opt_alloptions); // See if the user has posted us some information // If they did, this hidden field will be set to 'Y' if (isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y') { // Read their posted values $new_options = array(); $new_options[self::$opt_center] = self::postchecked(self::$opt_center) ? 1 : 0; $new_options[self::$opt_glance] = self::postchecked(self::$opt_glance) ? 1 : 0; $new_options[self::$opt_autoplay] = self::postchecked(self::$opt_autoplay) ? 1 : 0; $new_options[self::$opt_debugmode] = self::postchecked(self::$opt_debugmode) ? 1 : 0; $new_options[self::$opt_admin_off_scripts] = self::postchecked(self::$opt_admin_off_scripts) ? 1 : 0; $new_options[self::$opt_old_script_method] = self::postchecked(self::$opt_old_script_method) ? 1 : 0; $new_options[self::$opt_cc_load_policy] = self::postchecked(self::$opt_cc_load_policy) ? 1 : 0; $new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3; $new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0; $new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0; $new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0; $new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0; $new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0; $new_options[self::$opt_origin] = self::postchecked(self::$opt_origin) ? 1 : 0; $new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 2 : 0; $new_options[self::$opt_autohide] = self::postchecked(self::$opt_autohide) ? 1 : 2; $new_options[self::$opt_html5] = self::postchecked(self::$opt_html5) ? 1 : 0; $new_options[self::$opt_theme] = self::postchecked(self::$opt_theme) ? 'dark' : 'light'; $new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white'; $new_options[self::$opt_wmode] = self::postchecked(self::$opt_wmode) ? 'opaque' : 'transparent'; $new_options[self::$opt_vq] = self::postchecked(self::$opt_vq) ? 'hd720' : ''; $new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0; $new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0; $new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0; $new_options[self::$opt_ogvideo] = self::postchecked(self::$opt_ogvideo) ? 1 : 0; $new_options[self::$opt_migrate] = self::postchecked(self::$opt_migrate) ? 1 : 0; $new_options[self::$opt_migrate_youtube] = self::postchecked(self::$opt_migrate_youtube) ? 1 : 0; //$new_options[self::$opt_ssl] = self::postchecked(self::$opt_ssl) ? 1 : 0; $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0; $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0; $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0; $new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0; $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0; $new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0; $new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0; $new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0; $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0; $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0; $new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0; $new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0; $new_options[self::$opt_gallery_showpaging] = self::postchecked(self::$opt_gallery_showpaging) ? 1 : 0; $new_options[self::$opt_gallery_autonext] = self::postchecked(self::$opt_gallery_autonext) ? 1 : 0; $new_options[self::$opt_gallery_thumbplay] = self::postchecked(self::$opt_gallery_thumbplay) ? 1 : 0; $new_options[self::$opt_gallery_channelsub] = self::postchecked(self::$opt_gallery_channelsub) ? 1 : 0; $new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0; $new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0; $_defaultwidth = ''; try { $_defaultwidth = is_numeric(trim($_POST[self::$opt_defaultwidth])) ? intval(trim($_POST[self::$opt_defaultwidth])) : $_defaultwidth; } catch (Exception $ex) { } $new_options[self::$opt_defaultwidth] = $_defaultwidth; $_defaultheight = ''; try { $_defaultheight = is_numeric(trim($_POST[self::$opt_defaultheight])) ? intval(trim($_POST[self::$opt_defaultheight])) : $_defaultheight; } catch (Exception $ex) { } $new_options[self::$opt_defaultheight] = $_defaultheight; $_responsive_all = 1; try { $_responsive_all = is_numeric(trim($_POST[self::$opt_responsive_all])) ? intval(trim($_POST[self::$opt_responsive_all])) : $_responsive_all; } catch (Exception $ex) { } $new_options[self::$opt_responsive_all] = $_responsive_all; $_vol = ''; try { $_vol = is_numeric(trim($_POST[self::$opt_vol])) ? intval(trim($_POST[self::$opt_vol])) : $_vol; } catch (Exception $ex) { } $new_options[self::$opt_vol] = $_vol; $_gallery_pagesize = 12; try { $_gallery_pagesize = is_numeric(trim($_POST[self::$opt_gallery_pagesize])) ? intval(trim($_POST[self::$opt_gallery_pagesize])) : $_gallery_pagesize; } catch (Exception $ex) { } $new_options[self::$opt_gallery_pagesize] = $_gallery_pagesize; $_gallery_columns = 3; try { $_gallery_columns = is_numeric(trim($_POST[self::$opt_gallery_columns])) ? intval(trim($_POST[self::$opt_gallery_columns])) : $_gallery_columns; } catch (Exception $ex) { } $new_options[self::$opt_gallery_columns] = $_gallery_columns; $_gallery_scrolloffset = 20; try { $_gallery_scrolloffset = is_numeric(trim($_POST[self::$opt_gallery_scrolloffset])) ? intval(trim($_POST[self::$opt_gallery_scrolloffset])) : $_gallery_scrolloffset; } catch (Exception $ex) { } $new_options[self::$opt_gallery_scrolloffset] = $_gallery_scrolloffset; $_gallery_style = 'grid'; try { if (isset($_POST[self::$opt_gallery_style])) { $_gallery_style = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_style]))); } } catch (Exception $ex) { $_gallery_style = 'grid'; } $new_options[self::$opt_gallery_style] = $_gallery_style; $_gallery_thumbcrop = 'box'; try { if (isset($_POST[self::$opt_gallery_thumbcrop])) { $_gallery_thumbcrop = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_thumbcrop]))); } } catch (Exception $ex) { $_gallery_thumbcrop = 'box'; } $new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop; $_gallery_channelsublink = ''; try { $_gallery_channelsublink = trim(strip_tags($_POST[self::$opt_gallery_channelsublink])); $pieces = explode('?', $_gallery_channelsublink); $_gallery_channelsublink = trim($pieces[0]); } catch (Exception $ex) { $_gallery_channelsublink = ''; } $new_options[self::$opt_gallery_channelsublink] = $_gallery_channelsublink; $_gallery_channelsubtext = ''; try { $_gallery_channelsubtext = stripslashes(trim($_POST[self::$opt_gallery_channelsubtext])); } catch (Exception $ex) { $_gallery_channelsubtext = ''; } $new_options[self::$opt_gallery_channelsubtext] = $_gallery_channelsubtext; $_gallery_custom_prev = 'Prev'; try { $_gallery_custom_prev = trim(strip_tags($_POST[self::$opt_gallery_customprev])); } catch (Exception $ex) { $_gallery_custom_prev = 'Prev'; } $new_options[self::$opt_gallery_customprev] = $_gallery_custom_prev; $_gallery_custom_next = 'Next'; try { $_gallery_custom_next = trim(strip_tags($_POST[self::$opt_gallery_customnext])); } catch (Exception $ex) { $_gallery_custom_next = 'Next'; } $new_options[self::$opt_gallery_customnext] = $_gallery_custom_next; $_apikey = $all[self::$opt_apikey]; try { $_curr_apikey = $all[self::$opt_apikey]; $_schema_apikey = ''; if (isset($_POST[self::$opt_apikey])) { $_schema_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_apikey]))); } $_gallery_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_apikey]))); if (!empty($_schema_apikey) && $_schema_apikey != $_curr_apikey) { $_apikey = $_schema_apikey; } if (!empty($_gallery_apikey) && $_gallery_apikey != $_curr_apikey) { $_apikey = $_gallery_apikey; } } catch (Exception $ex) { } $new_options[self::$opt_apikey] = $_apikey; // $_hl = ''; // try // { // $temphl = strtolower(trim($_POST[self::$opt_hl])); // $_hl = preg_match('/^[a-z][a-z]$/i', $temphl) ? $temphl : ''; // } // catch (Exception $ex) // { // // } // $new_options[self::$opt_hl] = $_hl; $_dyntype = ''; try { if (isset($_POST[self::$opt_dyntype])) { $tempdyntype = trim($_POST[self::$opt_dyntype]); $_dyntype = preg_match('/^[a-zA-Z-]+$/i', $tempdyntype) ? $tempdyntype : ''; } } catch (Exception $ex) { } $new_options[self::$opt_dyntype] = $_dyntype; $_spdcexp = 24; try { $_spdcexp = isset($_POST[self::$opt_spdcexp]) && is_numeric(trim($_POST[self::$opt_spdcexp])) ? intval(trim($_POST[self::$opt_spdcexp])) : $_spdcexp; } catch (Exception $ex) { } $new_options[self::$opt_spdcexp] = $_spdcexp; $all = $new_options + $all; update_option(self::$opt_alloptions, $all); try { self::spdcpurge(); if ($all[self::$opt_spdc] == 1) { wp_remote_get(site_url()); } } catch (Exception $ex) { } ?>
Deleted Video Checker (alerts you if YouTube deletes videos you embedded)
Alerts when visitors from different countries are blocked from viewing your embeds
Check if your embeds have restrictions that can block mobile viewing
Priority support (Puts your request in front)
User-friendly video analytics dashboard
Automatic tagging for video SEO (will even work for your old embeds)
Unlimited PRO upgrades and downloads
[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt])
. ?>)
[embedyt]...[/embedyt] shortcode. For example: [embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK[/embedyt] Using the shortcode also allows you to have two or more videos next to each other on the same line. Just put the shortcoded links together on the same line. For example:[embedyt]http://www.youtube.com/watch?v=ABCDEF&width=400&height=250[/embedyt] [embedyt]http://www.youtube.com/watch?v=GHIJK&width=400&height=250[/embedyt]
Deactivating the No Cookies option has also been proven to solve player errors.
We also have a YouTube channel. We use it to provide users with some helper videos and a way to keep updated on new features as they are introduced. Subscribe for tips and updates here »
PRO users: Below, We've enabled the ability to have priority support with our team. Use this to get one-on-one help with any issues you might have or to send us suggestions for future features. We typically respond within minutes during normal work hours. We're always happy to accept any testimonials you might have as well.
0)) { ?>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.
admin_url('admin-ajax.php'), 'security' => wp_create_nonce('embedplus-nonce'), 'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]), 'eppathtoscripts' => plugins_url('scripts/', __FILE__), 'epresponsiveselector' => self::get_responsiveselector(), 'epdovol' => true, 'version' => self::$alloptions[self::$opt_version], 'evselector' => self::get_evselector() )); } ////////////////////// cloudflare accomodation //add_filter('script_loader_tag', 'YouTubePrefs::set_cfasync', 10, 3); if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1) { wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__)); wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery')); } } } public static function set_cfasync($tag, $handle, $src) { if ('__ytprefs__' !== $handle) { return $tag; } return str_replace('