Description: A simple search for find strings in your database and replace the string. Use in <a href="admin.php?page=search-and-replace/search-and-replace.php">Manage -> Search/Replace</a>. 
Author: <a href='http://thedeadone.net/'>Mark Cunningham</a> and <a href="http://bueltge.de" >Frank Bueltge</a>
Version: 2.3
*/

/**
Um dieses Plugin zu nutzen, musst du das File in den 
Plugin-Ordner deines WP kopieren und aktivieren.
Es fuegt einen neuen Tab im Bereich "Verwalten" hinzu.
Dort koennen Strings dann gesucht und ersetzt werden.
*/

if(function_exists('load_plugin_textdomain'))
	load_plugin_textdomain('searchandreplace', PLUGINDIR . '/search-and-replace/languages');

if ( !is_plugin_page() ) {

	function tdo_searchandreplace_hook(){
		if (function_exists('add_management_page')) {
			add_management_page(__('Suchen &amp; Ersetzen', 'searchandreplace'),
													__('Suchen &amp; Ersetzen', 'searchandreplace'),
													10, /* only admins */
													__FILE__,
													'tdo_searchandreplace_hook');
		}
	}
	
	add_action('admin_head', 'tdo_searchandreplace_hook');
	
} else {
Example #2
0
 function show_light($img_path, $options = array())
 {
     # output
     $o = "";
     # parse arugments
     $text_ratings = isset($options["text_ratings"]) ? $options["text_ratings"] : get_option("wp_movie_ratings_text_ratings");
     $five_stars_ratings = isset($options["five_stars_ratings"]) ? $options["five_stars_ratings"] : get_option("wp_movie_ratings_five_stars_ratings");
     $highlight = isset($options["highlight"]) ? $options["highlight"] : get_option("wp_movie_ratings_highlight");
     # Movie title
     $is_url = !empty($this->_replacement_url) || !empty($this->_url) ? true : false;
     if ($is_url) {
         $o .= "<a href=\"";
         $o .= !empty($this->_replacement_url) ? $this->_replacement_url : $this->_url;
         $o .= "\" title=\"{$this->_title}\n";
         $o .= "(watched and reviewed on {$this->_watched_on})\">";
     }
     $o .= "<small>" . $this->_title;
     if ($is_url) {
         $o .= "</a>";
     }
     $o .= "\n";
     # !important (gives space after movie's title regardless of the link)
     # Edit link
     if (!is_plugin_page()) {
         $user = wp_get_current_user();
         if ($user->ID && $user->user_level >= 8) {
             $o .= "<a class=\"edit\" href=\"" . get_settings('siteurl') . "/wp-admin/tools.php?page=wp_movie_ratings_management&amp;action=edit&amp;id=" . $this->_id . "\">e</a>\n";
         }
     }
     $o .= "</small>\n";
     # Text rating
     if ($text_ratings == "yes" && $this->_rating != 0) {
         $o .= "<span class=\"rating" . ($this->_rating == 9 ? " half_light" : "") . ($this->_rating == 10 ? " highlight" : "") . "\"><span class=\"value\">";
         $o .= $five_stars_ratings == "yes" ? $this->_rating / 2 : $this->_rating;
         $o .= "</span>/<span class=\"best\">";
         $o .= $five_stars_ratings == "yes" ? "5" : "10";
         $o .= "</span></span>\n";
     }
     # Stars rating using images
     if ($text_ratings == "no" && $this->_rating != 0) {
         $o .= "<div class=\"rating_stars\">\n";
         if ($five_stars_ratings == "yes") {
             for ($i = 1; $i < 6; $i++) {
                 if ($this->_rating == $i * 2 - 1) {
                     $img_name = "half_star" . ($highlight == "yes" ? $this->_rating == 9 ? "_half_light" : "" : "") . ".gif";
                     $img_alt = "+";
                 } else {
                     if ($this->_rating >= $i * 2) {
                         $img_name = "full_star" . ($highlight == "yes" ? ($this->_rating == 10 ? "_highlight" : "") . ($this->_rating == 9 ? "_half_light" : "") : "") . ".gif";
                         $img_alt = "*";
                     } else {
                         $img_name = "empty_star.gif";
                         $img_alt = "";
                     }
                 }
                 $o .= "<img src=\"{$img_path}" . "{$img_name}\" alt=\"{$img_alt}\" />\n";
             }
         } else {
             for ($i = 1; $i < 11; $i++) {
                 if ($this->_rating >= $i) {
                     $img_name = "full_star" . ($highlight == "yes" ? ($this->_rating == 10 ? "_highlight" : "") . ($this->_rating == 9 ? "_half_light" : "") : "") . ".gif";
                     $img_alt = "*";
                 } else {
                     $img_name = "empty_star.gif";
                     $img_alt = "";
                 }
                 $o .= "<img src=\"{$img_path}" . "{$img_name}\" alt=\"{$img_alt}\" />\n";
             }
         }
         $o .= "</div>\n";
     }
     # Review
     if ($this->_review != "") {
         $o .= "<p><small>" . $this->_review . "</small></p>";
     }
     return $o;
 }
//-- 		CONSTANTS
//--
define('ADSDEL_OPTIONS_ID', 'acmetech_adsensedeluxe');
//--
//-- OUTPUTS debugging info in html comments on blog pages.
//--
$__AdSDelx_Debug__ = false;
//--
//-- If set to false, live adsense ads displayed in Post editing preview
//--
$__AdSDelx_USE_PREV_PLACEHOLDER = true;
/* 
adsense-deluxe
This function replaces <!--adsense--> or <!--adsense[#name]-->tags with actual Google Adsense code
*/
if (function_exists('is_plugin_page') && is_plugin_page()) {
    AdsenseDeluxeOptionsPanel();
    // check here to see if the broken 1.5 options page feature is fixed
} else {
    function adsense_deluxe_insert_ads($data)
    {
        global $__AdSDelx_USE_PREV_PLACEHOLDER, $__ACMETECH_CLIENT_ID__, $__ACMETECH_AD_PARTNER__, $doing_rss, $_adsdel_adcount;
        /* tracks number of posts we've processed on home page */
        $MAX_ADS_PER_PAGE = 3;
        // MAX # of AdSense ads to allow on a given page
        $EDITING_PAGE = false;
        $PLACEHOLDER = '<span style="background-color:#99CC00;border:1px solid #0000CC;padding:3px 8px 3px 8px;font-weight:bold;color:#111;">&lt;!--@@--&gt;</span>';
        $PLACEHOLDER_DISABLED = '<span style="background-color:#99CC00;border:1px solid #0000CC;padding:3px 8px 3px 8px;font-weight:normal;font-style:italic;color:#C00;">&lt;!--@@--&gt;</span>';
        /*
         * For format of $options, see _AdsDel_CreateDefaultOptions()
         *
Example #4
0
function mcecomment_init()
{
    global $post;
    $mcecomment_options = get_option('mcecomment_options');
    $mcecomment_mce_path = get_option('siteurl');
    if (mcecomment_isNewWP()) {
        //TODO: Gzip & cache support
        $mcecomment_mce_path .= '/wp-includes/js/tinymce/tiny_mce.js';
    } else {
        $mcecomment_mce_path .= '/wp-includes/js/tinymce/tiny_mce_gzip.php';
    }
    $mcecomment_mce_init = get_option('siteurl') . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/tinyMCEComments.php?init';
    if ('open' == $post->comment_status or 'comment' == $post->comment_type or is_plugin_page()) {
        echo '<script type="text/javascript" src="' . $mcecomment_mce_path . '"></script>';
        echo '<script type="text/javascript" src="' . $mcecomment_mce_init . '"></script>';
    }
}
Example #5
0
function mfbfw_load()
{
    $settings = mfbfw_get_settings();
    if ($settings['loadAtFooter']) {
        $loadAtFooter = true;
    }
    if (!is_admin()) {
        // avoid the scripts from loading on admin panel
        if ($settings['nojQuery']) {
            wp_enqueue_script('fancybox', FBFW_URL . '/js/jquery.fancybox-1.2.6.min.js', $loadAtFooter);
            // Load fancybox without jQuery (for troubleshooting)
        } else {
            wp_enqueue_script('fancybox', FBFW_URL . '/js/jquery.fancybox-1.2.6.min.js', array('jquery'), '1.3.2', $loadAtFooter);
            // Load fancybox with jQuery
        }
        if (get_option('mfbfw_easing')) {
            wp_enqueue_script('jqueryeasing', FBFW_URL . '/js/jquery.easing.1.3.min.js', array('jquery'), '1.3.2', $loadAtFooter);
            // Load easing javascript file if required
        }
    } elseif (is_plugin_page()) {
        wp_enqueue_script('jquery-ui-tabs', array('jquery-ui-core'));
        // Load jQuery UI Tabs for Admin Page
        wp_enqueue_script('fancyboxadmin', FBFW_URL . '/js/admin.js', array('jquery'), '1.3.2');
        // Load specific JS for Admin Page
    }
}
 /**
  * Enque Plugin Assets
  */
 public function enque_plugin_assets()
 {
     if (is_admin()) {
         function is_edit_page($new_edit = null)
         {
             global $pagenow;
             //make sure we are on the backend
             if (!is_admin()) {
                 return false;
             }
             if ($new_edit == "edit") {
                 return in_array($pagenow, array('post.php'));
             } elseif ($new_edit == "new") {
                 //check for new post page
                 return in_array($pagenow, array('post-new.php'));
             } else {
                 //check for either new or edit
                 return in_array($pagenow, array('post.php', 'post-new.php'));
             }
         }
         if (is_plugin_page() || is_edit_page()) {
             $path = plugin_dir_url();
             wp_enqueue_style('hbs-css', $path . 'hanbootstrap/css/hbs.css');
             if ($_GET["page"] == "hanbs-namespace-admin") {
                 wp_enqueue_script('jquery-hbs', $path . 'hanbootstrap/js/jquery.1.11.0.js', null, null, true);
                 wp_enqueue_script('hbs-validation', $path . 'hanbootstrap/js/hbs_validation.js', 'jquery-hbs', '9880649384aea9f1ee166331c0a30daa', true);
             }
         }
     }
 }
Example #7
0
    echo "<h3>Version 1.5.0 <small>march 3rd 2005</small></h3>\n<ol>\n<li>Brought CJD Mass Delete into line with WordPress 1.5</li>\n<li>Moved CJD Mass Delete to the new spam system in WordPress 1.5.</li>\n<li>Added the ability to delete all comments flagged as \"spam\" with one click.</li>\n<li>Moved the menu item to the Manage page and renamed it to Spam.</li>\n</ol>\n";
    echo "<p>\n<a href=\"../../wp-admin/plugins.php\">return to plugins page</a> | <a href=\"http://www.chrisjdavis.org/donate/\" title=\"Donate\">donate to the cause</a> | <a href=\"http://www.chrisjdavis.org/index.php/category/wp-hacks/\" title=\"more plugins\">get more plugins</a>\n</p>\n</div>";
    die;
}
$waiting_spam = $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam'");
if (!function_exists('cjd_delete_add_manage_page')) {
    function cjd_delete_add_manage_page()
    {
        global $waiting_spam;
        $spam_count = "Spam (" . $waiting_spam . ")";
        if (function_exists('add_management_page')) {
            add_management_page("Spam", $spam_count, 1, __FILE__);
        }
    }
}
if (is_plugin_page()) {
    switch ($_POST['submit']) {
        case 'Nuke em!':
            $i = 0;
            foreach ($delete_spam as $comment) {
                $comment = (int) $comment;
                $wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_ID = {$comment} AND comment_approved = 'spam'");
                ++$i;
            }
            echo '<div class="updated"><p>' . sprintf(__('%s comments deleted.'), $i) . "</p></div>";
            break;
        case 'Unspam me!':
            $i = 0;
            foreach ($not_spam as $comment) {
                $comment = (int) $comment;
                $wpdb->query("UPDATE {$wpdb->comments} SET comment_approved = '1' WHERE comment_ID = {$comment} AND comment_approved = 'spam'");
function wp_movie_ratings_get($count = null, $options = array())
{
    # output
    $o = "";
    # parse function parameters
    if ($count == null) {
        $count = get_option("wp_movie_ratings_count");
    }
    $text_ratings = isset($options["text_ratings"]) ? $options["text_ratings"] : get_option("wp_movie_ratings_text_ratings");
    $include_review = isset($options["include_review"]) ? $options["include_review"] : get_option("wp_movie_ratings_include_review");
    $expand_review = isset($options["expand_review"]) ? $options["expand_review"] : get_option("wp_movie_ratings_expand_review");
    $sidebar_mode = isset($options["sidebar_mode"]) ? $options["sidebar_mode"] : get_option("wp_movie_ratings_sidebar_mode");
    $five_stars_ratings = isset($options["five_stars_ratings"]) ? $options["five_stars_ratings"] : get_option("wp_movie_ratings_five_stars_ratings");
    $highlight = isset($options["highlight"]) ? $options["highlight"] : get_option("wp_movie_ratings_highlight");
    $page_mode = isset($options["page_mode"]) ? $options["page_mode"] : "no";
    $page_url = isset($options["page_url"]) ? $options["page_url"] : get_option("wp_movie_ratings_page_url");
    $char_limit = isset($options["char_limit"]) ? intval($options["char_limit"]) : get_option("wp_movie_ratings_char_limit");
    $only_not_rated = isset($options["only_not_rated"]) ? $options["only_not_rated"] : "no";
    $only_rated = isset($options["only_rated"]) ? $options["only_rated"] : "no";
    # parse query parameters for page mode (sorting options) (title/rating/watched_on && ASC/DESC)
    if ($page_mode == "yes") {
        if (isset($_GET["sort"])) {
            $order_by = $_GET["sort"];
        } else {
            $order_by = get_option("wp_movie_ratings_order_by");
        }
        if (isset($_GET["descending"])) {
            $order_direction = "DESC";
        } else {
            if (isset($_GET["ascending"])) {
                $order_direction = "ASC";
            } else {
                $order_direction = get_option("wp_movie_ratings_order_direction");
            }
        }
        # pagination logic
        $current_page = isset($_GET["movies_page"]) ? $_GET["movies_page"] : 1;
        $limit = get_option("wp_movie_ratings_pagination_limit");
        $start = ($current_page - 1) * $limit;
    }
    # for 'only not rated' and 'only rated' movies you can set 'order_by' and 'order_direction' paremeters
    if ($only_not_rated == "yes" || $only_rated == "yes") {
        $order_by = isset($options["order_by"]) ? $options["order_by"] : "title";
        $order_direction = isset($options["order_direction"]) ? $options["order_direction"] : "ASC";
    }
    # fetch movies
    $m = new Movie();
    if ($page_mode == "yes") {
        $movies = $m->get_all_movies($order_by, $order_direction, $start, $limit);
    } elseif ($only_not_rated == "yes") {
        $movies = $m->get_not_rated_movies($order_by, $order_direction, 0, $count);
    } elseif ($only_rated == "yes") {
        $movies = $m->get_rated_movies($order_by, $order_direction, 0, $count);
    } else {
        $movies = $m->get_latest_movies(intval($count));
    }
    # some comment love
    $o .= "\n<!-- Recently watched movies list by WP Movie Ratings wordpress plugin: http://pawelgoscicki.com/projects/wp-movie-ratings/ -->\n";
    if (is_active_widget(false, false, 'wp_movie_ratings_widget') && $page_mode != "yes") {
        # Widget version (light list)
        $o .= '<aside class="widget widget_movie_ratings">';
        $o .= '<h2 class="widget-title">' . stripslashes(get_option("wp_movie_ratings_dialog_title")) . '</h2>';
        $o .= '<ul>';
        if (count($movies) == 0) {
            $o .= "<li>No movies rated yet! Go and rate some.</li>\n";
        } else {
            foreach ($movies as $movie) {
                $o .= "<li>\n";
                $o .= $movie->show_light(wp_movie_ratings_get_plugin_path("absolute"), array("text_ratings" => $text_ratings, "five_stars_ratings" => $five_stars_ratings, "highlight" => $highlight));
                $o .= "</li>\n";
            }
        }
        $o .= '</ul>';
        if (!is_plugin_page() && strlen($page_url) > 0) {
            $o .= "<p id=\"page_url\"><a href=\"{$page_url}\">All movie ratings »</a></p>\n";
        }
        $o .= "</aside>\n";
    } else {
        # Normal version (with page mode views)
        # html container
        $classes = $page_mode == "yes" ? "page_mode " : "";
        $classes .= $sidebar_mode == "yes" ? "sidebar_mode " : "";
        if (strlen($classes) > 0) {
            $classes = substr($classes, 0, strlen($classes) - 1);
        }
        # drop the last space
        $o .= "<div id=\"wp_movie_ratings\"" . (strlen($classes) > 0 ? " class=\"{$classes}\"" : "") . ">\n";
        # sorting options for page mode
        if ($page_mode == "yes") {
            # $link will contain plain '&' chars
            $link = $_SERVER["REQUEST_URI"];
            # drop everything after '#' (including '#')
            if (strpos($link, "#")) {
                $link = substr($link, 0, strpos($link, "#"));
            }
            # clear link from my stuff
            $link = preg_replace("/(&|\\?)*sort=(title|rating|watched_on)&(ascending|descending)/", "", $link);
            $link = preg_replace("/(&|\\?)*movies_page=[0-9]*/", "", $link);
            # convert '&' to '&amp;' (so we're standards compliant if the base link included this char)
            $link = str_replace("&", "&amp;", $link);
            # put ? or &amp; at the end of the link depending on the situation
            if (strpos($link, "?")) {
                $link .= "&amp;";
            } else {
                $link .= "?";
            }
            # create appropriate sorting links
            $link_t = $link_r = $link_w = $link;
            $link_t .= "sort=title&amp;" . ($order_by == "title" && $order_direction == "ASC" ? "descending" : "ascending");
            $link_r .= "sort=rating&amp;" . ($order_by == "rating" && $order_direction == "DESC" ? "ascending" : "descending");
            $link_w .= "sort=watched_on&amp;" . ($order_by == "watched_on" && $order_direction == "DESC" ? "ascending" : "descending");
            $o .= "<p id=\"sort_options\">Sort list by: \n";
            $o .= "<a href=\"{$link_t}\">title" . ($order_by == "title" ? " <span class=\"bullet\">&" . ($order_direction == "ASC" ? "u" : "d") . "arr;</span>" : "") . "</a> | \n";
            $o .= "<a href=\"{$link_r}\">rating" . ($order_by == "rating" ? " <span class=\"bullet\">&" . ($order_direction == "ASC" ? "u" : "d") . "arr;</span>" : "") . "</a> | \n";
            $o .= "<a href=\"{$link_w}\">view date" . ($order_by == "watched_on" ? " <span class=\"bullet\">&" . ($order_direction == "ASC" ? "u" : "d") . "arr;</span>" : "") . "</a>\n";
            $o .= "</p>\n";
        }
        # dialog title
        $dialog_title = stripslashes(get_option("wp_movie_ratings_dialog_title"));
        if ($page_mode != "yes" && strlen($dialog_title) > 0) {
            $o .= "<h2 id=\"reviews_title\">{$dialog_title}</h2>\n";
        }
        $o .= "<ul id=\"reviews\"" . ($text_ratings == "yes" ? " class=\"text_ratings\"" : "") . ">\n";
        if (count($movies) == 0) {
            $o .= "<li>No movies rated yet! Go and rate some.</li>\n";
        } else {
            $i = 0;
            # row alternator
            $separator = "";
            # used when sorting by view date when in page mode
            $separator_last = "";
            foreach ($movies as $movie) {
                # Separator logic
                if ($page_mode == "yes" && $order_by == "watched_on") {
                    $separator = substr($movie->_watched_on, 0, 7);
                    if ($i == 0 || $separator != $separator_last) {
                        $o .= "<li class=\"separator\">";
                        $o .= "<h3" . ($i == 0 ? " class=\"first\"" : "") . ">";
                        $o .= date("F, Y", mktime(1, 1, 0, substr($separator, 5, 2), 1, substr($separator, 0, 4)));
                        $o .= "</h3></li>\n";
                    }
                    $separator_last = $separator;
                }
                # Movie display
                $o .= "<li" . (++$i % 2 == 0 ? " class=\"odd\"" : "") . ">\n";
                $o .= $movie->show(wp_movie_ratings_get_plugin_path("absolute"), array("include_review" => $include_review, "text_ratings" => $text_ratings, "sidebar_mode" => $sidebar_mode, "five_stars_ratings" => $five_stars_ratings, "highlight" => $highlight, "page_mode" => $page_mode, "char_limit" => $char_limit));
                $o .= "</li>\n";
            }
        }
        $o .= "</ul>\n";
        # Pagination
        if ($page_mode == "yes") {
            $total_movies = $m->get_watched_movies_count("total");
            $total_pages = ceil($total_movies / $limit);
            # display only if $limit is less than $total, so that the pagination makes sense
            if ($limit < $total_movies) {
                $link = $_SERVER["REQUEST_URI"];
                # change '&' in link to a more compliant '&amp;'
                $link = preg_replace("/&/", "&amp;", $link);
                # drop everything after '#' (including '#')
                if (strpos($link, "#")) {
                    $link = substr($link, 0, strpos($link, "#"));
                }
                # cleanup of my sh*t
                $link = preg_replace("/(&amp;|\\?)*movies_page=[0-9]*/", "", $link);
                # put ? or &amp; at the end of the link depending on the situation
                if (strpos($link, "?")) {
                    $link .= "&amp;";
                } else {
                    $link .= "?";
                }
                $o .= "<div id=\"pagination\"><p>";
                # prev button
                if ($current_page > 1) {
                    $o .= "<a class=\"next_prev\" href=\"" . $link . "movies_page=" . ($current_page - 1) . "\">";
                } else {
                    $o .= "<em class=\"next_prev\">";
                }
                $o .= " <span class=\"bullet\">&larr;</span> previous";
                if ($current_page > 1) {
                    $o .= "</a> ";
                } else {
                    $o .= "</em> ";
                }
                $o .= "\n";
                # pages
                for ($i = 1; $i <= $total_pages; $i++) {
                    if ($current_page != $i) {
                        $o .= "<a href=\"" . $link . "movies_page=" . $i . "\">";
                    } else {
                        $o .= "<em id=\"current\">";
                    }
                    $o .= $i;
                    if ($current_page != $i) {
                        $o .= "</a> ";
                    } else {
                        $o .= "</em> ";
                    }
                    $o .= "\n";
                }
                # next button
                if ($current_page < $total_pages) {
                    $o .= "<a class=\"next_prev\" href=\"" . $link . "movies_page=" . ($current_page + 1) . "\">";
                } else {
                    $o .= "<em class=\"next_prev\">";
                }
                $o .= "next <span class=\"bullet\">&rarr;</span>";
                if ($current_page < $total_pages) {
                    $o .= "</a>";
                } else {
                    $o .= "</em>";
                }
                $o .= "\n";
                $o .= "</p></div>\n";
            }
        }
        # Please do not remove the love ad. Thank you :-)
        if ($page_mode == "yes") {
            $o .= "<p id=\"link_love\">List generated by <a href=\"http://pawelgoscicki.com/projects/wp-movie-ratings/\">WP Movie Ratings</a>.</p>\n";
        } else {
            if (!is_plugin_page() && strlen($page_url) > 0) {
                $o .= "<p id=\"page_url\"><a href=\"{$page_url}\">All movie ratings »</a></p>\n";
            }
        }
        $o .= "</div>\n";
    }
    return $o;
}
Example #9
0
	 *
	 * @return void
	 */
    public function __construct()
    {
        global $extensions, $stage;
        $stage = get_option('concerto_stage');
        // Require the individual Administration Pages
        require_once CONCERTO_ADM . 'general.php';
        require_once CONCERTO_ADM . 'design.php';
        require_once CONCERTO_ADM . 'tools.php';
        require_once CONCERTO_ADM . 'support.php';
        // Hook boxes to their assigned places
        require_once CONCERTO_ADM . 'actions.php';
        // Bind Concerto to Wordpress
        add_action('admin_init', array($this, 'init'));
        add_action('admin_menu', array($this, 'menu'));
    }
    /**
	 * Init
	 *
	 * Hooked to admin_init. Sets up the scripts and nonce for use in the admin.
	 * Registers the settings and passes the upload
	 *
	 * @return void
	 */
    public function init()
    {
        // We Include our Javascript Files
        $stylesheet_directory = get_bloginfo('stylesheet_directory');
        wp_register_script('jQueryMasonry', $stylesheet_directory . '/core/scripts/jquery.masonry.js', null, CONCERTO_VERSION);
        wp_register_script('jQuerySWFUpload', $stylesheet_directory . '/core/scripts/jquery.swfupload.js', null, CONCERTO_VERSION);
        wp_register_script('concertoAdmin', $stylesheet_directory . '/core/scripts/concerto.admin.js', null, CONCERTO_VERSION);
        wp_enqueue_script('jQueryMasonry');
        wp_enqueue_style('concertoAdmin', $stylesheet_directory . '/core/admin/style.css');
        // Attach ajax functionality
        add_action('wp_ajax_pinglicense', array($this, 'license'));
        // Check if we have valid configurations for our Stage
        global $stage;
        if (!get_option('concerto_' . $stage . '_design_html_version')) {
            require_once CONCERTO_LIBS . 'defaults.php';
            defaultOptions($stage, null, true);
        }
        if (is_plugin_page()) {
            if ($_GET['page'] == 'concerto_admin_menu' || $_GET['page'] == 'concerto_admin_design' || $_GET['page'] == 'concerto_admin_tools') {
                wp_enqueue_script('swfupload');
                wp_enqueue_script('jQuerySWFUpload');
                wp_enqueue_script('concertoAdmin');
            }
            if ($_GET['page'] == 'concerto_admin_menu' || $_GET['page'] == 'concerto_admin_design') {
                wp_enqueue_script('jquery-ui-sortable', null, array('jquery-ui-core'));
            }
            if ($_GET['page'] == 'concerto_admin_design') {
                wp_enqueue_script('farbtastic');
                wp_enqueue_style('farbtastic');
            }
            if ($_GET['page'] == 'concerto_admin_tools') {
                if (!empty($_POST['concerto_exportconfig_nonce']) || !empty($_POST['concerto_restoreconfig_nonce']) || !empty($_POST['concerto_newstage_nonce'])) {
                    require_once 'functions.php';
                    $context = array();
                    if (!empty($_POST['concerto_tools_export_from'])) {
                        if (wp_verify_nonce($_POST['concerto_exportconfig_nonce'], 'concerto_exportconfig')) {
                            if (@$_POST['concerto_tools_export_general'] == 1) {
                                $context[] = 'general';
                            }
                            if (@$_POST['concerto_tools_export_design'] == 1) {
                                $context[] = 'design';
                            }
                            $stage = $_POST['concerto_tools_export_from'];
                            if (!empty($context)) {
                                exportConcertoOptions($stage, $context);
                            }
                        }
                    }
                    if (!empty($_POST['concerto_tools_restore_from'])) {
                        if (wp_verify_nonce($_POST['concerto_restoreconfig_nonce'], 'concerto_restoreconfig')) {
                            if (@$_POST['concerto_tools_restore_general'] == 1) {
                                $context[] = 'general';
                            }
                            if (@$_POST['concerto_tools_restore_design'] == 1) {
                                $context[] = 'design';
                            }
                            $stage = $_POST['concerto_tools_restore_from'];
                            if (!empty($context)) {
                                restoreConcertoOptions($stage, $context);
                                $location = get_bloginfo('url') . '/wp-admin/admin.php?page=concerto_admin_tools&restored=1&restored_to=' . urlencode($stage) . '&restored_context=' . urlencode(implode(',', $context));
                                wp_redirect($location);
                                exit;
                            }
                        }
                    }
                    if (!empty($_POST['concerto_newstage_nonce']) && !empty($_POST['concerto_tools_stage_name'])) {
                        if (wp_verify_nonce($_POST['concerto_newstage_nonce'], 'concerto_newstage')) {
                            $stage = $_POST['concerto_tools_stage_name'];
                            $code = createStage($stage);
                            if ($code == 1) {
<?php

/*
Plugin Name: Get Recent Comments
Version: 2.0.2
Plugin URI: http://blog.jodies.de/archiv/2004/11/13/recent-comments/
Author: Krischan Jodies
Author URI: http://blog.jodies.de
Description: Display the most recent comments or trackbacks with your own formatting in the sidebar. Visit <a href="options-general.php?page=get-recent-comments.php">Options/Recent Comments</a> after activation of the plugin.
*/
if (function_exists("is_plugin_page") && is_plugin_page()) {
    kjgrc_options_page();
    return;
}
function kjgrc_subpage_misc()
{
    ?>
<h2><?php 
    _e('Miscellaneous Options');
    ?>
</h2>
<form method="post" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?page=get-recent-comments.php&amp;subpage=6&amp;updated=true">
<input type="hidden" name="function" value="misc">
<?php 
    wp_nonce_field('update-options');
    ?>

<p class="submit"><input type="submit" name="Submit" value="<?php