/** * Return an instance of this class. * * @since 1.0.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn"t been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
* * Create a xml video sitemap file * * @package video-sitemap * @author bawd <*****@*****.**> * @license GPL-2.0+ * @link http://www.accruemarketing.com/ * @copyright 4-4-2015 BAWD * * @wordpress-plugin * Plugin Name: Simple video sitemap generator * Plugin URI: http://buildawebdoctor.com * Description: Create a xml video sitemap file * Version: 1.2.7 * Author: Accrue * Author URI: http://www.accruemarketing.com/ * Text Domain: video-sitemap-locale * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Domain Path: /lang */ // If this file is called directly, abort. if (!defined("WPINC")) { die; } require_once plugin_dir_path(__FILE__) . "VideoSitemap.php"; // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively. register_activation_hook(__FILE__, array("VideoSitemap", "activate")); register_deactivation_hook(__FILE__, array("VideoSitemap", "deactivate")); VideoSitemap::get_instance();
<?php /** * Represents the view for the administration dashboard. * * This includes the header, options, and other information that should provide * The User Interface to the end user. * * @package video-sitemap * @author bawd <*****@*****.**> * @license GPL-2.0+ * @link http://buildawebdoctor.com * @copyright 4-4-2015 BAWD */ $getclass = new VideoSitemap(); $post_types = $getclass->get_post_types(); ?> <div class="wrap"> <?php screen_icon(); ?> <h2><?php echo esc_html(get_admin_page_title()); ?> </h2> <h3><?php _e('Xml sitemap for videos', 'video sitemap'); ?> </h3> <!-- TODO: Provide markup for your options page here. -->