public static function init() { if (!self::$initiated) { self::$initiated = true; require_once RY_CP_PLUGIN_DIR . 'class.ry-cp.update.php'; add_rewrite_rule('date/([^/]+)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?', 'index.php?post_type=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]', 'top'); add_rewrite_rule('date/([^/]+)/([0-9]{4})/([0-9]{1,2})/?', 'index.php?post_type=$matches[1]&year=$matches[2]&monthnum=$matches[3]', 'top'); add_rewrite_rule('date/([^/]+)/([0-9]{4})/?', 'index.php?post_type=$matches[1]&year=$matches[2]', 'top'); if (is_admin()) { require_once RY_CP_PLUGIN_DIR . 'class.ry-cp.admin.php'; RY_CP_admin::init(); } } }
public static function init() { if (!self::$initiated) { self::$initiated = TRUE; } }