Example #1
0
 public function __construct($path, $type = self::FILE, $perms = null, $owner = null, $group = null, $inode = null)
 {
     $this->path = Util\Path::normalise("/{$path}");
     $this->type = $type;
     $this->owner = $owner;
     $this->inode = $inode;
     $this->group = $group;
     if ($perms) {
         $this->perms = $perms;
     } elseif ($type == self::DIR) {
         $this->perms = 0777;
     } else {
         $this->perms = 0666;
     }
 }
Example #2
0
 public function enqueue()
 {
     $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     $version = Theme::instance()->get_info('Version');
     $dependencies = array('jquery', 'wp-util', 'fancybox');
     wp_enqueue_style('fancybox', Util\Path::get_url('assets/vendor/fancybox/source/jquery.fancybox.css'), array(), '2.1.5');
     wp_enqueue_script('fancybox', Util\Path::get_url('assets/vendor/fancybox/source/jquery.fancybox.pack.js'), array('jquery'), '2.1.5', true);
     wp_enqueue_style('wp-starter-theme', Util\Path::get_url('assets/dist/css/app' . $min . '.css'), array(), $version, 'all');
     wp_enqueue_script('wp-starter-theme', Util\Path::get_url('assets/dist/js/app' . $min . '.js'), $dependencies, $version, true);
     wp_localize_script('wp-starter-theme', 'wp_theme', $this->get_script_vars());
     if (is_singular()) {
         wp_enqueue_script('comment-reply');
     }
     if (WP_DEBUG) {
         wp_enqueue_script('livereload', untrailingslashit(home_url()) . ':35729/livereload.js?snipver=1', array(), false, true);
     }
 }
Example #3
0
 private function load_textdomain()
 {
     load_theme_textdomain('wp-starter-theme', Util\Path::get_path('languages'));
 }
 public function customize_script($scripts)
 {
     $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     $scripts['wp-starter-theme-customize-preview'] = Util\Path::get_url('assets/dist/js/customize-preview' . $min . '.js');
     return $scripts;
 }