• 이 주제에는 0개 답변, 1명 참여가 있으며 mimoon4 년, 5 월 전에 전에 마지막으로 업데이트했습니다.
1 글 보임 - 1 에서 1 까지 (총 1 중에서)
  • 글쓴이
  • #8624
    mimoon
    키 마스터

      //Add in our action hook to run after the trail has been filled
      add_action(‘bcn_after_fill’, ‘bcnext_remove_current_item’);
      /**
      * We’re going to pop off the paged breadcrumb and add in our own thing
      *
      * @param bcn_breadcrumb_trail $trail the breadcrumb_trail object after it has been filled
      */
      function bcnext_remove_current_item($trail)
      {
      //Check to ensure the breadcrumb we’re going to play with exists in the trail
      if(isset($trail->breadcrumbs[0]) && $trail->breadcrumbs[0] instanceof bcn_breadcrumb)
      {
      $types = $trail->breadcrumbs[0]->get_types();
      //Make sure we have a type and it is a current-item
      if(is_array($types) && in_array(‘current-item’, $types))
      {
      //Shift the current item off the front
      array_shift($trail->breadcrumbs);
      }
      }
      }

      *https://github.com/mtekk/Breadcrumb-NavXT-Extensions/blob/master/breadcrumb_navxt_remove_curitm.php

    1 글 보임 - 1 에서 1 까지 (총 1 중에서)
    • 답변은 로그인 후 가능합니다.