• Krielkip

    (@krielkip)


    Hello,

    This is a great plugin, using it for a while now. Only one question.

    With the new update my current function does not work::

    function breadcrumbs ( ) {
    	global $bcn_admin;
    	if($bcn_admin !== null)
    	{
    		//Grab the current settings from the db
    		$bcn_admin->breadcrumb_trail->opt = wp_parse_args(get_option('bcn_options'));
    		$bcn_admin->breadcrumb_trail->opt['hseparator'] = '<div class="sep"></div>';
    		//Generate the breadcrumb trail
    		$bcn_admin->breadcrumb_trail->fill();
    		return $bcn_admin->breadcrumb_trail->display(false, true, false);
    	}
    }

    In this function i used to edit the hseparator to change it to a div (for a image).
    Works great in the previous version. Only in 5.0 the code has changed. After a quick look i found out that this would work.

    function breadcrumbs ( ) {
    	global $breadcrumb_navxt;
    	if($breadcrumb_navxt !== null)
    	{
    		//Grab the current settings from the db
    		$breadcrumb_navxt->breadcrumb_trail->opt = wp_parse_args(get_option('bcn_options'));
    		$breadcrumb_navxt->breadcrumb_trail->opt['hseparator'] = '<div class="sep"></div>';
    		//Generate the breadcrumb trail
    		$breadcrumb_navxt->breadcrumb_trail->fill();
    		return $breadcrumb_navxt->breadcrumb_trail->display(false, true, false);
    	}
    }

    Ony breadcrumb_trail is a protected class. Solved the problem Dirty by editing the protected to public. Only that is not the good solution.

    On the page https://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/2/ it says things about bcn_breadcrumb_trail_object && bcn_settings_init. Is it possible to create the same output like above with the new filter code?
    I am still trying to fund the right solution, but help is welcome.

    https://www.ads-software.com/plugins/breadcrumb-navxt/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom breadcrumb seperator 5.0 problem’ is closed to new replies.