Completed
Push — master ( 8ad9a8...120f60 )
by
unknown
01:43 queued 56s
created

timber.php (9 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
Plugin Name: Timber
4
Description: The WordPress Timber Library allows you to write themes using the power Twig templates.
5
Plugin URI: http://timber.upstatement.com
6
Author: Jared Novack + Upstatement
7
Version: 1.0-rc
8
Author URI: http://upstatement.com/
9
*/
10
11
global $wp_version;
12
global $timber;
13
14
// we look for Composer files first in the plugins dir.
15
// then in the wp-content dir (site install).
16
// and finally in the current themes directories.
17
if (   file_exists( $composer_autoload = __DIR__ . '/vendor/autoload.php' ) /* check in self */
18
    || file_exists( $composer_autoload = WP_CONTENT_DIR.'/vendor/autoload.php') /* check in wp-content */
0 ignored issues
show
Tabs must be used to indent lines; spaces are not allowed
Loading history...
Expected 1 spaces before closing bracket; 0 found
Loading history...
19
    || file_exists( $composer_autoload = plugin_dir_path( __FILE__ ).'vendor/autoload.php') /* check in plugin directory */
0 ignored issues
show
Tabs must be used to indent lines; spaces are not allowed
Loading history...
Expected 1 spaces before closing bracket; 0 found
Loading history...
20
    || file_exists( $composer_autoload = get_stylesheet_directory().'/vendor/autoload.php') /* check in child theme */
0 ignored issues
show
Tabs must be used to indent lines; spaces are not allowed
Loading history...
Expected 1 spaces before closing bracket; 0 found
Loading history...
21
    || file_exists( $composer_autoload = get_template_directory().'/vendor/autoload.php') /* check in parent theme */
0 ignored issues
show
Tabs must be used to indent lines; spaces are not allowed
Loading history...
Expected 1 spaces before closing bracket; 0 found
Loading history...
22
) {
23
    require_once $composer_autoload;
0 ignored issues
show
Tabs must be used to indent lines; spaces are not allowed
Loading history...
24
}
25
26
$timber = new Timber();
27
Timber::$dirname = 'views';
28