Support » Plugin: Live Stream Badger » [Suggestion] Add menu attribute to template

  • Drake

    (@marcoragogna)


    Hi,
    I am really happy to see you have updated the plugin and restarted the development. I would like to suggest, if possible, to pass also the menu attribute to the template:

    $menu_item->attr_title

    I did a mod on your version 1.2 in the past to be able drawing a little country flag image before the streaming name using this trick.

    Do you think this useful could be helpful also for others? Or it is too customized and it is better if I made my mod private like I did in the past?

    Thank you in advance for the answers

    http://wordpress.org/plugins/live-stream-badger/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tadas Krivickas

    (@tkrivickas)

    Hi Drake,

    It could be.

    On the other hand, you don’t need any customizations to add a flag before name. You can use a plugin WP flags and then add the flag using a shortcode in menu item’s title.

    http://postimg.org/image/3mkat07yv/ (this is what I am using in fact)

    What do you think?

    Thread Starter Drake

    (@marcoragogna)

    Thank you, good idea, I’ll try that plugin for sure.

    Anyway, in the end, attr_title could be useful to store other metadata to be accessible to the template for other customization, think about it.

    Thank you for the support

    Plugin Author Tadas Krivickas

    (@tkrivickas)

    Drake, doesn’t it already exist in the current version?

    Template status_widget_item() from extend/class-templates.php:

    <li class="lsb-status-widget-list-item %%status_class%%">
      <span class="lsb-status-widget-title">
        <a href="%%url%%" target="_blank">%%title%%</a>
      </span>
      <span class="lsb-status-widget-indicator %%status_class%%">%%status_indicator%%</span>
    </li>

    %%title%% gets replaced by:

    $var_title = apply_filters( 'lsb_stream_status_widget_text', $menu_item->title );

    Thread Starter Drake

    (@marcoragogna)

    Yes, title exists, but attr_title is missing. Please, correct me if I am wrong.

    Plugin Author Tadas Krivickas

    (@tkrivickas)

    Oh, now I understand. Sure, I’ll add it.

    Thread Starter Drake

    (@marcoragogna)

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Suggestion] Add menu attribute to template’ is closed to new replies.