Viewing 1 replies (of 1 total)
  • Thread Starter johanronstrom

    (@johanronstrom)

    I solved it by editing the plugin like so:

    stream-status-widget.php from line 120

    $var_status_class = $is_on ? 'lsb-on' : 'lsb-off';
    $var_url = $menu_item->url;
    $var_title = apply_filters( 'lsb_stream_status_widget_text', $menu_item->title );
    $var_status_indicator = $is_on ? $stream->watching_now : 'Offline';
    $var_item_classes = implode(" ",$menu_item->classes);  // added
    
    $item = '';
    if ($show_image == true) {
    	$item = $templates->printt( $lsb_status_widget_item_with_image_format,
    		array(
    			'%%status_class%%'     => $var_status_class,
    			'%%url%%'              => $var_url,
    			'%%title%%'            => $var_title,
    			'%%status_indicator%%' => $var_status_indicator,
    			'%%image_src%%'        => $var_image_src,
    			'%%item_classes%%'	   => $var_item_classes  // added
    		)
    	);
    } else {
    	$item = $templates->printt( $lsb_status_widget_item_format,
    		array(
    			'%%status_class%%'     => $var_status_class,
    			'%%url%%'              => $var_url,
    			'%%title%%'            => $var_title,
    			'%%status_indicator%%' => $var_status_indicator,
    			'%%item_classes%%'	   => $var_item_classes  // added
    		)
    	);
    }

    and class-templates.php lines 18 and 29

    <li class="lsb-status-widget-list-item %%status_class%% %%item_classes%%">

Viewing 1 replies (of 1 total)
  • The topic ‘Menu Item Class’ is closed to new replies.