WordPress.org

Ready to get started?Download WordPress

Forums

Live Stream Badger
[Suggestion] Add menu attribute to template (7 posts)

  1. Drake
    Member
    Posted 6 months ago #

    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/

  2. Tadas Krivickas
    Member
    Plugin Author

    Posted 6 months ago #

    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?

  3. Drake
    Member
    Posted 6 months ago #

    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

  4. Tadas Krivickas
    Member
    Plugin Author

    Posted 6 months ago #

    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 );
  5. Drake
    Member
    Posted 6 months ago #

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

  6. Tadas Krivickas
    Member
    Plugin Author

    Posted 6 months ago #

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

  7. Drake
    Member
    Posted 6 months ago #

    Thank you

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.