�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 547

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 548

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 549

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 550

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 551
', '' ); } elseif ( function_exists( 'bcn_display' ) ) { ?> trail(); } } } class Movedo_GRVE_Breadcrumb { public $items = array(); public $args = array(); public $post_taxonomy = array(); public function __toString() { return $this->trail(); } public function __construct( $args = array() ) { $defaults = array( 'container' => 'nav', 'before' => '', 'after' => '', 'show_on_front' => true, 'home_label' => esc_html__( 'Home', 'movedo' ), 'show_title' => true, 'post_taxonomy' => array( 'post' => 'category', ), ); // Filter hook for breadcrumb args $args = apply_filters( 'movedo_grve_breadcrumb_args', $args ); $this->args = wp_parse_args( $args, $defaults ); //Assign Available Taxonomies $this->post_taxonomy = $this->args['post_taxonomy']; //Add Items $this->add_items(); } public function trail() { $breadcrumb = ''; $item_count = count( $this->items ); $item_position = 0; if ( 0 < $item_count ) { if ( 1 == $item_count ) { $breadcrumb .= '
    '; } else { $breadcrumb .= '
      '; } foreach ( $this->items as $item ) { ++$item_position; // Check if the item is linked. preg_match( '/()(.*?)(<\/a>)/i', $item, $matches ); $item = !empty( $matches ) ? sprintf( '%s%s%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '%s', $item ); $item_class = 'grve-breadcrumb-item grve-small-text'; if ( 1 === $item_position && 1 < $item_count ) { $item_class .= ' grve-breadcrumb-first'; } elseif ( $item_count === $item_position ) { $item_class .= ' grve-breadcrumb-last'; } if ( !empty( $matches ) ) { $attributes = 'itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="' . $item_class . '"'; $meta = sprintf( '', absint( $item_position ) ); } else { $attributes = 'class="' . $item_class . '"'; $meta = ''; } $breadcrumb .= sprintf( '
    • %s%s
    • ', $attributes, $item, $meta ); } $breadcrumb .= '
    '; echo sprintf( '<%1$s id="grve-breadcrumbs" class="grve-list-divider">%2$s%3$s%4$s', tag_escape( $this->args['container'] ), $this->args['before'], $breadcrumb, $this->args['after'] ); } } protected function add_items() { global $wp_rewrite; //Home Label $home_label = $this->args['home_label']; if ( is_front_page() ) { //Front Page if ( true === $this->args['show_on_front'] && $home_label ) { $this->items[] = $home_label; } } else { if ( $home_label ) { $this->items[] = sprintf( '%s', esc_url( home_url( '/' ) ), ' rel="home"', $home_label ); } if ( is_home() ) { //Home Page $post_id = get_queried_object_id(); $post = get_post( $post_id ); if ( $post && 0 < $post->post_parent ) { $this->add_post_parents( $post->post_parent ); } $title = get_the_title( $post_id ); // Add the posts page item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $title ); } elseif ( $title && true === $this->args['show_title'] ) { $this->items[] = $title; } } elseif ( is_singular() ) { //Single Post $post = get_queried_object(); $post_id = get_queried_object_id(); if ( 0 < $post->post_parent ) { $this->add_post_parents( $post->post_parent ); } else { $this->add_post_hierarchy( $post_id ); } if ( !empty( $this->post_taxonomy[ $post->post_type ] ) ) { $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); } if ( $post_title = single_post_title( '', false ) ) { if ( 1 < get_query_var( 'page' ) || is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $post_title ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $post_title; } } } elseif ( is_archive() ) { // Archive Page if ( is_post_type_archive() ) { $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); if ( false !== $post_type_object->rewrite ) { if ( $post_type_object->rewrite['with_front'] ) { $this->add_rewrite_front_items(); } if ( !empty( $post_type_object->rewrite['slug'] ) ) { $this->add_path_parents( $post_type_object->rewrite['slug'] ); } } if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), post_type_archive_title( '', false ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = post_type_archive_title( '', false ); } } elseif ( is_category() || is_tag() || is_tax() ) { $this->add_term_archive_items(); } elseif ( is_author() ) { $this->add_rewrite_front_items(); $user_id = get_query_var( 'author' ); if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_author_posts_url( $user_id ) ), get_the_author_meta( 'display_name', $user_id ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = get_the_author_meta( 'display_name', $user_id ); } } elseif ( is_day() ) { $this->add_rewrite_front_items(); $year = sprintf( '%s', get_the_time( esc_html__( 'Y', 'movedo' ) ) ); $month = sprintf( '%s', get_the_time( esc_html__( 'F', 'movedo' ) ) ); $day = sprintf( '%s', get_the_time( esc_html__( 'j', 'movedo' ) ) ); // Add the year and month items. $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); // Add the day item. if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_day_link( get_the_time( 'Y' ) ), get_the_time( 'm' ), get_the_time( 'd' ) ), $day ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $day; } } elseif ( is_month() ) { $this->add_rewrite_front_items(); $year = sprintf( '%s', get_the_time( esc_html__( 'Y', 'movedo' ) ) ); $month = sprintf( '%s', get_the_time( esc_html__( 'F', 'movedo' ) ) ); $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $month; } } elseif ( is_year() ) { $this->add_rewrite_front_items(); $year = sprintf( '%s', get_the_time( esc_html__( 'Y', 'movedo' ) ) ); if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = $year; } } else { //Default Archives if ( is_date() || is_time() ) { $this->add_rewrite_front_items(); } if ( true === $this->args['show_title'] ) { $this->items[] = esc_html__( 'Archives', 'movedo' ); } } } elseif ( is_search() ) { //Search Page if ( is_paged() ) { $this->items[] = sprintf( '%s', esc_url( get_search_link() ), sprintf( esc_html__( 'Search Results for : %s', 'movedo' ), get_search_query() ) ); } elseif ( true === $this->args['show_title'] ) { $this->items[] = sprintf( esc_html__( 'Search Results for : %s', 'movedo' ), get_search_query() ); } } elseif ( is_404() ) { //404 Page if ( true === $this->args['show_title'] ) { $this->items[] = esc_html__( '404 Not Found', 'movedo' ); } } } // Add paged items. if ( is_singular() && 1 < get_query_var( 'page' ) && true === $this->args['show_title'] ) { $this->items[] = sprintf( esc_html__( 'Page %s', 'movedo' ), number_format_i18n( absint( get_query_var( 'page' ) ) ) ); } elseif ( is_paged() && true === $this->args['show_title'] ) { $this->items[] = sprintf( esc_html__( 'Page %s', 'movedo' ), number_format_i18n( absint( get_query_var( 'paged' ) ) ) ); } //Filter hook for items $this->items = array_unique( apply_filters( 'movedo_grve_breadcrumb_items', $this->items, $this->args ) ); } protected function add_rewrite_front_items() { global $wp_rewrite; if ( $wp_rewrite->front ) $this->add_path_parents( $wp_rewrite->front ); } protected function add_term_archive_items() { global $wp_rewrite; // Get some taxonomy and term variables. $term = get_queried_object(); $taxonomy = get_taxonomy( $term->taxonomy ); $done_post_type = false; // If there are rewrite rules for the taxonomy. if ( false !== $taxonomy->rewrite ) { // If 'with_front' is true, dd $wp_rewrite->front to the trail. if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front ) $this->add_rewrite_front_items(); // Get parent pages by path if they exist. $this->add_path_parents( $taxonomy->rewrite['slug'] ); // Add post type archive if its 'has_archive' matches the taxonomy rewrite 'slug'. if ( $taxonomy->rewrite['slug'] ) { $slug = trim( $taxonomy->rewrite['slug'], '/' ); // Deals with the situation if the slug has a '/' between multiple // strings. For example, "movies/genres" where "movies" is the post // type archive. $matches = explode( '/', $slug ); // If matches are found for the path. if ( isset( $matches ) ) { // Reverse the array of matches to search for posts in the proper order. $matches = array_reverse( $matches ); // Loop through each of the path matches. foreach ( $matches as $match ) { // If a match is found. $slug = $match; // Get public post types that match the rewrite slug. $post_types = $this->get_post_types_by_slug( $match ); if ( !empty( $post_types ) ) { $post_type_object = $post_types[0]; // Add support for a non-standard label of 'archive_title' (special use case). $label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); // Add the post type archive link to the trail. $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); $done_post_type = true; // Break out of the loop. break; } } } } } // If there's a single post type for the taxonomy, use it. if ( false === $done_post_type && 1 === count( $taxonomy->object_type ) && post_type_exists( $taxonomy->object_type[0] ) ) { // If the post type is 'post'. if ( 'post' === $taxonomy->object_type[0] ) { $post_id = get_option( 'page_for_posts' ); if ( 'posts' !== get_option( 'show_on_front' ) && 0 < $post_id ) $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); // If the post type is not 'post'. } else { $post_type_object = get_post_type_object( $taxonomy->object_type[0] ); $label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); } } // If the taxonomy is hierarchical, list its parent terms. if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent ) $this->add_term_parents( $term->parent, $term->taxonomy ); // Add the term name to the trail end. if ( is_paged() ) $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $term->taxonomy ) ), single_term_title( '', false ) ); elseif ( true === $this->args['show_title'] ) $this->items[] = single_term_title( '', false ); } protected function add_post_parents( $post_id ) { $parents = array(); while ( $post_id ) { // Get the post by ID. $post = get_post( $post_id ); // If we hit a page that's set as the front page, bail. if ( 'page' == $post->post_type && 'page' == get_option( 'show_on_front' ) && $post_id == get_option( 'page_on_front' ) ) break; // Add the formatted post link to the array of parents. $parents[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); // If there's no longer a post parent, break out of the loop. if ( 0 >= $post->post_parent ) break; // Change the post ID to the parent post to continue looping. $post_id = $post->post_parent; } // Get the post hierarchy based off the final parent post. $this->add_post_hierarchy( $post_id ); // Display terms for specific post type taxonomy if requested. if ( !empty( $this->post_taxonomy[ $post->post_type ] ) ) $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); // Merge the parent items into the items array. $this->items = array_merge( $this->items, array_reverse( $parents ) ); } protected function add_post_hierarchy( $post_id ) { // Get the post type. $post_type = get_post_type( $post_id ); $post_type_object = get_post_type_object( $post_type ); // If this is the 'post' post type, get the rewrite front items. if ( 'post' === $post_type ) { // Add $wp_rewrite->front to the trail. $this->add_rewrite_front_items(); } // If the post type has rewrite rules. elseif ( false !== $post_type_object->rewrite ) { // If 'with_front' is true, add $wp_rewrite->front to the trail. if ( $post_type_object->rewrite['with_front'] ) $this->add_rewrite_front_items(); // If there's a path, check for parents. if ( !empty( $post_type_object->rewrite['slug'] ) ) $this->add_path_parents( $post_type_object->rewrite['slug'] ); } // If there's an archive page, add it to the trail. if ( $post_type_object->has_archive ) { // Add support for a non-standard label of 'archive_title' (special use case). $label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; // Core filter hook. $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type ) ), $label ); } } protected function get_post_types_by_slug( $slug ) { $return = array(); $post_types = get_post_types( array(), 'objects' ); foreach ( $post_types as $type ) { if ( $slug === $type->has_archive || ( true === $type->has_archive && $slug === $type->rewrite['slug'] ) ) $return[] = $type; } return $return; } protected function add_post_terms( $post_id, $taxonomy ) { // Get the post type. $post_type = get_post_type( $post_id ); // Get the post categories. $terms = get_the_terms( $post_id, $taxonomy ); // Check that categories were returned. if ( $terms && ! is_wp_error( $terms ) ) { // Sort the terms by ID and get the first category. if( function_exists( 'wp_list_sort' ) ) { $terms = wp_list_sort( $terms, 'term_id', 'ASC' ); } else { usort( $terms, '_usort_terms_by_ID' ); } $term = get_term( $terms[0], $taxonomy ); // If the category has a parent, add the hierarchy to the trail. if ( 0 < $term->parent ) $this->add_term_parents( $term->parent, $taxonomy ); // Add the category archive link to the trail. $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); } } function add_path_parents( $path ) { // Trim '/' off $path in case we just got a simple '/' instead of a real path. $path = trim( $path, '/' ); // If there's no path, return. if ( empty( $path ) ) return; // Get parent post by the path. $post = get_page_by_path( $path ); if ( !empty( $post ) ) { $this->add_post_parents( $post->ID ); } elseif ( is_null( $post ) ) { // Separate post names into separate paths by '/'. $path = trim( $path, '/' ); preg_match_all( "/\/.*?\z/", $path, $matches ); // If matches are found for the path. if ( isset( $matches ) ) { // Reverse the array of matches to search for posts in the proper order. $matches = array_reverse( $matches ); // Loop through each of the path matches. foreach ( $matches as $match ) { // If a match is found. if ( isset( $match[0] ) ) { // Get the parent post by the given path. $path = str_replace( $match[0], '', $path ); $post = get_page_by_path( trim( $path, '/' ) ); // If a parent post is found, set the $post_id and break out of the loop. if ( !empty( $post ) && 0 < $post->ID ) { $this->add_post_parents( $post->ID ); break; } } } } } } function add_term_parents( $term_id, $taxonomy ) { // Set up some default arrays. $parents = array(); // While there is a parent ID, add the parent term link to the $parents array. while ( $term_id ) { // Get the parent term. $term = get_term( $term_id, $taxonomy ); // Add the formatted term link to the array of parent terms. $parents[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); // Set the parent term's parent as the parent ID. $term_id = $term->parent; } // If we have parent terms, reverse the array to put them in the proper order for the trail. if ( !empty( $parents ) ) $this->items = array_merge( $this->items, $parents ); } } //Omit closing PHP tag to avoid accidental whitespace output errors.