• Resolved jfernandezp

    (@jfernandezp)


    Hi!

    I,ve installed your plugin, and all functions works ok (Visibility etc) except the user data parsing in menu name. The menu displays the original (literally) name without parsing the variables:

    Hello, {first_name} -> Displays Hello {first_name}.

    Tried with all other supported variables (From the label picklist at menu editor ) and none works. Tried with different menu types and deactivating other plugins.

    I’m using Spanish version of WP 4.8.1.

    Can you help me?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @jfernandezp – Hmm, strange. This indicates that filter on that text never runs. Its possible and most likely that your theme uses their own custom menu rendering functions. If that is the case they essentially are bypassing the functions that need to be called for our changes to be applied.

    Can you tell me what theme you are using.

    Thread Starter jfernandezp

    (@jfernandezp)

    Hi @danieliser,

    Thank you for your response. I,m using University Theme:

    https://themeforest.net/item/university-education-event-and-course-theme/8412116

    You could be right, i,ve tested your plugin using other template and it works ok.

    Is there something i can do (hooks?) to make it work?

    Best regards!

    Plugin Author Daniel Iser

    (@danieliser)

    @jfernandezp – This is the filter that isn’t being called:

    https://github.com/JunglePlugins/User-Menus/blob/master/includes/classes/menu/items.php#L22.

    That should be applied to each menu item (assuming they don’t convert the $item (object) into an array or change it drastically.

    $item = apply_filters( 'wp_setup_nav_menu_item', $item );

    Alternatively you can pass the $item->title through our replacement function directly: https://github.com/JunglePlugins/User-Menus/blob/master/includes/classes/menu/items.php#L69

    $item->title = \JP\UM\Menu\Items::user_titles( $item->title );

    There are a few other filters as well if you are using the show/hide if user is conditions.

    Hope that helps. May be worth putting in a ticket with them for a fix. Do their admin menu editor fields show as well as ours? If so they have taken some measure to ensure compatibility as that requires using the same hack method we and many others use to add fields there in a compatible way.

    Thread Starter jfernandezp

    (@jfernandezp)

    Big thanks @danieliser ,

    Core admin menús included with the theme works ok (as buddypress login/logout menus etc). For testing purposes i,ve installed other plugins that apply filters to menus and some works ok but other fails.

    Ill talk to theme dev support about it. Much thanks for the detailed info, ill pass it to the dev team to check why some plugins can apply filters and others don,t.

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘User info not parsed’ is closed to new replies.