Support » Plugin: Events Manager » [CODE FIX] Buddypress Tab Title: invalid string

  • Hi @netweblogic,
    I’ll report a bug in the following file:

    events-manager/buddypress/bp-em-core.php#L82

    Bug Description:
    Currently the presence of span tags prevents the string “Events” from being translated (ie. “Event” instead of “Events (0)”).

    How to fix it:

    $event_count = EM_Events::count( array( 'scope'=>'future',  'owner'=> bp_displayed_user_id() ));
    if( empty($event_count) ) $event_count = 0;
    $main_nav = array(
      // 'name' => __( 'Events', 'events-manager'). '<span>' . esc_html($event_count) . '</span>',
      'name' => __( 'Events', 'events-manager'). ' (' . esc_html($event_count) . ')', 
      'slug' => em_bp_get_slug(),
      'position' => 80,
      'screen_function' => 'bp_em_events',
      'default_subnav_slug' => 'profile'
    );
    

    Greetings,
    Raruto

    • This topic was modified 1 month, 1 week ago by Raruto.
    • This topic was modified 1 month, 1 week ago by Raruto.
    • This topic was modified 1 month, 1 week ago by Raruto.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.