<?php if (!defined('ABSPATH')) { exit; } $plugin_dir = basename(dirname(__FILE__)) . '/languages'; load_plugin_textdomain('wp-youtube-lyte', false, $plugin_dir); add_action('admin_menu', 'lyte_create_menu'); if (get_option('lyte_emptycache', '0') === "1") { $emptycache = lyte_rm_cache(); if ($emptycache === "OK") { add_action('admin_notices', 'lyte_cacheclear_ok_notice'); } else { add_action('admin_notices', 'lyte_cacheclear_fail_notice'); } update_option('lyte_emptycache', '0'); } function lyte_cacheclear_ok_notice() { echo '<div class="updated"><p>'; _e('Your WP YouTube Lyte cache has been succesfully cleared.', 'wp-youtube-lyte'); echo '</p></div>'; } function lyte_cacheclear_fail_notice() { echo '<div class="error"><p>'; _e('There was a problem, the WP YouTube Lyte cache could not be cleared.', 'wp-youtube-lyte'); echo '</p></div>'; } function lyte_create_menu() {
case "1.4.0": lyte_rm_cache(); lyte_not_greedy(); break; } update_option('lyte_version', $lyte_version); $lyte_db_version = $lyte_version; } /** are we in debug-mode */ if (!$debug) { $wyl_version = $lyte_version; $wyl_file = "lyte-min.js"; } else { $wyl_version = rand() / 1000; $wyl_file = "lyte.js"; lyte_rm_cache(); } /** get paths, language and includes */ $plugin_dir = basename(dirname(__FILE__)) . '/languages'; load_plugin_textdomain('wp-youtube-lyte', null, $plugin_dir); require_once dirname(__FILE__) . '/player_sizes.inc.php'; require_once dirname(__FILE__) . '/widget.php'; /** get default embed size and build array to change size later if requested */ $oSize = (int) get_option('lyte_size'); if (is_bool($oSize) || $pSize[$oSize]['a'] === false) { $sel = (int) $pDefault; } else { $sel = $oSize; } $pSizeFormat = $pSize[$sel]['f']; $j = 0;