コード例 #1
0
 /**
  * Return an instance of this class.
  *
  *
  * @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;
 }
コード例 #2
0
ファイル: Templates.php プロジェクト: erkmen/wpstartersetup
 * Menu Add Page: post-new.php?post_type=_pods_template
 *
 * @package Pods\Components
 * @subpackage Templates
 */
if (class_exists('Pods_Templates')) {
    // Pull in the functions
    require_once plugin_dir_path(__FILE__) . '/includes/functions-view_template.php';
    require_once plugin_dir_path(__FILE__) . '/includes/functions-pod_reference.php';
    // dont run if the Frontier Template Editor is already running.
    if (class_exists('Pods_Frontier_Template_Editor') || class_exists('Pods_Templates_Frontier')) {
        return;
    }
    // Pull in the Frontier Template System
    require_once plugin_dir_path(__FILE__) . 'class-pods_templates.php';
    Pods_Templates_Frontier::get_instance();
    return;
}
class Pods_Templates extends PodsComponent
{
    /**
     * Pods object
     *
     * @var object
     *
     * @since 2.0
     */
    static $obj = null;
    /**
     * Whether to enable deprecated functionality based on old function usage
     *