@@ -231,13 +231,13 @@ |
||
231 | 231 | $can_preview = array(); |
232 | 232 | |
233 | 233 | foreach( $can as $type ) { |
234 | - if( current_user_can( $type ) ) { |
|
235 | - $can_preview[] = true; |
|
236 | - } |
|
234 | + if( current_user_can( $type ) ) { |
|
235 | + $can_preview[] = true; |
|
236 | + } |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | if ( count( $can_preview ) !== count( $can ) ) { |
240 | - return; |
|
240 | + return; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | $revisions = wp_get_post_revisions( $query->queried_object_id ); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @param mixed $pid |
163 | 163 | */ |
164 | 164 | public function __construct($pid = null) { |
165 | - $pid = $this->determine_id( $pid ); |
|
165 | + $pid = $this->determine_id($pid); |
|
166 | 166 | $this->init($pid); |
167 | 167 | } |
168 | 168 | |
@@ -181,18 +181,18 @@ discard block |
||
181 | 181 | && is_object($wp_query->queried_object) |
182 | 182 | && get_class($wp_query->queried_object) == 'WP_Post' |
183 | 183 | ) { |
184 | - if( isset( $_GET['preview'] ) && isset( $_GET['preview_nonce'] ) && wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $wp_query->queried_object_id ) ) { |
|
185 | - $pid = $this->get_post_preview_id( $wp_query ); |
|
184 | + if ( isset($_GET['preview']) && isset($_GET['preview_nonce']) && wp_verify_nonce($_GET['preview_nonce'], 'post_preview_' . $wp_query->queried_object_id) ) { |
|
185 | + $pid = $this->get_post_preview_id($wp_query); |
|
186 | 186 | } else if ( !$pid ) { |
187 | 187 | $pid = $wp_query->queried_object_id; |
188 | 188 | } |
189 | - } else if ( $pid === null && $wp_query->is_home && isset($wp_query->queried_object_id) && $wp_query->queried_object_id ) { |
|
189 | + } else if ( $pid === null && $wp_query->is_home && isset($wp_query->queried_object_id) && $wp_query->queried_object_id ) { |
|
190 | 190 | //hack for static page as home page |
191 | 191 | $pid = $wp_query->queried_object_id; |
192 | 192 | } else if ( $pid === null ) { |
193 | 193 | $gtid = false; |
194 | 194 | $maybe_post = get_post(); |
195 | - if ( isset($maybe_post->ID) ){ |
|
195 | + if ( isset($maybe_post->ID) ) { |
|
196 | 196 | $gtid = true; |
197 | 197 | } |
198 | 198 | if ( $gtid ) { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | return $this->title(); |
220 | 220 | } |
221 | 221 | |
222 | - protected function get_post_preview_id( $query ) { |
|
222 | + protected function get_post_preview_id($query) { |
|
223 | 223 | $can = array( |
224 | 224 | 'edit_' . $query->queried_object->post_type . 's', |
225 | 225 | ); |
@@ -230,19 +230,19 @@ discard block |
||
230 | 230 | |
231 | 231 | $can_preview = array(); |
232 | 232 | |
233 | - foreach( $can as $type ) { |
|
234 | - if( current_user_can( $type ) ) { |
|
233 | + foreach ($can as $type) { |
|
234 | + if ( current_user_can($type) ) { |
|
235 | 235 | $can_preview[] = true; |
236 | 236 | } |
237 | 237 | } |
238 | 238 | |
239 | - if ( count( $can_preview ) !== count( $can ) ) { |
|
239 | + if ( count($can_preview) !== count($can) ) { |
|
240 | 240 | return; |
241 | 241 | } |
242 | 242 | |
243 | - $revisions = wp_get_post_revisions( $query->queried_object_id ); |
|
243 | + $revisions = wp_get_post_revisions($query->queried_object_id); |
|
244 | 244 | |
245 | - if( !empty( $revisions ) ) { |
|
245 | + if ( !empty($revisions) ) { |
|
246 | 246 | $last = end($revisions); |
247 | 247 | return $last->ID; |
248 | 248 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | * @param string $field |
287 | 287 | * @param mixed $value |
288 | 288 | */ |
289 | - public function update( $field, $value ) { |
|
289 | + public function update($field, $value) { |
|
290 | 290 | if ( isset($this->ID) ) { |
291 | 291 | update_post_meta($this->ID, $field, $value); |
292 | 292 | $this->$field = $value; |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | * @param mixed $pid |
302 | 302 | * @return WP_Post on success |
303 | 303 | */ |
304 | - protected function prepare_post_info( $pid = 0 ) { |
|
304 | + protected function prepare_post_info($pid = 0) { |
|
305 | 305 | if ( is_string($pid) || is_numeric($pid) || (is_object($pid) && !isset($pid->post_title)) || $pid === 0 ) { |
306 | 306 | $pid = self::check_post_id($pid); |
307 | 307 | $post = get_post($pid); |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * @internal |
321 | 321 | * @return integer ID number of a post |
322 | 322 | */ |
323 | - protected function check_post_id( $pid ) { |
|
323 | + protected function check_post_id($pid) { |
|
324 | 324 | if ( is_numeric($pid) && $pid === 0 ) { |
325 | 325 | $pid = get_the_ID(); |
326 | 326 | return $pid; |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | global $wpdb; |
347 | 347 | $query = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s LIMIT 1", $post_name); |
348 | 348 | $result = $wpdb->get_row($query); |
349 | - if (!$result) { |
|
349 | + if ( !$result ) { |
|
350 | 350 | return null; |
351 | 351 | } |
352 | 352 | return $result->ID; |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $text = TimberHelper::trim_words($text, $len, false); |
387 | 387 | $trimmed = true; |
388 | 388 | } |
389 | - $text = do_shortcode( $text ); |
|
389 | + $text = do_shortcode($text); |
|
390 | 390 | } |
391 | 391 | if ( !strlen($text) ) { |
392 | 392 | $text = TimberHelper::trim_words($this->get_content(), $len, false); |
@@ -416,11 +416,11 @@ discard block |
||
416 | 416 | } |
417 | 417 | $read_more_class = apply_filters('timber/post/get_preview/read_more_class', "read-more"); |
418 | 418 | if ( $readmore && isset($readmore_matches) && !empty($readmore_matches[1]) ) { |
419 | - $text .= ' <a href="' . $this->get_permalink() . '" class="'.$read_more_class .'">' . trim($readmore_matches[1]) . '</a>'; |
|
419 | + $text .= ' <a href="' . $this->get_permalink() . '" class="' . $read_more_class . '">' . trim($readmore_matches[1]) . '</a>'; |
|
420 | 420 | } elseif ( $readmore ) { |
421 | - $text .= ' <a href="' . $this->get_permalink() . '" class="'.$read_more_class .'">' . trim($readmore) . '</a>'; |
|
421 | + $text .= ' <a href="' . $this->get_permalink() . '" class="' . $read_more_class . '">' . trim($readmore) . '</a>'; |
|
422 | 422 | } |
423 | - if ( !$strip && $last_p_tag && ( strpos($text, '<p>') || strpos($text, '<p ') ) ) { |
|
423 | + if ( !$strip && $last_p_tag && (strpos($text, '<p>') || strpos($text, '<p ')) ) { |
|
424 | 424 | $text .= '</p>'; |
425 | 425 | } |
426 | 426 | } |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * @internal |
433 | 433 | * @param bool|int $pid a post ID number |
434 | 434 | */ |
435 | - function import_custom( $pid = false ) { |
|
435 | + function import_custom($pid = false) { |
|
436 | 436 | if ( !$pid ) { |
437 | 437 | $pid = $this->ID; |
438 | 438 | } |
@@ -447,13 +447,13 @@ discard block |
||
447 | 447 | * @param int $pid |
448 | 448 | * @return array |
449 | 449 | */ |
450 | - protected function get_post_custom( $pid ) { |
|
450 | + protected function get_post_custom($pid) { |
|
451 | 451 | apply_filters('timber_post_get_meta_pre', array(), $pid, $this); |
452 | 452 | $customs = get_post_custom($pid); |
453 | 453 | if ( !is_array($customs) || empty($customs) ) { |
454 | 454 | return array(); |
455 | 455 | } |
456 | - foreach ( $customs as $key => $value ) { |
|
456 | + foreach ($customs as $key => $value) { |
|
457 | 457 | if ( is_array($value) && count($value) == 1 && isset($value[0]) ) { |
458 | 458 | $value = $value[0]; |
459 | 459 | } |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | * @param bool $taxonomy |
508 | 508 | * @return TimberPost|boolean |
509 | 509 | */ |
510 | - function get_next( $taxonomy = false ) { |
|
510 | + function get_next($taxonomy = false) { |
|
511 | 511 | if ( !isset($this->_next) || !isset($this->_next[$taxonomy]) ) { |
512 | 512 | global $post; |
513 | 513 | $this->_next = array(); |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | $post = $this; |
539 | 539 | $ret = array(); |
540 | 540 | if ( $multipage ) { |
541 | - for ( $i = 1; $i <= $numpages; $i++ ) { |
|
541 | + for ($i = 1; $i <= $numpages; $i++) { |
|
542 | 542 | $link = self::get_wp_link_page($i); |
543 | 543 | $data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link); |
544 | 544 | if ( $i == $page ) { |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | * @param bool $taxonomy |
591 | 591 | * @return TimberPost|boolean |
592 | 592 | */ |
593 | - function get_prev( $taxonomy = false ) { |
|
593 | + function get_prev($taxonomy = false) { |
|
594 | 594 | if ( isset($this->_prev) && isset($this->_prev[$taxonomy]) ) { |
595 | 595 | return $this->_prev[$taxonomy]; |
596 | 596 | } |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | $post->slug = $post->post_name; |
658 | 658 | $customs = $this->get_post_custom($post->ID); |
659 | 659 | $post->custom = $customs; |
660 | - $post = (object) array_merge((array)$customs, (array)$post); |
|
660 | + $post = (object) array_merge((array) $customs, (array) $post); |
|
661 | 661 | return $post; |
662 | 662 | } |
663 | 663 | |
@@ -667,9 +667,9 @@ discard block |
||
667 | 667 | * @param string $date_format |
668 | 668 | * @return string |
669 | 669 | */ |
670 | - function get_date( $date_format = '' ) { |
|
670 | + function get_date($date_format = '') { |
|
671 | 671 | $df = $date_format ? $date_format : get_option('date_format'); |
672 | - $the_date = (string)mysql2date($df, $this->post_date); |
|
672 | + $the_date = (string) mysql2date($df, $this->post_date); |
|
673 | 673 | return apply_filters('get_the_date', $the_date, $df); |
674 | 674 | } |
675 | 675 | |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | * @param string $date_format |
679 | 679 | * @return string |
680 | 680 | */ |
681 | - function get_modified_date( $date_format = '' ) { |
|
681 | + function get_modified_date($date_format = '') { |
|
682 | 682 | $df = $date_format ? $date_format : get_option('date_format'); |
683 | 683 | $the_time = $this->get_modified_time($df); |
684 | 684 | return apply_filters('get_the_modified_date', $the_time, $date_format); |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @param string $time_format |
690 | 690 | * @return string |
691 | 691 | */ |
692 | - function get_modified_time( $time_format = '' ) { |
|
692 | + function get_modified_time($time_format = '') { |
|
693 | 693 | $tf = $time_format ? $time_format : get_option('time_format'); |
694 | 694 | $the_time = get_post_modified_time($tf, false, $this->ID, true); |
695 | 695 | return apply_filters('get_the_modified_time', $the_time, $time_format); |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | * @param bool|string $childPostClass |
703 | 703 | * @return array |
704 | 704 | */ |
705 | - function get_children( $post_type = 'any', $childPostClass = false ) { |
|
705 | + function get_children($post_type = 'any', $childPostClass = false) { |
|
706 | 706 | if ( $childPostClass === false ) { |
707 | 707 | $childPostClass = $this->PostClass; |
708 | 708 | } |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $post_type = $this->post_type; |
711 | 711 | } |
712 | 712 | $children = get_children('post_parent=' . $this->ID . '&post_type=' . $post_type . '&numberposts=-1&orderby=menu_order title&order=ASC&post_status=publish'); |
713 | - foreach ( $children as &$child ) { |
|
713 | + foreach ($children as &$child) { |
|
714 | 714 | $child = new $childPostClass($child->ID); |
715 | 715 | } |
716 | 716 | $children = array_values($children); |
@@ -747,42 +747,42 @@ discard block |
||
747 | 747 | } |
748 | 748 | |
749 | 749 | if ( $user_ID ) { |
750 | - $args['include_unapproved'] = array( $user_ID ); |
|
751 | - } elseif ( ! empty( $comment_author_email ) ) { |
|
752 | - $args['include_unapproved'] = array( $comment_author_email ); |
|
750 | + $args['include_unapproved'] = array($user_ID); |
|
751 | + } elseif ( !empty($comment_author_email) ) { |
|
752 | + $args['include_unapproved'] = array($comment_author_email); |
|
753 | 753 | } |
754 | 754 | |
755 | 755 | $comments = get_comments($args); |
756 | 756 | $timber_comments = array(); |
757 | 757 | |
758 | 758 | if ( '' == get_query_var('cpage') && get_option('page_comments') ) { |
759 | - set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 ); |
|
759 | + set_query_var('cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1); |
|
760 | 760 | $overridden_cpage = true; |
761 | 761 | } |
762 | 762 | |
763 | - foreach($comments as $key => &$comment) { |
|
763 | + foreach ($comments as $key => &$comment) { |
|
764 | 764 | $timber_comment = new $CommentClass($comment); |
765 | 765 | $timber_comments[$timber_comment->id] = $timber_comment; |
766 | 766 | } |
767 | 767 | |
768 | 768 | // Build a flattened (depth=1) comment tree |
769 | 769 | $comments_tree = array(); |
770 | - foreach( $timber_comments as $key => $comment ) { |
|
771 | - if ( ! $comment->is_child() ) { |
|
770 | + foreach ($timber_comments as $key => $comment) { |
|
771 | + if ( !$comment->is_child() ) { |
|
772 | 772 | continue; |
773 | 773 | } |
774 | 774 | |
775 | 775 | $tree_element = $comment; |
776 | 776 | do { |
777 | 777 | $tree_element = $timber_comments[$tree_element->comment_parent]; |
778 | - } while( $tree_element->is_child() ); |
|
778 | + } while ($tree_element->is_child()); |
|
779 | 779 | |
780 | 780 | $comments_tree[$tree_element->id][] = $comment->id; |
781 | 781 | } |
782 | 782 | |
783 | 783 | // Add child comments to the relative "super parents" |
784 | - foreach($comments_tree as $comment_parent => $comment_children) { |
|
785 | - foreach($comment_children as $comment_child) { |
|
784 | + foreach ($comments_tree as $comment_parent => $comment_children) { |
|
785 | + foreach ($comment_children as $comment_child) { |
|
786 | 786 | $timber_comments[$comment_parent]->children[] = $timber_comments[$comment_child]; |
787 | 787 | unset($timber_comments[$comment_child]); |
788 | 788 | } |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | * @param string $TermClass |
823 | 823 | * @return array |
824 | 824 | */ |
825 | - function get_terms( $tax = '', $merge = true, $TermClass = '' ) { |
|
825 | + function get_terms($tax = '', $merge = true, $TermClass = '') { |
|
826 | 826 | |
827 | 827 | $TermClass = $TermClass ?: $this->TermClass; |
828 | 828 | |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | $taxonomies = $tax; |
834 | 834 | } |
835 | 835 | if ( is_string($tax) ) { |
836 | - if ( in_array($tax, array('all','any','')) ) { |
|
836 | + if ( in_array($tax, array('all', 'any', '')) ) { |
|
837 | 837 | $taxonomies = get_object_taxonomies($this->post_type); |
838 | 838 | } else { |
839 | 839 | $taxonomies = array($tax); |
@@ -842,8 +842,8 @@ discard block |
||
842 | 842 | |
843 | 843 | $term_class_objects = array(); |
844 | 844 | |
845 | - foreach ( $taxonomies as $taxonomy ) { |
|
846 | - if ( in_array($taxonomy, array('tag','tags')) ) { |
|
845 | + foreach ($taxonomies as $taxonomy) { |
|
846 | + if ( in_array($taxonomy, array('tag', 'tags')) ) { |
|
847 | 847 | $taxonomy = 'post_tag'; |
848 | 848 | } |
849 | 849 | if ( $taxonomy == 'categories' ) { |
@@ -880,11 +880,11 @@ discard block |
||
880 | 880 | * @param string $taxonomy |
881 | 881 | * @return bool |
882 | 882 | */ |
883 | - function has_term( $term_name_or_id, $taxonomy = 'all' ) { |
|
883 | + function has_term($term_name_or_id, $taxonomy = 'all') { |
|
884 | 884 | if ( $taxonomy == 'all' || $taxonomy == 'any' ) { |
885 | 885 | $taxes = get_object_taxonomies($this->post_type, 'names'); |
886 | 886 | $ret = false; |
887 | - foreach ( $taxes as $tax ) { |
|
887 | + foreach ($taxes as $tax) { |
|
888 | 888 | if ( has_term($term_name_or_id, $tax, $this->ID) ) { |
889 | 889 | $ret = true; |
890 | 890 | break; |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | * @param string $field |
900 | 900 | * @return TimberImage |
901 | 901 | */ |
902 | - function get_image( $field ) { |
|
902 | + function get_image($field) { |
|
903 | 903 | return new $this->ImageClass($this->$field); |
904 | 904 | } |
905 | 905 | |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | * @param int $page |
950 | 950 | * @return string |
951 | 951 | */ |
952 | - function get_content( $len = 0, $page = 0 ) { |
|
952 | + function get_content($len = 0, $page = 0) { |
|
953 | 953 | if ( $len == 0 && $page == 0 && $this->_content ) { |
954 | 954 | return $this->_content; |
955 | 955 | } |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | * @param string $field_name |
1007 | 1007 | * @return mixed |
1008 | 1008 | */ |
1009 | - public function get_field( $field_name ) { |
|
1009 | + public function get_field($field_name) { |
|
1010 | 1010 | $value = apply_filters('timber_post_get_meta_field_pre', null, $this->ID, $field_name, $this); |
1011 | 1011 | if ( $value === null ) { |
1012 | 1012 | $value = get_post_meta($this->ID, $field_name); |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | /** |
1025 | 1025 | * @param string $field_name |
1026 | 1026 | */ |
1027 | - function import_field( $field_name ) { |
|
1027 | + function import_field($field_name) { |
|
1028 | 1028 | $this->$field_name = $this->get_field($field_name); |
1029 | 1029 | } |
1030 | 1030 | |
@@ -1055,13 +1055,13 @@ discard block |
||
1055 | 1055 | * ``` |
1056 | 1056 | * @return string a space-seperated list of classes |
1057 | 1057 | */ |
1058 | - public function post_class( $class='' ) { |
|
1058 | + public function post_class($class = '') { |
|
1059 | 1059 | global $post; |
1060 | 1060 | $old_global_post = $post; |
1061 | 1061 | $post = $this; |
1062 | 1062 | $class_array = get_post_class($class, $this->ID); |
1063 | 1063 | $post = $old_global_post; |
1064 | - if ( is_array($class_array) ){ |
|
1064 | + if ( is_array($class_array) ) { |
|
1065 | 1065 | return implode(' ', $class_array); |
1066 | 1066 | } |
1067 | 1067 | return $class_array; |
@@ -1163,8 +1163,8 @@ discard block |
||
1163 | 1163 | * @param string|bool $childPostClass _optional_ a custom post class (ex: 'MyTimberPost') to return the objects as. By default (false) it will use TimberPost::$post_class value. |
1164 | 1164 | * @return array |
1165 | 1165 | */ |
1166 | - public function children( $post_type = 'any', $childPostClass = false ) { |
|
1167 | - return $this->get_children( $post_type, $childPostClass ); |
|
1166 | + public function children($post_type = 'any', $childPostClass = false) { |
|
1167 | + return $this->get_children($post_type, $childPostClass); |
|
1168 | 1168 | } |
1169 | 1169 | |
1170 | 1170 | /** |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | * ``` |
1189 | 1189 | * @return bool|array |
1190 | 1190 | */ |
1191 | - public function comments( $count = 0, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'TimberComment' ) { |
|
1191 | + public function comments($count = 0, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'TimberComment') { |
|
1192 | 1192 | return $this->get_comments($count, $order, $type, $status, $CommentClass); |
1193 | 1193 | } |
1194 | 1194 | |
@@ -1205,7 +1205,7 @@ discard block |
||
1205 | 1205 | * @param int $page |
1206 | 1206 | * @return string |
1207 | 1207 | */ |
1208 | - public function content( $page = 0 ) { |
|
1208 | + public function content($page = 0) { |
|
1209 | 1209 | return $this->get_content(0, $page); |
1210 | 1210 | } |
1211 | 1211 | |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | * @param string $date_format |
1235 | 1235 | * @return string |
1236 | 1236 | */ |
1237 | - public function date( $date_format = '' ) { |
|
1237 | + public function date($date_format = '') { |
|
1238 | 1238 | return $this->get_date($date_format); |
1239 | 1239 | } |
1240 | 1240 | |
@@ -1256,9 +1256,9 @@ discard block |
||
1256 | 1256 | * @param string $time_format |
1257 | 1257 | * @return string |
1258 | 1258 | */ |
1259 | - public function time( $time_format = '' ) { |
|
1259 | + public function time($time_format = '') { |
|
1260 | 1260 | $tf = $time_format ? $time_format : get_option('time_format'); |
1261 | - $the_time = (string)mysql2date($tf, $this->post_date); |
|
1261 | + $the_time = (string) mysql2date($tf, $this->post_date); |
|
1262 | 1262 | return apply_filters('get_the_time', $the_time, $tf); |
1263 | 1263 | } |
1264 | 1264 | |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | * @param string $field_name |
1295 | 1295 | * @return mixed |
1296 | 1296 | */ |
1297 | - public function meta( $field_name = null ) { |
|
1297 | + public function meta($field_name = null) { |
|
1298 | 1298 | if ( $field_name === null ) { |
1299 | 1299 | //on the off-chance the field is actually named meta |
1300 | 1300 | $field_name = 'meta'; |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | /** |
1306 | 1306 | * @return string |
1307 | 1307 | */ |
1308 | - public function name(){ |
|
1308 | + public function name() { |
|
1309 | 1309 | return $this->title(); |
1310 | 1310 | } |
1311 | 1311 | |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | * @param string $date_format |
1314 | 1314 | * @return string |
1315 | 1315 | */ |
1316 | - public function modified_date( $date_format = '' ) { |
|
1316 | + public function modified_date($date_format = '') { |
|
1317 | 1317 | return $this->get_modified_date($date_format); |
1318 | 1318 | } |
1319 | 1319 | |
@@ -1321,7 +1321,7 @@ discard block |
||
1321 | 1321 | * @param string $time_format |
1322 | 1322 | * @return string |
1323 | 1323 | */ |
1324 | - public function modified_time( $time_format = '' ) { |
|
1324 | + public function modified_time($time_format = '') { |
|
1325 | 1325 | return $this->get_modified_time($time_format); |
1326 | 1326 | } |
1327 | 1327 | |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | * @param bool $in_same_cat |
1331 | 1331 | * @return mixed |
1332 | 1332 | */ |
1333 | - public function next( $in_same_cat = false ) { |
|
1333 | + public function next($in_same_cat = false) { |
|
1334 | 1334 | return $this->get_next($in_same_cat); |
1335 | 1335 | } |
1336 | 1336 | |
@@ -1388,7 +1388,7 @@ discard block |
||
1388 | 1388 | * @param bool $in_same_cat |
1389 | 1389 | * @return mixed |
1390 | 1390 | */ |
1391 | - public function prev( $in_same_cat = false ) { |
|
1391 | + public function prev($in_same_cat = false) { |
|
1392 | 1392 | return $this->get_prev($in_same_cat); |
1393 | 1393 | } |
1394 | 1394 | |
@@ -1400,7 +1400,7 @@ discard block |
||
1400 | 1400 | * @param bool $merge Should the resulting array be one big one (true)? Or should it be an array of sub-arrays for each taxonomy (false)? |
1401 | 1401 | * @return array |
1402 | 1402 | */ |
1403 | - public function terms( $tax = '', $merge = true ) { |
|
1403 | + public function terms($tax = '', $merge = true) { |
|
1404 | 1404 | return $this->get_terms($tax, $merge); |
1405 | 1405 | } |
1406 | 1406 |