@@ -736,33 +736,33 @@ |
||
736 | 736 | $overridden_cpage = true; |
737 | 737 | } |
738 | 738 | |
739 | - foreach($comments as $key => &$comment) { |
|
740 | - $timber_comment = new $CommentClass($comment); |
|
741 | - $timber_comment->reply_link = $this->TimberComment_reply_link($comment->comment_ID, $this->ID); |
|
742 | - $timber_comments[$timber_comment->id] = $timber_comment; |
|
743 | - } |
|
739 | + foreach($comments as $key => &$comment) { |
|
740 | + $timber_comment = new $CommentClass($comment); |
|
741 | + $timber_comment->reply_link = $this->TimberComment_reply_link($comment->comment_ID, $this->ID); |
|
742 | + $timber_comments[$timber_comment->id] = $timber_comment; |
|
743 | + } |
|
744 | 744 | |
745 | 745 | // Build a flattened (depth=1) comment tree |
746 | 746 | $comments_tree = array(); |
747 | - foreach( $timber_comments as $key => $comment ) { |
|
748 | - if ( ! $comment->is_child() ) { |
|
749 | - continue; |
|
750 | - } |
|
751 | - |
|
752 | - $tree_element = $comment; |
|
753 | - do { |
|
754 | - $tree_element = $timber_comments[$tree_element->comment_parent]; |
|
755 | - } while($tree_element->is_child()); |
|
756 | - $comments_tree[$tree_element->id][] = $comment->id; |
|
757 | - } |
|
758 | - |
|
759 | - // Add child comments to the relative "super parents" |
|
760 | - foreach($comments_tree as $comment_parent => $comment_children) { |
|
761 | - foreach($comment_children as $comment_child) { |
|
762 | - $timber_comments[$comment_parent]->children[] = $timber_comments[$comment_child]; |
|
763 | - unset($timber_comments[$comment_child]); |
|
764 | - } |
|
765 | - } |
|
747 | + foreach( $timber_comments as $key => $comment ) { |
|
748 | + if ( ! $comment->is_child() ) { |
|
749 | + continue; |
|
750 | + } |
|
751 | + |
|
752 | + $tree_element = $comment; |
|
753 | + do { |
|
754 | + $tree_element = $timber_comments[$tree_element->comment_parent]; |
|
755 | + } while($tree_element->is_child()); |
|
756 | + $comments_tree[$tree_element->id][] = $comment->id; |
|
757 | + } |
|
758 | + |
|
759 | + // Add child comments to the relative "super parents" |
|
760 | + foreach($comments_tree as $comment_parent => $comment_children) { |
|
761 | + foreach($comment_children as $comment_child) { |
|
762 | + $timber_comments[$comment_parent]->children[] = $timber_comments[$comment_child]; |
|
763 | + unset($timber_comments[$comment_child]); |
|
764 | + } |
|
765 | + } |
|
766 | 766 | |
767 | 767 | $timber_comments = array_values($timber_comments); |
768 | 768 |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * @param mixed $pid |
169 | 169 | */ |
170 | 170 | public function __construct($pid = null) { |
171 | - $pid = $this->determine_id( $pid ); |
|
171 | + $pid = $this->determine_id($pid); |
|
172 | 172 | $this->init($pid); |
173 | 173 | } |
174 | 174 | |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | && get_class($wp_query->queried_object) == 'WP_Post' |
189 | 189 | ) { |
190 | 190 | $pid = $wp_query->queried_object_id; |
191 | - } else if ( $pid === null && $wp_query->is_home && isset($wp_query->queried_object_id) && $wp_query->queried_object_id ) { |
|
191 | + } else if ( $pid === null && $wp_query->is_home && isset($wp_query->queried_object_id) && $wp_query->queried_object_id ) { |
|
192 | 192 | //hack for static page as home page |
193 | 193 | $pid = $wp_query->queried_object_id; |
194 | 194 | } else if ( $pid === null ) { |
195 | 195 | $gtid = false; |
196 | 196 | $maybe_post = get_post(); |
197 | - if ( isset($maybe_post->ID) ){ |
|
197 | + if ( isset($maybe_post->ID) ) { |
|
198 | 198 | $gtid = true; |
199 | 199 | } |
200 | 200 | if ( $gtid ) { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * @param string $field |
261 | 261 | * @param mixed $value |
262 | 262 | */ |
263 | - public function update( $field, $value ) { |
|
263 | + public function update($field, $value) { |
|
264 | 264 | if ( isset($this->ID) ) { |
265 | 265 | update_post_meta($this->ID, $field, $value); |
266 | 266 | $this->$field = $value; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * @param mixed $pid |
276 | 276 | * @return WP_Post on success |
277 | 277 | */ |
278 | - protected function prepare_post_info( $pid = 0 ) { |
|
278 | + protected function prepare_post_info($pid = 0) { |
|
279 | 279 | if ( is_string($pid) || is_numeric($pid) || (is_object($pid) && !isset($pid->post_title)) || $pid === 0 ) { |
280 | 280 | $pid = self::check_post_id($pid); |
281 | 281 | $post = get_post($pid); |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * @internal |
298 | 298 | * @return integer ID number of a post |
299 | 299 | */ |
300 | - protected function check_post_id( $pid ) { |
|
300 | + protected function check_post_id($pid) { |
|
301 | 301 | if ( is_numeric($pid) && $pid === 0 ) { |
302 | 302 | $pid = get_the_ID(); |
303 | 303 | return $pid; |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | global $wpdb; |
324 | 324 | $query = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s LIMIT 1", $post_name); |
325 | 325 | $result = $wpdb->get_row($query); |
326 | - if (!$result) { |
|
326 | + if ( !$result ) { |
|
327 | 327 | return null; |
328 | 328 | } |
329 | 329 | return $result->ID; |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $text = TimberHelper::trim_words($text, $len, false); |
363 | 363 | $trimmed = true; |
364 | 364 | } |
365 | - $text = do_shortcode( $text ); |
|
365 | + $text = do_shortcode($text); |
|
366 | 366 | } |
367 | 367 | if ( !strlen($text) ) { |
368 | 368 | $text = TimberHelper::trim_words($this->get_content(), $len, false); |
@@ -391,11 +391,11 @@ discard block |
||
391 | 391 | } |
392 | 392 | $read_more_class = apply_filters('timber/post/get_preview/read_more_class', "read-more"); |
393 | 393 | if ( $readmore && isset($readmore_matches) && !empty($readmore_matches[1]) ) { |
394 | - $text .= ' <a href="' . $this->get_permalink() . '" class="'.$read_more_class .'">' . trim($readmore_matches[1]) . '</a>'; |
|
394 | + $text .= ' <a href="' . $this->get_permalink() . '" class="' . $read_more_class . '">' . trim($readmore_matches[1]) . '</a>'; |
|
395 | 395 | } elseif ( $readmore ) { |
396 | - $text .= ' <a href="' . $this->get_permalink() . '" class="'.$read_more_class .'">' . trim($readmore) . '</a>'; |
|
396 | + $text .= ' <a href="' . $this->get_permalink() . '" class="' . $read_more_class . '">' . trim($readmore) . '</a>'; |
|
397 | 397 | } |
398 | - if ( !$strip && $last_p_tag && ( strpos($text, '<p>') || strpos($text, '<p ') ) ) { |
|
398 | + if ( !$strip && $last_p_tag && (strpos($text, '<p>') || strpos($text, '<p ')) ) { |
|
399 | 399 | $text .= '</p>'; |
400 | 400 | } |
401 | 401 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | * @internal |
408 | 408 | * @param bool|int $pid a post ID number |
409 | 409 | */ |
410 | - function import_custom( $pid = false ) { |
|
410 | + function import_custom($pid = false) { |
|
411 | 411 | if ( !$pid ) { |
412 | 412 | $pid = $this->ID; |
413 | 413 | } |
@@ -422,13 +422,13 @@ discard block |
||
422 | 422 | * @param int $pid |
423 | 423 | * @return array |
424 | 424 | */ |
425 | - protected function get_post_custom( $pid ) { |
|
425 | + protected function get_post_custom($pid) { |
|
426 | 426 | apply_filters('timber_post_get_meta_pre', array(), $pid, $this); |
427 | 427 | $customs = get_post_custom($pid); |
428 | 428 | if ( !is_array($customs) || empty($customs) ) { |
429 | 429 | return array(); |
430 | 430 | } |
431 | - foreach ( $customs as $key => $value ) { |
|
431 | + foreach ($customs as $key => $value) { |
|
432 | 432 | if ( is_array($value) && count($value) == 1 && isset($value[0]) ) { |
433 | 433 | $value = $value[0]; |
434 | 434 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | * @param bool $taxonomy |
483 | 483 | * @return TimberPost|boolean |
484 | 484 | */ |
485 | - function get_next( $taxonomy = false ) { |
|
485 | + function get_next($taxonomy = false) { |
|
486 | 486 | if ( !isset($this->_next) || !isset($this->_next[$taxonomy]) ) { |
487 | 487 | global $post; |
488 | 488 | $this->_next = array(); |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | $post = $this; |
514 | 514 | $ret = array(); |
515 | 515 | if ( $multipage ) { |
516 | - for ( $i = 1; $i <= $numpages; $i++ ) { |
|
516 | + for ($i = 1; $i <= $numpages; $i++) { |
|
517 | 517 | $link = self::get_wp_link_page($i); |
518 | 518 | $data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link); |
519 | 519 | if ( $i == $page ) { |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | * @param bool $taxonomy |
566 | 566 | * @return TimberPost|boolean |
567 | 567 | */ |
568 | - function get_prev( $taxonomy = false ) { |
|
568 | + function get_prev($taxonomy = false) { |
|
569 | 569 | if ( isset($this->_prev) && isset($this->_prev[$taxonomy]) ) { |
570 | 570 | return $this->_prev[$taxonomy]; |
571 | 571 | } |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | $post->slug = $post->post_name; |
633 | 633 | $customs = $this->get_post_custom($post->ID); |
634 | 634 | $post->custom = $customs; |
635 | - $post = (object) array_merge((array)$customs, (array)$post); |
|
635 | + $post = (object) array_merge((array) $customs, (array) $post); |
|
636 | 636 | return $post; |
637 | 637 | } |
638 | 638 | |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | * @param string $use |
644 | 644 | * @return string |
645 | 645 | */ |
646 | - function get_display_date( $use = 'post_date' ) { |
|
646 | + function get_display_date($use = 'post_date') { |
|
647 | 647 | return date(get_option('date_format'), strtotime($this->$use)); |
648 | 648 | } |
649 | 649 | |
@@ -653,9 +653,9 @@ discard block |
||
653 | 653 | * @param string $date_format |
654 | 654 | * @return string |
655 | 655 | */ |
656 | - function get_date( $date_format = '' ) { |
|
656 | + function get_date($date_format = '') { |
|
657 | 657 | $df = $date_format ? $date_format : get_option('date_format'); |
658 | - $the_date = (string)mysql2date($df, $this->post_date); |
|
658 | + $the_date = (string) mysql2date($df, $this->post_date); |
|
659 | 659 | return apply_filters('get_the_date', $the_date, $df); |
660 | 660 | } |
661 | 661 | |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * @param string $date_format |
665 | 665 | * @return string |
666 | 666 | */ |
667 | - function get_modified_date( $date_format = '' ) { |
|
667 | + function get_modified_date($date_format = '') { |
|
668 | 668 | $df = $date_format ? $date_format : get_option('date_format'); |
669 | 669 | $the_time = $this->get_modified_time($df); |
670 | 670 | return apply_filters('get_the_modified_date', $the_time, $date_format); |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | * @param string $time_format |
676 | 676 | * @return string |
677 | 677 | */ |
678 | - function get_modified_time( $time_format = '' ) { |
|
678 | + function get_modified_time($time_format = '') { |
|
679 | 679 | $tf = $time_format ? $time_format : get_option('time_format'); |
680 | 680 | $the_time = get_post_modified_time($tf, false, $this->ID, true); |
681 | 681 | return apply_filters('get_the_modified_time', $the_time, $time_format); |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | * @param bool|string $childPostClass |
689 | 689 | * @return array |
690 | 690 | */ |
691 | - function get_children( $post_type = 'any', $childPostClass = false ) { |
|
691 | + function get_children($post_type = 'any', $childPostClass = false) { |
|
692 | 692 | if ( $childPostClass === false ) { |
693 | 693 | $childPostClass = $this->PostClass; |
694 | 694 | } |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | $post_type = $this->post_type; |
697 | 697 | } |
698 | 698 | $children = get_children('post_parent=' . $this->ID . '&post_type=' . $post_type . '&numberposts=-1&orderby=menu_order title&order=ASC'); |
699 | - foreach ( $children as &$child ) { |
|
699 | + foreach ($children as &$child) { |
|
700 | 700 | $child = new $childPostClass($child->ID); |
701 | 701 | } |
702 | 702 | $children = array_values($children); |
@@ -732,20 +732,20 @@ discard block |
||
732 | 732 | } |
733 | 733 | |
734 | 734 | if ( $user_ID ) { |
735 | - $args['include_unapproved'] = array( $user_ID ); |
|
736 | - } elseif ( ! empty( $comment_author_email ) ) { |
|
737 | - $args['include_unapproved'] = array( $comment_author_email ); |
|
735 | + $args['include_unapproved'] = array($user_ID); |
|
736 | + } elseif ( !empty($comment_author_email) ) { |
|
737 | + $args['include_unapproved'] = array($comment_author_email); |
|
738 | 738 | } |
739 | 739 | |
740 | 740 | $comments = get_comments($args); |
741 | 741 | $timber_comments = array(); |
742 | 742 | |
743 | 743 | if ( '' == get_query_var('cpage') && get_option('page_comments') ) { |
744 | - set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 ); |
|
744 | + set_query_var('cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1); |
|
745 | 745 | $overridden_cpage = true; |
746 | 746 | } |
747 | 747 | |
748 | - foreach($comments as $key => &$comment) { |
|
748 | + foreach ($comments as $key => &$comment) { |
|
749 | 749 | $timber_comment = new $CommentClass($comment); |
750 | 750 | $timber_comment->reply_link = $this->TimberComment_reply_link($comment->comment_ID, $this->ID); |
751 | 751 | $timber_comments[$timber_comment->id] = $timber_comment; |
@@ -753,21 +753,21 @@ discard block |
||
753 | 753 | |
754 | 754 | // Build a flattened (depth=1) comment tree |
755 | 755 | $comments_tree = array(); |
756 | - foreach( $timber_comments as $key => $comment ) { |
|
757 | - if ( ! $comment->is_child() ) { |
|
756 | + foreach ($timber_comments as $key => $comment) { |
|
757 | + if ( !$comment->is_child() ) { |
|
758 | 758 | continue; |
759 | 759 | } |
760 | 760 | |
761 | 761 | $tree_element = $comment; |
762 | 762 | do { |
763 | 763 | $tree_element = $timber_comments[$tree_element->comment_parent]; |
764 | - } while($tree_element->is_child()); |
|
764 | + } while ($tree_element->is_child()); |
|
765 | 765 | $comments_tree[$tree_element->id][] = $comment->id; |
766 | 766 | } |
767 | 767 | |
768 | 768 | // Add child comments to the relative "super parents" |
769 | - foreach($comments_tree as $comment_parent => $comment_children) { |
|
770 | - foreach($comment_children as $comment_child) { |
|
769 | + foreach ($comments_tree as $comment_parent => $comment_children) { |
|
770 | + foreach ($comment_children as $comment_child) { |
|
771 | 771 | $timber_comments[$comment_parent]->children[] = $timber_comments[$comment_child]; |
772 | 772 | unset($timber_comments[$comment_child]); |
773 | 773 | } |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | * @param string $TermClass |
808 | 808 | * @return array |
809 | 809 | */ |
810 | - function get_terms( $tax = '', $merge = true, $TermClass = '' ) { |
|
810 | + function get_terms($tax = '', $merge = true, $TermClass = '') { |
|
811 | 811 | |
812 | 812 | $TermClass = $TermClass ?: $this->TermClass; |
813 | 813 | |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | $taxonomies = $tax; |
819 | 819 | } |
820 | 820 | if ( is_string($tax) ) { |
821 | - if ( in_array($tax, array('all','any','')) ) { |
|
821 | + if ( in_array($tax, array('all', 'any', '')) ) { |
|
822 | 822 | $taxonomies = get_object_taxonomies($this->post_type); |
823 | 823 | } else { |
824 | 824 | $taxonomies = array($tax); |
@@ -827,8 +827,8 @@ discard block |
||
827 | 827 | |
828 | 828 | $term_class_objects = array(); |
829 | 829 | |
830 | - foreach ( $taxonomies as $taxonomy ) { |
|
831 | - if ( in_array($taxonomy, array('tag','tags')) ) { |
|
830 | + foreach ($taxonomies as $taxonomy) { |
|
831 | + if ( in_array($taxonomy, array('tag', 'tags')) ) { |
|
832 | 832 | $taxonomy = 'post_tag'; |
833 | 833 | } |
834 | 834 | if ( $taxonomy == 'categories' ) { |
@@ -865,11 +865,11 @@ discard block |
||
865 | 865 | * @param string $taxonomy |
866 | 866 | * @return bool |
867 | 867 | */ |
868 | - function has_term( $term_name_or_id, $taxonomy = 'all' ) { |
|
868 | + function has_term($term_name_or_id, $taxonomy = 'all') { |
|
869 | 869 | if ( $taxonomy == 'all' || $taxonomy == 'any' ) { |
870 | 870 | $taxes = get_object_taxonomies($this->post_type, 'names'); |
871 | 871 | $ret = false; |
872 | - foreach ( $taxes as $tax ) { |
|
872 | + foreach ($taxes as $tax) { |
|
873 | 873 | if ( has_term($term_name_or_id, $tax, $this->ID) ) { |
874 | 874 | $ret = true; |
875 | 875 | break; |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | * @param string $field |
885 | 885 | * @return TimberImage |
886 | 886 | */ |
887 | - function get_image( $field ) { |
|
887 | + function get_image($field) { |
|
888 | 888 | return new $this->ImageClass($this->$field); |
889 | 889 | } |
890 | 890 | |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | * @param int $page |
935 | 935 | * @return string |
936 | 936 | */ |
937 | - function get_content( $len = 0, $page = 0 ) { |
|
937 | + function get_content($len = 0, $page = 0) { |
|
938 | 938 | if ( $len == 0 && $page == 0 && $this->_content ) { |
939 | 939 | return $this->_content; |
940 | 940 | } |
@@ -994,7 +994,7 @@ discard block |
||
994 | 994 | * @param string $field_name |
995 | 995 | * @return mixed |
996 | 996 | */ |
997 | - public function get_field( $field_name ) { |
|
997 | + public function get_field($field_name) { |
|
998 | 998 | $value = apply_filters('timber_post_get_meta_field_pre', null, $this->ID, $field_name, $this); |
999 | 999 | if ( $value === null ) { |
1000 | 1000 | $value = get_post_meta($this->ID, $field_name); |
@@ -1012,7 +1012,7 @@ discard block |
||
1012 | 1012 | /** |
1013 | 1013 | * @param string $field_name |
1014 | 1014 | */ |
1015 | - function import_field( $field_name ) { |
|
1015 | + function import_field($field_name) { |
|
1016 | 1016 | $this->$field_name = $this->get_field($field_name); |
1017 | 1017 | } |
1018 | 1018 | |
@@ -1043,13 +1043,13 @@ discard block |
||
1043 | 1043 | * ``` |
1044 | 1044 | * @return string a space-seperated list of classes |
1045 | 1045 | */ |
1046 | - public function post_class( $class='' ) { |
|
1046 | + public function post_class($class = '') { |
|
1047 | 1047 | global $post; |
1048 | 1048 | $old_global_post = $post; |
1049 | 1049 | $post = $this; |
1050 | 1050 | $class_array = get_post_class($class, $this->ID); |
1051 | 1051 | $post = $old_global_post; |
1052 | - if ( is_array($class_array) ){ |
|
1052 | + if ( is_array($class_array) ) { |
|
1053 | 1053 | return implode(' ', $class_array); |
1054 | 1054 | } |
1055 | 1055 | return $class_array; |
@@ -1151,8 +1151,8 @@ discard block |
||
1151 | 1151 | * @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. |
1152 | 1152 | * @return array |
1153 | 1153 | */ |
1154 | - public function children( $post_type = 'any', $childPostClass = false ) { |
|
1155 | - return $this->get_children( $post_type, $childPostClass ); |
|
1154 | + public function children($post_type = 'any', $childPostClass = false) { |
|
1155 | + return $this->get_children($post_type, $childPostClass); |
|
1156 | 1156 | } |
1157 | 1157 | |
1158 | 1158 | /** |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | * ``` |
1177 | 1177 | * @return bool|array |
1178 | 1178 | */ |
1179 | - public function comments( $count = 0, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'TimberComment' ) { |
|
1179 | + public function comments($count = 0, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'TimberComment') { |
|
1180 | 1180 | return $this->get_comments($count, $order, $type, $status, $CommentClass); |
1181 | 1181 | } |
1182 | 1182 | |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | * @param int $page |
1194 | 1194 | * @return string |
1195 | 1195 | */ |
1196 | - public function content( $page = 0 ) { |
|
1196 | + public function content($page = 0) { |
|
1197 | 1197 | return $this->get_content(0, $page); |
1198 | 1198 | } |
1199 | 1199 | |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | * @param string $date_format |
1223 | 1223 | * @return string |
1224 | 1224 | */ |
1225 | - public function date( $date_format = '' ) { |
|
1225 | + public function date($date_format = '') { |
|
1226 | 1226 | return $this->get_date($date_format); |
1227 | 1227 | } |
1228 | 1228 | |
@@ -1244,9 +1244,9 @@ discard block |
||
1244 | 1244 | * @param string $time_format |
1245 | 1245 | * @return string |
1246 | 1246 | */ |
1247 | - public function time( $time_format = '' ) { |
|
1247 | + public function time($time_format = '') { |
|
1248 | 1248 | $tf = $time_format ? $time_format : get_option('time_format'); |
1249 | - $the_time = (string)mysql2date($tf, $this->post_date); |
|
1249 | + $the_time = (string) mysql2date($tf, $this->post_date); |
|
1250 | 1250 | return apply_filters('get_the_time', $the_time, $tf); |
1251 | 1251 | } |
1252 | 1252 | |
@@ -1282,7 +1282,7 @@ discard block |
||
1282 | 1282 | * @param string $field_name |
1283 | 1283 | * @return mixed |
1284 | 1284 | */ |
1285 | - public function meta( $field_name = null ) { |
|
1285 | + public function meta($field_name = null) { |
|
1286 | 1286 | if ( $field_name === null ) { |
1287 | 1287 | //on the off-chance the field is actually named meta |
1288 | 1288 | $field_name = 'meta'; |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | /** |
1294 | 1294 | * @return string |
1295 | 1295 | */ |
1296 | - public function name(){ |
|
1296 | + public function name() { |
|
1297 | 1297 | return $this->title(); |
1298 | 1298 | } |
1299 | 1299 | |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | * @param string $date_format |
1302 | 1302 | * @return string |
1303 | 1303 | */ |
1304 | - public function modified_date( $date_format = '' ) { |
|
1304 | + public function modified_date($date_format = '') { |
|
1305 | 1305 | return $this->get_modified_date($date_format); |
1306 | 1306 | } |
1307 | 1307 | |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | * @param string $time_format |
1310 | 1310 | * @return string |
1311 | 1311 | */ |
1312 | - public function modified_time( $time_format = '' ) { |
|
1312 | + public function modified_time($time_format = '') { |
|
1313 | 1313 | return $this->get_modified_time($time_format); |
1314 | 1314 | } |
1315 | 1315 | |
@@ -1318,7 +1318,7 @@ discard block |
||
1318 | 1318 | * @param bool $in_same_cat |
1319 | 1319 | * @return mixed |
1320 | 1320 | */ |
1321 | - public function next( $in_same_cat = false ) { |
|
1321 | + public function next($in_same_cat = false) { |
|
1322 | 1322 | return $this->get_next($in_same_cat); |
1323 | 1323 | } |
1324 | 1324 | |
@@ -1376,7 +1376,7 @@ discard block |
||
1376 | 1376 | * @param bool $in_same_cat |
1377 | 1377 | * @return mixed |
1378 | 1378 | */ |
1379 | - public function prev( $in_same_cat = false ) { |
|
1379 | + public function prev($in_same_cat = false) { |
|
1380 | 1380 | return $this->get_prev($in_same_cat); |
1381 | 1381 | } |
1382 | 1382 | |
@@ -1388,7 +1388,7 @@ discard block |
||
1388 | 1388 | * @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)? |
1389 | 1389 | * @return array |
1390 | 1390 | */ |
1391 | - public function terms( $tax = '', $merge = true ) { |
|
1391 | + public function terms($tax = '', $merge = true) { |
|
1392 | 1392 | return $this->get_terms($tax, $merge); |
1393 | 1393 | } |
1394 | 1394 |