@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * Read More button in excerpt |
171 | 171 | */ |
172 | 172 | function new_excerpt_more( $more ) { |
173 | - return ' '; |
|
173 | + return ' '; |
|
174 | 174 | } |
175 | 175 | add_filter( 'excerpt_more', 'new_excerpt_more' ); |
176 | 176 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Custome Lenght of excerpt |
179 | 179 | */ |
180 | 180 | function custom_excerpt_length( $length ) { |
181 | - return 30; |
|
181 | + return 30; |
|
182 | 182 | } |
183 | 183 | add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
184 | 184 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @package Lighthouse |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! function_exists( 'lighthouse_setup' ) ) : |
|
10 | +if ( ! function_exists('lighthouse_setup')) : |
|
11 | 11 | /** |
12 | 12 | * Sets up theme defaults and registers support for various WordPress features. |
13 | 13 | * |
@@ -22,10 +22,10 @@ discard block |
||
22 | 22 | * If you're building a theme based on Lighthouse, use a find and replace |
23 | 23 | * to change 'lighthouse' to the name of your theme in all the template files. |
24 | 24 | */ |
25 | - load_theme_textdomain( 'lighthouse', get_template_directory() . '/languages' ); |
|
25 | + load_theme_textdomain('lighthouse', get_template_directory().'/languages'); |
|
26 | 26 | |
27 | 27 | // Add default posts and comments RSS feed links to head. |
28 | - add_theme_support( 'automatic-feed-links' ); |
|
28 | + add_theme_support('automatic-feed-links'); |
|
29 | 29 | |
30 | 30 | /* |
31 | 31 | * Let WordPress manage the document title. |
@@ -33,28 +33,28 @@ discard block |
||
33 | 33 | * hard-coded <title> tag in the document head, and expect WordPress to |
34 | 34 | * provide it for us. |
35 | 35 | */ |
36 | - add_theme_support( 'title-tag' ); |
|
36 | + add_theme_support('title-tag'); |
|
37 | 37 | |
38 | 38 | /* |
39 | 39 | * Enable support for Post Thumbnails on posts and pages. |
40 | 40 | * |
41 | 41 | * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ |
42 | 42 | */ |
43 | - add_theme_support( 'post-thumbnails' ); |
|
43 | + add_theme_support('post-thumbnails'); |
|
44 | 44 | |
45 | - add_image_size( 'lighthouse_blog_listing', 714, 274, array( 'center', 'center' ) ); |
|
45 | + add_image_size('lighthouse_blog_listing', 714, 274, array('center', 'center')); |
|
46 | 46 | |
47 | 47 | /* |
48 | 48 | * Default HTML5 Form |
49 | 49 | * |
50 | 50 | * @link https://codex.wordpress.org/Function_Reference/get_search_form |
51 | 51 | */ |
52 | - add_theme_support( 'html5', array( 'search-form' ) ); |
|
52 | + add_theme_support('html5', array('search-form')); |
|
53 | 53 | |
54 | 54 | // This theme uses wp_nav_menu() in one location. |
55 | - register_nav_menus( array( |
|
56 | - 'primary' => esc_html__( 'Primary', 'lighthouse' ), |
|
57 | - ) ); |
|
55 | + register_nav_menus(array( |
|
56 | + 'primary' => esc_html__('Primary', 'lighthouse'), |
|
57 | + )); |
|
58 | 58 | |
59 | 59 | |
60 | 60 | /* |
@@ -64,47 +64,47 @@ discard block |
||
64 | 64 | function lighthouse_menus() { |
65 | 65 | register_nav_menus( |
66 | 66 | array( |
67 | - 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
68 | - 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
69 | - 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
70 | - 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
67 | + 'header-menu-left' => __('Header menu left', 'nav menu location', 'lighthouse'), |
|
68 | + 'header-menu-right' => __('Header menu right', 'nav menu location', 'lighthouse'), |
|
69 | + 'footer-menu' => __('Footer menu', 'nav menu location', 'lighthouse'), |
|
70 | + 'footer-menu-bottom' => __('Footer menu bottom', 'nav menu location', 'lighthouse') |
|
71 | 71 | ) |
72 | 72 | ); |
73 | 73 | } |
74 | - add_action( 'init', 'lighthouse_menus' ); |
|
74 | + add_action('init', 'lighthouse_menus'); |
|
75 | 75 | |
76 | 76 | /* |
77 | 77 | * Switch default core markup for search form, comment form, and comments |
78 | 78 | * to output valid HTML5. |
79 | 79 | */ |
80 | - add_theme_support( 'html5', array( |
|
80 | + add_theme_support('html5', array( |
|
81 | 81 | 'search-form', |
82 | 82 | 'comment-form', |
83 | 83 | 'comment-list', |
84 | 84 | 'gallery', |
85 | 85 | 'caption', |
86 | - ) ); |
|
86 | + )); |
|
87 | 87 | |
88 | 88 | /* |
89 | 89 | * Enable support for Post Formats. |
90 | 90 | * See https://developer.wordpress.org/themes/functionality/post-formats/ |
91 | 91 | */ |
92 | - add_theme_support( 'post-formats', array( |
|
92 | + add_theme_support('post-formats', array( |
|
93 | 93 | 'aside', |
94 | 94 | 'image', |
95 | 95 | 'video', |
96 | 96 | 'quote', |
97 | 97 | 'link', |
98 | - ) ); |
|
98 | + )); |
|
99 | 99 | |
100 | 100 | // Set up the WordPress core custom background feature. |
101 | - add_theme_support( 'custom-background', apply_filters( 'lighthouse_custom_background_args', array( |
|
101 | + add_theme_support('custom-background', apply_filters('lighthouse_custom_background_args', array( |
|
102 | 102 | 'default-color' => 'ffffff', |
103 | 103 | 'default-image' => '', |
104 | - ) ) ); |
|
104 | + ))); |
|
105 | 105 | } |
106 | 106 | endif; |
107 | -add_action( 'after_setup_theme', 'lighthouse_setup' ); |
|
107 | +add_action('after_setup_theme', 'lighthouse_setup'); |
|
108 | 108 | |
109 | 109 | /** |
110 | 110 | * Set the content width in pixels, based on the theme's design and stylesheet. |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | * @global int $content_width |
115 | 115 | */ |
116 | 116 | function lighthouse_content_width() { |
117 | - $GLOBALS['content_width'] = apply_filters( 'lighthouse_content_width', 640 ); |
|
117 | + $GLOBALS['content_width'] = apply_filters('lighthouse_content_width', 640); |
|
118 | 118 | } |
119 | -add_action( 'after_setup_theme', 'lighthouse_content_width', 0 ); |
|
119 | +add_action('after_setup_theme', 'lighthouse_content_width', 0); |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Register widget area. |
@@ -124,85 +124,85 @@ discard block |
||
124 | 124 | * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar |
125 | 125 | */ |
126 | 126 | function lighthouse_widgets_init() { |
127 | - register_sidebar( array( |
|
128 | - 'name' => esc_html__( 'Sidebar', 'lighthouse' ), |
|
127 | + register_sidebar(array( |
|
128 | + 'name' => esc_html__('Sidebar', 'lighthouse'), |
|
129 | 129 | 'id' => 'sidebar-1', |
130 | 130 | 'description' => '', |
131 | 131 | 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
132 | 132 | 'after_widget' => '</section>', |
133 | 133 | 'before_title' => '<h2 class="widget-title">', |
134 | 134 | 'after_title' => '</h2>', |
135 | - ) ); |
|
135 | + )); |
|
136 | 136 | } |
137 | -add_action( 'widgets_init', 'lighthouse_widgets_init' ); |
|
137 | +add_action('widgets_init', 'lighthouse_widgets_init'); |
|
138 | 138 | |
139 | 139 | /** |
140 | 140 | * Enqueue scripts and styles. |
141 | 141 | */ |
142 | 142 | function lighthouse_scripts() { |
143 | 143 | |
144 | - wp_enqueue_style( 'lighthouse-font-awesome-css', get_template_directory_uri() . '/css/font-awesome.min.css'); |
|
144 | + wp_enqueue_style('lighthouse-font-awesome-css', get_template_directory_uri().'/css/font-awesome.min.css'); |
|
145 | 145 | |
146 | - wp_enqueue_style( 'lighthouse-style', get_stylesheet_uri() ); |
|
146 | + wp_enqueue_style('lighthouse-style', get_stylesheet_uri()); |
|
147 | 147 | |
148 | 148 | wp_enqueue_style('lighthouse-google-fonts', 'https://fonts.googleapis.com/css?family=Questrial'); |
149 | 149 | |
150 | - wp_enqueue_script( 'lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), ''); |
|
150 | + wp_enqueue_script('lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), ''); |
|
151 | 151 | |
152 | - wp_enqueue_script( 'lighthouse-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true ); |
|
152 | + wp_enqueue_script('lighthouse-bootstrap-js', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery'), '', true); |
|
153 | 153 | |
154 | - wp_enqueue_script( 'lighthouse-material-menu-js', get_template_directory_uri() . '/js/materialMenu.js', array('jquery'), '', true ); |
|
154 | + wp_enqueue_script('lighthouse-material-menu-js', get_template_directory_uri().'/js/materialMenu.js', array('jquery'), '', true); |
|
155 | 155 | |
156 | - wp_enqueue_script( 'lighthouse-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); |
|
156 | + wp_enqueue_script('lighthouse-navigation', get_template_directory_uri().'/js/navigation.js', array(), '20120206', true); |
|
157 | 157 | |
158 | - wp_enqueue_script( 'lighthouse-settings-js', get_template_directory_uri() . '/js/lighthouse-settings.js', array('jquery'), '', true ); |
|
158 | + wp_enqueue_script('lighthouse-settings-js', get_template_directory_uri().'/js/lighthouse-settings.js', array('jquery'), '', true); |
|
159 | 159 | |
160 | - wp_enqueue_script( 'lighthouse-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); |
|
160 | + wp_enqueue_script('lighthouse-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.js', array(), '20130115', true); |
|
161 | 161 | |
162 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
|
163 | - wp_enqueue_script( 'comment-reply' ); |
|
162 | + if (is_singular() && comments_open() && get_option('thread_comments')) { |
|
163 | + wp_enqueue_script('comment-reply'); |
|
164 | 164 | } |
165 | 165 | } |
166 | -add_action( 'wp_enqueue_scripts', 'lighthouse_scripts' ); |
|
166 | +add_action('wp_enqueue_scripts', 'lighthouse_scripts'); |
|
167 | 167 | |
168 | 168 | |
169 | 169 | /** |
170 | 170 | * Read More button in excerpt |
171 | 171 | */ |
172 | -function new_excerpt_more( $more ) { |
|
172 | +function new_excerpt_more($more) { |
|
173 | 173 | return ' '; |
174 | 174 | } |
175 | -add_filter( 'excerpt_more', 'new_excerpt_more' ); |
|
175 | +add_filter('excerpt_more', 'new_excerpt_more'); |
|
176 | 176 | |
177 | 177 | /** |
178 | 178 | * Custome Lenght of excerpt |
179 | 179 | */ |
180 | -function custom_excerpt_length( $length ) { |
|
180 | +function custom_excerpt_length($length) { |
|
181 | 181 | return 30; |
182 | 182 | } |
183 | -add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
|
183 | +add_filter('excerpt_length', 'custom_excerpt_length', 999); |
|
184 | 184 | |
185 | 185 | /** |
186 | 186 | * Implement the Custom Header feature. |
187 | 187 | */ |
188 | -require get_template_directory() . '/inc/custom-header.php'; |
|
188 | +require get_template_directory().'/inc/custom-header.php'; |
|
189 | 189 | |
190 | 190 | /** |
191 | 191 | * Custom template tags for this theme. |
192 | 192 | */ |
193 | -require get_template_directory() . '/inc/template-tags.php'; |
|
193 | +require get_template_directory().'/inc/template-tags.php'; |
|
194 | 194 | |
195 | 195 | /** |
196 | 196 | * Custom functions that act independently of the theme templates. |
197 | 197 | */ |
198 | -require get_template_directory() . '/inc/extras.php'; |
|
198 | +require get_template_directory().'/inc/extras.php'; |
|
199 | 199 | |
200 | 200 | /** |
201 | 201 | * Customizer additions. |
202 | 202 | */ |
203 | -require get_template_directory() . '/inc/customizer.php'; |
|
203 | +require get_template_directory().'/inc/customizer.php'; |
|
204 | 204 | |
205 | 205 | /** |
206 | 206 | * Load Jetpack compatibility file. |
207 | 207 | */ |
208 | -require get_template_directory() . '/inc/jetpack.php'; |
|
208 | +require get_template_directory().'/inc/jetpack.php'; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <div class="container blog-wrapper"> |
10 | 10 | <div class="row"> |
11 | 11 | <div class="col-xs-12"> |
12 | - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
|
12 | + <?php the_title('<h1 class="entry-title">', '</h1>'); ?> |
|
13 | 13 | <h3 class="sub-title">Read the latest articles, commentary in our news blogs</h3> |
14 | 14 | </div> |
15 | 15 | </div> |
@@ -19,17 +19,17 @@ discard block |
||
19 | 19 | <div class="row"> |
20 | 20 | <div class="col-md-9 blog-listing"> |
21 | 21 | <?php |
22 | - $args = array( 'post_type' => 'post', 'posts_per_page' => -1 ); |
|
23 | - $loop = new WP_Query( $args ); |
|
22 | + $args = array('post_type' => 'post', 'posts_per_page' => -1); |
|
23 | + $loop = new WP_Query($args); |
|
24 | 24 | $postid = get_the_ID(); |
25 | - while ( $loop->have_posts() ) : $loop->the_post();?> |
|
25 | + while ($loop->have_posts()) : $loop->the_post(); ?> |
|
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | 29 | <article id="post-<?php echo $postid; ?>"> |
30 | 30 | <div class="row blog-item"> |
31 | 31 | <?php |
32 | - $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_blog_listing'); |
|
32 | + $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_blog_listing'); |
|
33 | 33 | $url = $thumb[0]; |
34 | 34 | ?> |
35 | 35 | <div class="col-sm-6 col-md-7 blog-thumb"> |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | </div> |
66 | 66 | <div class="col-md-3 sidebar" role="complementary"> |
67 | - <?php dynamic_sidebar( 'blog_widgets' ); ?> |
|
67 | + <?php dynamic_sidebar('blog_widgets'); ?> |
|
68 | 68 | </div> |
69 | 69 | </div><!-- .row --> |
70 | 70 | </div><!-- .container --> |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | |
12 | 12 | <?php |
13 | 13 | //get the blog info |
14 | -$blog_url = get_permalink( get_option('page_for_posts' ) ); |
|
15 | -$blog_title = get_the_title( get_option('page_for_posts' ) ); |
|
14 | +$blog_url = get_permalink(get_option('page_for_posts')); |
|
15 | +$blog_title = get_the_title(get_option('page_for_posts')); |
|
16 | 16 | ?> |
17 | 17 | <div class="title-wrapper"> |
18 | 18 | <div class="container blog-wrapper"> |
19 | 19 | <div class="row"> |
20 | 20 | <div class="col-xs-12"> |
21 | - <h1 class="entry-title"><?php echo $blog_title;?></h1> <div class="back-to"> <span> | </span><a href="<?php echo $blog_url;?>">back</a></div> |
|
21 | + <h1 class="entry-title"><?php echo $blog_title; ?></h1> <div class="back-to"> <span> | </span><a href="<?php echo $blog_url; ?>">back</a></div> |
|
22 | 22 | </div> |
23 | 23 | </div> |
24 | 24 | </div> |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | <main id="main" class="site-main" role="main"> |
30 | 30 | |
31 | 31 | <?php |
32 | - while ( have_posts() ) : the_post(); |
|
32 | + while (have_posts()) : the_post(); |
|
33 | 33 | |
34 | - $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); |
|
34 | + $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); |
|
35 | 35 | $url = $thumb[0]; |
36 | 36 | ?> |
37 | 37 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | </div> |
41 | 41 | |
42 | 42 | <?php |
43 | - get_template_part( 'template-parts/content', get_post_format() ); |
|
43 | + get_template_part('template-parts/content', get_post_format()); |
|
44 | 44 | |
45 | 45 | //the_post_navigation(); |
46 | 46 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | </main><!-- #main --> |
56 | 56 | </div> |
57 | 57 | <div class="col-md-3 sidebar" role="complementary"> |
58 | - <?php dynamic_sidebar( 'blog_widgets' ); ?> |
|
58 | + <?php dynamic_sidebar('blog_widgets'); ?> |
|
59 | 59 | </div> |
60 | 60 | </div><!-- .row --> |
61 | 61 | </div><!-- #primary --> |