@@ -1,1 +1,1 @@ |
||
1 | -<?php Classy::render( 'layout.footer' ); ?> |
|
2 | 1 | \ No newline at end of file |
2 | +<?php Classy::render('layout.footer'); ?> |
|
3 | 3 | \ No newline at end of file |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | * Main constructor function. Requires user id |
61 | 61 | * @param int $uid |
62 | 62 | */ |
63 | - public function __construct( $uid = null ) { |
|
64 | - $this->ID = $this->verify_id( $uid ); |
|
63 | + public function __construct($uid = null) { |
|
64 | + $this->ID = $this->verify_id($uid); |
|
65 | 65 | |
66 | 66 | $this->init(); |
67 | 67 | } |
68 | 68 | |
69 | - private function verify_id( $uid ) { |
|
69 | + private function verify_id($uid) { |
|
70 | 70 | return $uid; |
71 | 71 | } |
72 | 72 | |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | private function init() { |
77 | 77 | $object = (array) $this->get_object(); |
78 | 78 | |
79 | - $this->import( $object ); |
|
79 | + $this->import($object); |
|
80 | 80 | |
81 | - if ( isset( $this->first_name ) && isset( $this->last_name ) ) { |
|
82 | - $this->name = $this->first_name . ' ' . $this->last_name; |
|
81 | + if (isset($this->first_name) && isset($this->last_name)) { |
|
82 | + $this->name = $this->first_name.' '.$this->last_name; |
|
83 | 83 | } else { |
84 | 84 | $this->name = 'Anonymous'; |
85 | 85 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @return object |
93 | 93 | */ |
94 | 94 | private function get_object() { |
95 | - return get_userdata( $this->ID ); |
|
95 | + return get_userdata($this->ID); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | * @return string |
157 | 157 | */ |
158 | 158 | public function link() { |
159 | - if ( ! $this->link ) { |
|
160 | - $this->link = get_author_posts_url( $this->ID ); |
|
159 | + if (!$this->link) { |
|
160 | + $this->link = get_author_posts_url($this->ID); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | return $this->link; |
@@ -8,23 +8,23 @@ discard block |
||
8 | 8 | * @param array/boolean $args |
9 | 9 | * @return object WP_Query |
10 | 10 | */ |
11 | - public static function find_query( $args = false ) { |
|
11 | + public static function find_query($args = false) { |
|
12 | 12 | |
13 | 13 | $default_args = array(); |
14 | 14 | |
15 | - if ( ! $args ) { |
|
15 | + if (!$args) { |
|
16 | 16 | |
17 | 17 | return self::get_current_query(); |
18 | 18 | |
19 | - } elseif ( is_array( $args ) ) { |
|
19 | + } elseif (is_array($args)) { |
|
20 | 20 | |
21 | - $args = array_merge( $default_args, $args ); |
|
21 | + $args = array_merge($default_args, $args); |
|
22 | 22 | |
23 | - return new WP_Query( $args ); |
|
23 | + return new WP_Query($args); |
|
24 | 24 | |
25 | 25 | } else { |
26 | 26 | |
27 | - return new WP_Query( $default_args ); |
|
27 | + return new WP_Query($default_args); |
|
28 | 28 | |
29 | 29 | } |
30 | 30 | } |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | |
39 | 39 | global $wp_query; |
40 | 40 | |
41 | - $query =& $wp_query; |
|
41 | + $query = & $wp_query; |
|
42 | 42 | |
43 | - $query = self::handle_maybe_custom_posts_page( $query ); |
|
43 | + $query = self::handle_maybe_custom_posts_page($query); |
|
44 | 44 | |
45 | 45 | return $query; |
46 | 46 | |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | * @param object $query WP_Query |
53 | 53 | * @return object WP_Query |
54 | 54 | */ |
55 | - private static function handle_maybe_custom_posts_page( $query ) { |
|
55 | + private static function handle_maybe_custom_posts_page($query) { |
|
56 | 56 | |
57 | - if ( $custom_posts_page = get_option( 'page_for_posts' ) ) { |
|
57 | + if ($custom_posts_page = get_option('page_for_posts')) { |
|
58 | 58 | |
59 | - if ( isset( $query->query['p'] ) && $query->query['p'] == $custom_posts_page ) { |
|
59 | + if (isset($query->query['p']) && $query->query['p'] == $custom_posts_page) { |
|
60 | 60 | |
61 | - return new WP_Query( array( 'post_type' => 'post' ) ); |
|
61 | + return new WP_Query(array('post_type' => 'post')); |
|
62 | 62 | |
63 | 63 | } |
64 | 64 | } |
@@ -15,44 +15,44 @@ discard block |
||
15 | 15 | * @param string $allowed_tags |
16 | 16 | * @return string |
17 | 17 | */ |
18 | - public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) { |
|
19 | - if ( null === $more ) { |
|
20 | - $more = __( '…' ); |
|
18 | + public static function trim_words($text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote') { |
|
19 | + if (null === $more) { |
|
20 | + $more = __('…'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $original_text = $text; |
24 | 24 | $allowed_tag_string = ''; |
25 | 25 | |
26 | - foreach ( explode( ' ', $allowed_tags ) as $tag ) { |
|
27 | - $allowed_tag_string .= '<' . $tag . '>'; |
|
26 | + foreach (explode(' ', $allowed_tags) as $tag) { |
|
27 | + $allowed_tag_string .= '<'.$tag.'>'; |
|
28 | 28 | } |
29 | 29 | |
30 | - $text = strip_tags( $text, $allowed_tag_string ); |
|
30 | + $text = strip_tags($text, $allowed_tag_string); |
|
31 | 31 | |
32 | 32 | /* translators: If your word count is based on single characters (East Asian characters), |
33 | 33 | enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */ |
34 | 34 | |
35 | - if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) { |
|
36 | - $text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' ); |
|
37 | - preg_match_all( '/./u', $text, $words_array ); |
|
38 | - $words_array = array_slice( $words_array[0], 0, $num_words + 1 ); |
|
35 | + if ('characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset'))) { |
|
36 | + $text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' '); |
|
37 | + preg_match_all('/./u', $text, $words_array); |
|
38 | + $words_array = array_slice($words_array[0], 0, $num_words + 1); |
|
39 | 39 | $sep = ''; |
40 | 40 | } else { |
41 | - $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY ); |
|
41 | + $words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY); |
|
42 | 42 | $sep = ' '; |
43 | 43 | } |
44 | 44 | |
45 | - if ( count( $words_array ) > $num_words ) { |
|
46 | - array_pop( $words_array ); |
|
47 | - $text = implode( $sep, $words_array ); |
|
48 | - $text = $text . $more; |
|
45 | + if (count($words_array) > $num_words) { |
|
46 | + array_pop($words_array); |
|
47 | + $text = implode($sep, $words_array); |
|
48 | + $text = $text.$more; |
|
49 | 49 | } else { |
50 | - $text = implode( $sep, $words_array ); |
|
50 | + $text = implode($sep, $words_array); |
|
51 | 51 | } |
52 | 52 | |
53 | - $text = self::close_tags( $text ); |
|
53 | + $text = self::close_tags($text); |
|
54 | 54 | |
55 | - return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text ); |
|
55 | + return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -62,36 +62,36 @@ discard block |
||
62 | 62 | * @param string $html |
63 | 63 | * @return string |
64 | 64 | */ |
65 | - public static function close_tags( $html ) { |
|
65 | + public static function close_tags($html) { |
|
66 | 66 | //put all opened tags into an array |
67 | - preg_match_all( '#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result ); |
|
67 | + preg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result); |
|
68 | 68 | |
69 | 69 | $openedtags = $result[1]; |
70 | 70 | |
71 | 71 | //put all closed tags into an array |
72 | - preg_match_all( '#</([a-z]+)>#iU', $html, $result ); |
|
72 | + preg_match_all('#</([a-z]+)>#iU', $html, $result); |
|
73 | 73 | |
74 | 74 | $closedtags = $result[1]; |
75 | - $len_opened = count( $openedtags ); |
|
75 | + $len_opened = count($openedtags); |
|
76 | 76 | |
77 | 77 | // all tags are closed |
78 | - if ( count( $closedtags ) == $len_opened ) { |
|
78 | + if (count($closedtags) == $len_opened) { |
|
79 | 79 | return $html; |
80 | 80 | } |
81 | 81 | |
82 | - $openedtags = array_reverse( $openedtags ); |
|
82 | + $openedtags = array_reverse($openedtags); |
|
83 | 83 | |
84 | 84 | // close tags |
85 | - for ( $i = 0; $i < $len_opened; $i++ ) { |
|
86 | - if ( ! in_array( $openedtags[ $i ], $closedtags ) ) { |
|
87 | - $html .= '</' . $openedtags[ $i ] . '>'; |
|
85 | + for ($i = 0; $i < $len_opened; $i++) { |
|
86 | + if (!in_array($openedtags[$i], $closedtags)) { |
|
87 | + $html .= '</'.$openedtags[$i].'>'; |
|
88 | 88 | } else { |
89 | - unset( $closedtags[ array_search( $openedtags[ $i ], $closedtags ) ] ); |
|
89 | + unset($closedtags[array_search($openedtags[$i], $closedtags)]); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
93 | - $html = str_replace( array( '</br>', '</hr>', '</wbr>' ), '', $html ); |
|
94 | - $html = str_replace( array( '<br>', '<hr>', '<wbr>' ), array( '<br />', '<hr />', '<wbr />' ), $html ); |
|
93 | + $html = str_replace(array('</br>', '</hr>', '</wbr>'), '', $html); |
|
94 | + $html = str_replace(array('<br>', '<hr>', '<wbr>'), array('<br />', '<hr />', '<wbr />'), $html); |
|
95 | 95 | |
96 | 96 | return $html; |
97 | 97 | } |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @param mixed $arg |
103 | 103 | */ |
104 | - public static function error_log( $arg ) { |
|
105 | - if ( ! WP_DEBUG ) { |
|
104 | + public static function error_log($arg) { |
|
105 | + if (!WP_DEBUG) { |
|
106 | 106 | return; |
107 | 107 | } |
108 | - if ( is_object( $arg ) || is_array( $arg ) ) { |
|
109 | - $arg = print_r( $arg, true ); |
|
108 | + if (is_object($arg) || is_array($arg)) { |
|
109 | + $arg = print_r($arg, true); |
|
110 | 110 | } |
111 | - return error_log( $arg ); |
|
111 | + return error_log($arg); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $args |
118 | 118 | * @return array |
119 | 119 | */ |
120 | - public static function paginate_links( $args = '' ) { |
|
120 | + public static function paginate_links($args = '') { |
|
121 | 121 | $defaults = array( |
122 | 122 | 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) |
123 | 123 | 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number |
@@ -125,43 +125,43 @@ discard block |
||
125 | 125 | 'current' => 0, |
126 | 126 | 'show_all' => false, |
127 | 127 | 'prev_next' => true, |
128 | - 'prev_text' => __( '« Previous' ), |
|
129 | - 'next_text' => __( 'Next »' ), |
|
128 | + 'prev_text' => __('« Previous'), |
|
129 | + 'next_text' => __('Next »'), |
|
130 | 130 | 'end_size' => 1, |
131 | 131 | 'mid_size' => 2, |
132 | 132 | 'type' => 'array', |
133 | 133 | 'add_args' => false, // array of query args to add |
134 | 134 | 'add_fragment' => '', |
135 | 135 | ); |
136 | - $args = wp_parse_args( $args, $defaults ); |
|
136 | + $args = wp_parse_args($args, $defaults); |
|
137 | 137 | // Who knows what else people pass in $args |
138 | - $args['total'] = intval( (int) $args['total'] ); |
|
139 | - if ( $args['total'] < 2 ) { |
|
138 | + $args['total'] = intval((int) $args['total']); |
|
139 | + if ($args['total'] < 2) { |
|
140 | 140 | return array(); |
141 | 141 | } |
142 | 142 | $args['current'] = (int) $args['current']; |
143 | 143 | $args['end_size'] = 0 < (int) $args['end_size'] ? (int) $args['end_size'] : 1; // Out of bounds? Make it the default. |
144 | 144 | $args['mid_size'] = 0 <= (int) $args['mid_size'] ? (int) $args['mid_size'] : 2; |
145 | - $args['add_args'] = is_array( $args['add_args'] ) ? $args['add_args'] : false; |
|
145 | + $args['add_args'] = is_array($args['add_args']) ? $args['add_args'] : false; |
|
146 | 146 | $page_links = array(); |
147 | 147 | $dots = false; |
148 | - if ( $args['prev_next'] && $args['current'] && 1 < $args['current'] ) { |
|
149 | - $link = str_replace( '%_%', 2 == $args['current'] ? '' : $args['format'], $args['base'] ); |
|
150 | - $link = str_replace( '%#%', $args['current'] - 1, $link ); |
|
151 | - if ( $args['add_args'] ) { |
|
152 | - $link = add_query_arg( $args['add_args'], $link ); |
|
148 | + if ($args['prev_next'] && $args['current'] && 1 < $args['current']) { |
|
149 | + $link = str_replace('%_%', 2 == $args['current'] ? '' : $args['format'], $args['base']); |
|
150 | + $link = str_replace('%#%', $args['current'] - 1, $link); |
|
151 | + if ($args['add_args']) { |
|
152 | + $link = add_query_arg($args['add_args'], $link); |
|
153 | 153 | } |
154 | 154 | $link .= $args['add_fragment']; |
155 | - $link = untrailingslashit( $link ); |
|
155 | + $link = untrailingslashit($link); |
|
156 | 156 | $page_links[] = array( |
157 | 157 | 'class' => 'prev page-numbers', |
158 | - 'link' => esc_url( apply_filters( 'paginate_links', $link ) ), |
|
158 | + 'link' => esc_url(apply_filters('paginate_links', $link)), |
|
159 | 159 | 'title' => $args['prev_text'], |
160 | 160 | ); |
161 | 161 | } |
162 | - for ( $n = 1; $n <= $args['total']; $n++ ) { |
|
163 | - $n_display = number_format_i18n( $n ); |
|
164 | - if ( $n == $args['current'] ) { |
|
162 | + for ($n = 1; $n <= $args['total']; $n++) { |
|
163 | + $n_display = number_format_i18n($n); |
|
164 | + if ($n == $args['current']) { |
|
165 | 165 | $page_links[] = array( |
166 | 166 | 'class' => 'page-number page-numbers current', |
167 | 167 | 'title' => $n_display, |
@@ -171,42 +171,42 @@ discard block |
||
171 | 171 | ); |
172 | 172 | $dots = true; |
173 | 173 | } else { |
174 | - if ( $args['show_all'] || ( $n <= $args['end_size'] || ( $args['current'] && $n >= $args['current'] - $args['mid_size'] && $n <= $args['current'] + $args['mid_size'] ) || $n > $args['total'] - $args['end_size'] ) ) { |
|
175 | - $link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] ); |
|
176 | - $link = str_replace( '%#%', $n, $link ); |
|
177 | - $link = trailingslashit( $link ) . ltrim( $args['add_fragment'], '/' ); |
|
178 | - if ( $args['add_args'] ) { |
|
179 | - $link = rtrim( add_query_arg( $args['add_args'], $link ), '/' ); |
|
174 | + if ($args['show_all'] || ($n <= $args['end_size'] || ($args['current'] && $n >= $args['current'] - $args['mid_size'] && $n <= $args['current'] + $args['mid_size']) || $n > $args['total'] - $args['end_size'])) { |
|
175 | + $link = str_replace('%_%', 1 == $n ? '' : $args['format'], $args['base']); |
|
176 | + $link = str_replace('%#%', $n, $link); |
|
177 | + $link = trailingslashit($link).ltrim($args['add_fragment'], '/'); |
|
178 | + if ($args['add_args']) { |
|
179 | + $link = rtrim(add_query_arg($args['add_args'], $link), '/'); |
|
180 | 180 | } |
181 | - $link = str_replace( ' ', '+', $link ); |
|
182 | - $link = untrailingslashit( $link ); |
|
181 | + $link = str_replace(' ', '+', $link); |
|
182 | + $link = untrailingslashit($link); |
|
183 | 183 | $page_links[] = array( |
184 | 184 | 'class' => 'page-number page-numbers', |
185 | - 'link' => esc_url( apply_filters( 'paginate_links', $link ) ), |
|
185 | + 'link' => esc_url(apply_filters('paginate_links', $link)), |
|
186 | 186 | 'title' => $n_display, |
187 | 187 | 'name' => $n_display, |
188 | 188 | 'current' => $args['current'] == $n, |
189 | 189 | ); |
190 | 190 | $dots = true; |
191 | - } elseif ( $dots && ! $args['show_all'] ) { |
|
191 | + } elseif ($dots && !$args['show_all']) { |
|
192 | 192 | $page_links[] = array( |
193 | 193 | 'class' => 'dots', |
194 | - 'title' => __( '…' ), |
|
194 | + 'title' => __('…'), |
|
195 | 195 | ); |
196 | 196 | $dots = false; |
197 | 197 | } |
198 | 198 | } |
199 | 199 | } |
200 | - if ( $args['prev_next'] && $args['current'] && ( $args['current'] < $args['total'] || -1 == $args['total'] ) ) { |
|
201 | - $link = str_replace( '%_%', $args['format'], $args['base'] ); |
|
202 | - $link = str_replace( '%#%', $args['current'] + 1, $link ); |
|
203 | - if ( $args['add_args'] ) { |
|
204 | - $link = add_query_arg( $args['add_args'], $link ); |
|
200 | + if ($args['prev_next'] && $args['current'] && ($args['current'] < $args['total'] || -1 == $args['total'])) { |
|
201 | + $link = str_replace('%_%', $args['format'], $args['base']); |
|
202 | + $link = str_replace('%#%', $args['current'] + 1, $link); |
|
203 | + if ($args['add_args']) { |
|
204 | + $link = add_query_arg($args['add_args'], $link); |
|
205 | 205 | } |
206 | - $link = untrailingslashit( trailingslashit( $link ) . $args['add_fragment'] ); |
|
206 | + $link = untrailingslashit(trailingslashit($link).$args['add_fragment']); |
|
207 | 207 | $page_links[] = array( |
208 | 208 | 'class' => 'next page-numbers', |
209 | - 'link' => esc_url( apply_filters( 'paginate_links', $link ) ), |
|
209 | + 'link' => esc_url(apply_filters('paginate_links', $link)), |
|
210 | 210 | 'title' => $args['next_text'], |
211 | 211 | ); |
212 | 212 | } |
@@ -220,13 +220,13 @@ discard block |
||
220 | 220 | * @param array $array |
221 | 221 | * @return object |
222 | 222 | */ |
223 | - public static function array_to_object( $array ) { |
|
223 | + public static function array_to_object($array) { |
|
224 | 224 | $obj = new stdClass; |
225 | 225 | |
226 | - foreach ( $array as $k => $v ) { |
|
227 | - if ( strlen( $k ) ) { |
|
228 | - if ( is_array( $v ) ) { |
|
229 | - $obj->{$k} = self::array_to_object( $v ); //RECURSION |
|
226 | + foreach ($array as $k => $v) { |
|
227 | + if (strlen($k)) { |
|
228 | + if (is_array($v)) { |
|
229 | + $obj->{$k} = self::array_to_object($v); //RECURSION |
|
230 | 230 | } else { |
231 | 231 | $obj->{$k} = $v; |
232 | 232 | } |
@@ -249,42 +249,42 @@ discard block |
||
249 | 249 | |
250 | 250 | $archives_title = ''; |
251 | 251 | |
252 | - if ( is_category() ) { |
|
252 | + if (is_category()) { |
|
253 | 253 | |
254 | - $archives_title = single_cat_title( '', false ); |
|
254 | + $archives_title = single_cat_title('', false); |
|
255 | 255 | |
256 | - } else if ( is_tag() ) { |
|
256 | + } else if (is_tag()) { |
|
257 | 257 | |
258 | - $archives_title = 'Tag: ' . single_tag_title( '', false ); |
|
258 | + $archives_title = 'Tag: '.single_tag_title('', false); |
|
259 | 259 | |
260 | - } else if ( is_author() ) { |
|
260 | + } else if (is_author()) { |
|
261 | 261 | |
262 | - if ( have_posts() ) { |
|
262 | + if (have_posts()) { |
|
263 | 263 | |
264 | 264 | the_post(); |
265 | - $archives_title = 'Author: ' . get_the_author(); |
|
265 | + $archives_title = 'Author: '.get_the_author(); |
|
266 | 266 | |
267 | 267 | } |
268 | 268 | |
269 | 269 | rewind_posts(); |
270 | 270 | |
271 | - } else if ( is_search() ) { |
|
271 | + } else if (is_search()) { |
|
272 | 272 | |
273 | - $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
|
273 | + $archives_title = sprintf(__('Search Results for: %s', $textdomain), '<span>'.get_search_query().'</span>'); |
|
274 | 274 | |
275 | - } else if ( is_archive() ) { |
|
275 | + } else if (is_archive()) { |
|
276 | 276 | |
277 | - if ( is_day() ) { |
|
277 | + if (is_day()) { |
|
278 | 278 | |
279 | 279 | $archives_title = get_the_date(); |
280 | 280 | |
281 | - } elseif ( is_month() ) { |
|
281 | + } elseif (is_month()) { |
|
282 | 282 | |
283 | - $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ) ); |
|
283 | + $archives_title = get_the_date(_x('F Y', 'monthly archives date format', $textdomain)); |
|
284 | 284 | |
285 | - } elseif ( is_year() ) { |
|
285 | + } elseif (is_year()) { |
|
286 | 286 | |
287 | - $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ) ); |
|
287 | + $archives_title = get_the_date(_x('Y', 'yearly archives date format', $textdomain)); |
|
288 | 288 | |
289 | 289 | } else { |
290 | 290 |
@@ -12,23 +12,23 @@ |
||
12 | 12 | * @param object/array $data |
13 | 13 | * @return void |
14 | 14 | */ |
15 | - protected function import( $data ) { |
|
15 | + protected function import($data) { |
|
16 | 16 | |
17 | - if ( is_object( $data ) ) { |
|
17 | + if (is_object($data)) { |
|
18 | 18 | |
19 | - $data = get_object_vars( $data ); |
|
19 | + $data = get_object_vars($data); |
|
20 | 20 | |
21 | 21 | } |
22 | 22 | |
23 | - if ( is_array( $data ) ) { |
|
23 | + if (is_array($data)) { |
|
24 | 24 | |
25 | - foreach ( $data as $key => $value ) { |
|
25 | + foreach ($data as $key => $value) { |
|
26 | 26 | |
27 | - if ( ! empty( $key ) ) { |
|
27 | + if (!empty($key)) { |
|
28 | 28 | |
29 | 29 | $this->$key = $value; |
30 | 30 | |
31 | - } else if ( ! empty( $key ) && ! method_exists( $this, $key ) ) { |
|
31 | + } else if (!empty($key) && !method_exists($this, $key)) { |
|
32 | 32 | |
33 | 33 | $this->$key = $value; |
34 | 34 |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | |
24 | 24 | $request = ClassyHierarchy::get_current_request(); |
25 | 25 | |
26 | - $file = ClassyHierarchy::get_available_file( 'view', $request ); |
|
26 | + $file = ClassyHierarchy::get_available_file('view', $request); |
|
27 | 27 | |
28 | - $view = self::get_blade_view( $file ); |
|
28 | + $view = self::get_blade_view($file); |
|
29 | 29 | |
30 | 30 | return $view; |
31 | 31 | |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * @param string $view |
39 | 39 | * @return string |
40 | 40 | */ |
41 | - public static function get_blade_view( $view ) { |
|
41 | + public static function get_blade_view($view) { |
|
42 | 42 | |
43 | - return str_replace( '/', '.', $view ); |
|
43 | + return str_replace('/', '.', $view); |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | |
@@ -54,21 +54,21 @@ discard block |
||
54 | 54 | |
55 | 55 | $templates = array(); |
56 | 56 | |
57 | - $files = (array) glob( THEME_PATH . '/' . self::$folder . '/*/*.blade.php' ); |
|
57 | + $files = (array) glob(THEME_PATH.'/'.self::$folder.'/*/*.blade.php'); |
|
58 | 58 | |
59 | - foreach ( $files as $filename ) { |
|
59 | + foreach ($files as $filename) { |
|
60 | 60 | |
61 | - if ( ! empty( $filename ) ) { |
|
61 | + if (!empty($filename)) { |
|
62 | 62 | |
63 | - if ( ! preg_match( '/\{\{\-\-\s*Template Name:(.*)\s*\-\-\}\}/mi', file_get_contents( $filename ), $header ) ) { continue; } |
|
63 | + if (!preg_match('/\{\{\-\-\s*Template Name:(.*)\s*\-\-\}\}/mi', file_get_contents($filename), $header)) { continue; } |
|
64 | 64 | |
65 | - $template_name = trim( $header[1] ); |
|
65 | + $template_name = trim($header[1]); |
|
66 | 66 | |
67 | - preg_match( '/\/([^\/]*)\.blade.php$/is', $filename, $filename_match ); |
|
67 | + preg_match('/\/([^\/]*)\.blade.php$/is', $filename, $filename_match); |
|
68 | 68 | |
69 | - $template_file = 'classy-' . $filename_match[1]; |
|
69 | + $template_file = 'classy-'.$filename_match[1]; |
|
70 | 70 | |
71 | - $templates[ $template_file ] = $template_name; |
|
71 | + $templates[$template_file] = $template_name; |
|
72 | 72 | |
73 | 73 | } |
74 | 74 | } |
@@ -23,25 +23,25 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @param string $arg it can be menu id, slug or full name |
25 | 25 | */ |
26 | - public function __construct( $arg = null ) { |
|
26 | + public function __construct($arg = null) { |
|
27 | 27 | |
28 | - if ( is_numeric( $arg ) && 0 != $arg ) { |
|
28 | + if (is_numeric($arg) && 0 != $arg) { |
|
29 | 29 | |
30 | - $menu_id = $this->check_menu_id( $arg ); |
|
30 | + $menu_id = $this->check_menu_id($arg); |
|
31 | 31 | |
32 | - } elseif ( is_string( $arg ) ) { |
|
32 | + } elseif (is_string($arg)) { |
|
33 | 33 | |
34 | - $menu_id = $this->get_menu_id_by_name( $arg ); |
|
34 | + $menu_id = $this->get_menu_id_by_name($arg); |
|
35 | 35 | |
36 | 36 | } |
37 | 37 | |
38 | - if ( ! isset( $menu_id ) ) { |
|
38 | + if (!isset($menu_id)) { |
|
39 | 39 | |
40 | 40 | $menu_id = $this->get_first_menu_id(); |
41 | 41 | |
42 | 42 | } |
43 | 43 | |
44 | - if ( $menu_id ) { |
|
44 | + if ($menu_id) { |
|
45 | 45 | |
46 | 46 | $this->ID = $menu_id; |
47 | 47 | |
@@ -60,22 +60,22 @@ discard block |
||
60 | 60 | |
61 | 61 | $_return = array(); |
62 | 62 | |
63 | - $items = wp_get_nav_menu_items( $this->ID ); |
|
63 | + $items = wp_get_nav_menu_items($this->ID); |
|
64 | 64 | |
65 | - foreach ( $items as $item ) { |
|
65 | + foreach ($items as $item) { |
|
66 | 66 | |
67 | - $_return[ $item->ID ] = new ClassyMenuItem( $item ); |
|
67 | + $_return[$item->ID] = new ClassyMenuItem($item); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Apply nesting |
71 | 71 | |
72 | - foreach ( $_return as $item_id => $item ) { |
|
72 | + foreach ($_return as $item_id => $item) { |
|
73 | 73 | |
74 | - if ( isset( $item->menu_item_parent ) && $item->menu_item_parent && isset( $_return[ $item->menu_item_parent ] ) ) { |
|
74 | + if (isset($item->menu_item_parent) && $item->menu_item_parent && isset($_return[$item->menu_item_parent])) { |
|
75 | 75 | |
76 | - $_return[ $item->menu_item_parent ]->add_child( $item ); |
|
76 | + $_return[$item->menu_item_parent]->add_child($item); |
|
77 | 77 | |
78 | - unset( $_return[ $item_id ] ); |
|
78 | + unset($_return[$item_id]); |
|
79 | 79 | |
80 | 80 | } |
81 | 81 | } |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | */ |
92 | 92 | protected function get_first_menu_id() { |
93 | 93 | |
94 | - $menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) ); |
|
94 | + $menus = get_terms('nav_menu', array('hide_empty' => true)); |
|
95 | 95 | |
96 | - if ( is_array( $menus ) && count( $menus ) ) { |
|
96 | + if (is_array($menus) && count($menus)) { |
|
97 | 97 | |
98 | - if ( isset( $menus[0]->term_id ) ) { |
|
98 | + if (isset($menus[0]->term_id)) { |
|
99 | 99 | |
100 | 100 | return $menus[0]->term_id; |
101 | 101 | |
@@ -112,15 +112,15 @@ discard block |
||
112 | 112 | * @param int $menu_id |
113 | 113 | * @return int/boolean |
114 | 114 | */ |
115 | - protected function check_menu_id( $menu_id ) { |
|
115 | + protected function check_menu_id($menu_id) { |
|
116 | 116 | |
117 | - $menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) ); |
|
117 | + $menus = get_terms('nav_menu', array('hide_empty' => true)); |
|
118 | 118 | |
119 | - if ( is_array( $menus ) && count( $menus ) ) { |
|
119 | + if (is_array($menus) && count($menus)) { |
|
120 | 120 | |
121 | - foreach ( $menus as $menu ) { |
|
121 | + foreach ($menus as $menu) { |
|
122 | 122 | |
123 | - if ( $menu->term_id == $menu_id ) { |
|
123 | + if ($menu->term_id == $menu_id) { |
|
124 | 124 | |
125 | 125 | return $menu_id; |
126 | 126 | |
@@ -138,17 +138,17 @@ discard block |
||
138 | 138 | * @param string $slug |
139 | 139 | * @return int |
140 | 140 | */ |
141 | - protected function get_menu_id_by_name( $slug = null ) { |
|
141 | + protected function get_menu_id_by_name($slug = null) { |
|
142 | 142 | |
143 | - if ( $slug && is_string( $slug ) ) { |
|
143 | + if ($slug && is_string($slug)) { |
|
144 | 144 | |
145 | - $menu_id = get_term_by( 'slug', $slug, 'nav_menu' ); |
|
145 | + $menu_id = get_term_by('slug', $slug, 'nav_menu'); |
|
146 | 146 | |
147 | - if ( $menu_id ) { return $menu_id; } |
|
147 | + if ($menu_id) { return $menu_id; } |
|
148 | 148 | |
149 | - $menu_id = get_term_by( 'name', $slug, 'nav_menu' ); |
|
149 | + $menu_id = get_term_by('name', $slug, 'nav_menu'); |
|
150 | 150 | |
151 | - if ( $menu_id ) { return $menu_id; } |
|
151 | + if ($menu_id) { return $menu_id; } |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | return false; |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @param WP_Post $item |
43 | 43 | */ |
44 | - public function __construct( $item ) { |
|
44 | + public function __construct($item) { |
|
45 | 45 | |
46 | - if ( is_a( $item, 'WP_Post' ) ) { |
|
46 | + if (is_a($item, 'WP_Post')) { |
|
47 | 47 | |
48 | - $this->import( $item ); |
|
48 | + $this->import($item); |
|
49 | 49 | $this->filter_classes(); |
50 | 50 | |
51 | 51 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function get_classes() { |
104 | 104 | |
105 | - return implode( ' ', $this->classes ); |
|
105 | + return implode(' ', $this->classes); |
|
106 | 106 | |
107 | 107 | } |
108 | 108 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * |
112 | 112 | * @param string $class_name |
113 | 113 | */ |
114 | - public function add_class( $class_name ) { |
|
114 | + public function add_class($class_name) { |
|
115 | 115 | |
116 | 116 | $this->classes[] = $class_name; |
117 | 117 | |
@@ -122,17 +122,17 @@ discard block |
||
122 | 122 | * |
123 | 123 | * @param ClassyMenuItem $item |
124 | 124 | */ |
125 | - public function add_child( $item ) { |
|
125 | + public function add_child($item) { |
|
126 | 126 | |
127 | - if ( ! $this->has_child ) { |
|
128 | - $this->add_class( 'menu-item-has-children' ); |
|
127 | + if (!$this->has_child) { |
|
128 | + $this->add_class('menu-item-has-children'); |
|
129 | 129 | $this->has_child = true; |
130 | 130 | } |
131 | 131 | |
132 | 132 | $this->children[] = $item; |
133 | 133 | $item->level = $this->level + 1; |
134 | 134 | |
135 | - if ( $item->children ) { |
|
135 | + if ($item->children) { |
|
136 | 136 | $this->update_child_levels(); |
137 | 137 | } |
138 | 138 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | protected function filter_classes() { |
147 | 147 | |
148 | - $this->classes = apply_filters( 'nav_menu_css_class', $this->classes, $this ); |
|
148 | + $this->classes = apply_filters('nav_menu_css_class', $this->classes, $this); |
|
149 | 149 | |
150 | 150 | } |
151 | 151 | |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | */ |
157 | 157 | protected function update_child_levels() { |
158 | 158 | |
159 | - if ( is_array( $this->children ) ) { |
|
159 | + if (is_array($this->children)) { |
|
160 | 160 | |
161 | - foreach ( $this->children as $child ) { |
|
161 | + foreach ($this->children as $child) { |
|
162 | 162 | $child->level = $this->level + 1; |
163 | 163 | $child->update_child_levels(); |
164 | 164 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | private static function get_allowed_variables() { |
18 | 18 | |
19 | - return array( 'environment', 'textdomain', 'post_types', 'taxonomies', 'post_formats', 'sidebars' );; |
|
19 | + return array('environment', 'textdomain', 'post_types', 'taxonomies', 'post_formats', 'sidebars'); ; |
|
20 | 20 | |
21 | 21 | } |
22 | 22 | |
@@ -27,30 +27,30 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public static function get_vars() { |
29 | 29 | |
30 | - if ( null === self::$vars ) { |
|
30 | + if (null === self::$vars) { |
|
31 | 31 | |
32 | 32 | // Check for a theme config |
33 | - $config_file = THEME_FRAMEWORK_PATH . 'config.php'; |
|
33 | + $config_file = THEME_FRAMEWORK_PATH.'config.php'; |
|
34 | 34 | |
35 | - if ( file_exists( $config_file ) ) { |
|
35 | + if (file_exists($config_file)) { |
|
36 | 36 | |
37 | - require_once THEME_FRAMEWORK_PATH . 'config.php'; |
|
37 | + require_once THEME_FRAMEWORK_PATH.'config.php'; |
|
38 | 38 | |
39 | 39 | $vars = self::get_allowed_variables(); |
40 | 40 | |
41 | - foreach ( $vars as $var ) { |
|
41 | + foreach ($vars as $var) { |
|
42 | 42 | |
43 | - if ( isset( $$var ) ) { |
|
43 | + if (isset($$var)) { |
|
44 | 44 | |
45 | - self::$vars[ $var ] = $$var; |
|
45 | + self::$vars[$var] = $$var; |
|
46 | 46 | |
47 | - unset( $$var ); // We don't require it anymore |
|
47 | + unset($$var); // We don't require it anymore |
|
48 | 48 | |
49 | 49 | } |
50 | 50 | } |
51 | 51 | } else { |
52 | 52 | |
53 | - die( 'There is no config file in ' . THEME . ' custom/config.php' ); |
|
53 | + die('There is no config file in '.THEME.' custom/config.php'); |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | } |
@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | $vars = self::get_vars(); |
70 | 70 | |
71 | 71 | // Init Post Types |
72 | - if ( isset( $vars['post_types'] ) ) { self::init_post_types( $vars['post_types'] ); } |
|
72 | + if (isset($vars['post_types'])) { self::init_post_types($vars['post_types']); } |
|
73 | 73 | |
74 | 74 | // Init Taxonomies |
75 | - if ( isset( $vars['taxonomies'] ) ) { self::init_taxonomies( $vars['taxonomies'] ); } |
|
75 | + if (isset($vars['taxonomies'])) { self::init_taxonomies($vars['taxonomies']); } |
|
76 | 76 | |
77 | 77 | // Init Post Formats |
78 | - if ( isset( $vars['post_formats'] ) ) { self::init_post_formats( $vars['post_formats'] ); } |
|
78 | + if (isset($vars['post_formats'])) { self::init_post_formats($vars['post_formats']); } |
|
79 | 79 | |
80 | 80 | // Init Sidebars |
81 | - if ( isset( $vars['sidebars'] ) ) { self::init_sidebars( $vars['sidebars'] ); } |
|
81 | + if (isset($vars['sidebars'])) { self::init_sidebars($vars['sidebars']); } |
|
82 | 82 | |
83 | 83 | } |
84 | 84 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | * |
90 | 90 | * @param array $post_types |
91 | 91 | */ |
92 | - private static function init_post_types( $post_types ) { |
|
92 | + private static function init_post_types($post_types) { |
|
93 | 93 | |
94 | - if ( is_array( $post_types ) ) { |
|
94 | + if (is_array($post_types)) { |
|
95 | 95 | |
96 | - foreach ( $post_types as $type => $options ) { |
|
96 | + foreach ($post_types as $type => $options) { |
|
97 | 97 | |
98 | - self::add_post_type( $type, $options['config'], $options['singular'], $options['multiple'] ); |
|
98 | + self::add_post_type($type, $options['config'], $options['singular'], $options['multiple']); |
|
99 | 99 | |
100 | 100 | } |
101 | 101 | } |
@@ -111,28 +111,28 @@ discard block |
||
111 | 111 | * @param string $singular |
112 | 112 | * @param string $multiple |
113 | 113 | */ |
114 | - private static function add_post_type( $name, $config, $singular = 'Entry', $multiple = 'Entries' ) { |
|
114 | + private static function add_post_type($name, $config, $singular = 'Entry', $multiple = 'Entries') { |
|
115 | 115 | |
116 | 116 | $domain = Classy::textdomain(); |
117 | 117 | |
118 | - if ( ! isset( $config['labels'] ) ) { |
|
118 | + if (!isset($config['labels'])) { |
|
119 | 119 | |
120 | 120 | $config['labels'] = array( |
121 | - 'name' => __( $multiple, $domain ), |
|
122 | - 'singular_name' => __( $singular, $domain ), |
|
123 | - 'not_found' => __( 'No ' . $multiple . ' Found', $domain ), |
|
124 | - 'not_found_in_trash' => __( 'No ' . $multiple . ' found in Trash', $domain ), |
|
125 | - 'edit_item' => __( 'Edit ', $singular, $domain ), |
|
126 | - 'search_items' => __( 'Search ' . $multiple, $domain ), |
|
127 | - 'view_item' => __( 'View ', $singular, $domain ), |
|
128 | - 'new_item' => __( 'New ' . $singular, $domain ), |
|
129 | - 'add_new' => __( 'Add New', $domain ), |
|
130 | - 'add_new_item' => __( 'Add New ' . $singular, $domain ), |
|
121 | + 'name' => __($multiple, $domain), |
|
122 | + 'singular_name' => __($singular, $domain), |
|
123 | + 'not_found' => __('No '.$multiple.' Found', $domain), |
|
124 | + 'not_found_in_trash' => __('No '.$multiple.' found in Trash', $domain), |
|
125 | + 'edit_item' => __('Edit ', $singular, $domain), |
|
126 | + 'search_items' => __('Search '.$multiple, $domain), |
|
127 | + 'view_item' => __('View ', $singular, $domain), |
|
128 | + 'new_item' => __('New '.$singular, $domain), |
|
129 | + 'add_new' => __('Add New', $domain), |
|
130 | + 'add_new_item' => __('Add New '.$singular, $domain), |
|
131 | 131 | ); |
132 | 132 | |
133 | 133 | } |
134 | 134 | |
135 | - register_post_type( $name, $config ); |
|
135 | + register_post_type($name, $config); |
|
136 | 136 | |
137 | 137 | } |
138 | 138 | |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | * |
142 | 142 | * @param array $taxonomies |
143 | 143 | */ |
144 | - private static function init_taxonomies( $taxonomies ) { |
|
144 | + private static function init_taxonomies($taxonomies) { |
|
145 | 145 | |
146 | - if ( is_array( $taxonomies ) ) { |
|
146 | + if (is_array($taxonomies)) { |
|
147 | 147 | |
148 | - foreach ( $taxonomies as $type => $options ) { |
|
148 | + foreach ($taxonomies as $type => $options) { |
|
149 | 149 | |
150 | - self::add_taxonomy( $type, $options['for'], $options['config'], $options['singular'], $options['multiple'] ); |
|
150 | + self::add_taxonomy($type, $options['for'], $options['config'], $options['singular'], $options['multiple']); |
|
151 | 151 | |
152 | 152 | } |
153 | 153 | } |
@@ -163,29 +163,29 @@ discard block |
||
163 | 163 | * @param string $singular |
164 | 164 | * @param string $multiple |
165 | 165 | */ |
166 | - private static function add_taxonomy( $name, $object_type, $config, $singular = 'Entry', $multiple = 'Entries' ) { |
|
166 | + private static function add_taxonomy($name, $object_type, $config, $singular = 'Entry', $multiple = 'Entries') { |
|
167 | 167 | |
168 | 168 | $domain = Classy::textdomain(); |
169 | 169 | |
170 | - if ( ! isset( $config['labels'] ) ) { |
|
170 | + if (!isset($config['labels'])) { |
|
171 | 171 | |
172 | 172 | $config['labels'] = array( |
173 | - 'name' => __( $multiple, $domain ), |
|
174 | - 'singular_name' => __( $singular, $domain ), |
|
175 | - 'search_items' => __( 'Search ' . $multiple, $domain ), |
|
176 | - 'all_items' => __( 'All ' . $multiple, $domain ), |
|
177 | - 'parent_item' => __( 'Parent ' . $singular, $domain ), |
|
178 | - 'parent_item_colon' => __( 'Parent ' . $singular . ':', $domain ), |
|
179 | - 'edit_item' => __( 'Edit ' . $singular, $domain ), |
|
180 | - 'update_item' => __( 'Update ' . $singular, $domain ), |
|
181 | - 'add_new_item' => __( 'Add New ' . $singular, $domain ), |
|
182 | - 'new_item_name' => __( 'New ' . $singular . ' Name', $domain ), |
|
183 | - 'menu_name' => __( $singular, $domain ), |
|
173 | + 'name' => __($multiple, $domain), |
|
174 | + 'singular_name' => __($singular, $domain), |
|
175 | + 'search_items' => __('Search '.$multiple, $domain), |
|
176 | + 'all_items' => __('All '.$multiple, $domain), |
|
177 | + 'parent_item' => __('Parent '.$singular, $domain), |
|
178 | + 'parent_item_colon' => __('Parent '.$singular.':', $domain), |
|
179 | + 'edit_item' => __('Edit '.$singular, $domain), |
|
180 | + 'update_item' => __('Update '.$singular, $domain), |
|
181 | + 'add_new_item' => __('Add New '.$singular, $domain), |
|
182 | + 'new_item_name' => __('New '.$singular.' Name', $domain), |
|
183 | + 'menu_name' => __($singular, $domain), |
|
184 | 184 | ); |
185 | 185 | |
186 | 186 | } |
187 | 187 | |
188 | - register_taxonomy( $name, $object_type, $config ); |
|
188 | + register_taxonomy($name, $object_type, $config); |
|
189 | 189 | |
190 | 190 | } |
191 | 191 | |
@@ -194,11 +194,11 @@ discard block |
||
194 | 194 | * |
195 | 195 | * @param array $post_formats |
196 | 196 | */ |
197 | - private static function init_post_formats( $post_formats ) { |
|
197 | + private static function init_post_formats($post_formats) { |
|
198 | 198 | |
199 | - if ( is_array( $post_formats ) ) { |
|
199 | + if (is_array($post_formats)) { |
|
200 | 200 | |
201 | - add_theme_support( 'post-formats', $post_formats ); |
|
201 | + add_theme_support('post-formats', $post_formats); |
|
202 | 202 | |
203 | 203 | } |
204 | 204 | |
@@ -209,19 +209,19 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @param array $sidebars |
211 | 211 | */ |
212 | - private static function init_sidebars( $sidebars ) { |
|
212 | + private static function init_sidebars($sidebars) { |
|
213 | 213 | |
214 | 214 | $domain = Classy::textdomain(); |
215 | 215 | |
216 | - if ( is_array( $sidebars ) ) { |
|
216 | + if (is_array($sidebars)) { |
|
217 | 217 | |
218 | - foreach ( $sidebars as $id => $title ) { |
|
218 | + foreach ($sidebars as $id => $title) { |
|
219 | 219 | |
220 | 220 | register_sidebar( |
221 | 221 | array( |
222 | 222 | 'id' => $id, |
223 | - 'name' => __( $title, $domain ), |
|
224 | - 'description' => __( $title, $domain ), |
|
223 | + 'name' => __($title, $domain), |
|
224 | + 'description' => __($title, $domain), |
|
225 | 225 | 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-inner">', |
226 | 226 | 'after_widget' => '</div></div>', |
227 | 227 | 'before_title' => '<h3>', |