• Resolved nuonis

    (@nuonis)


    Hi there! I noticed that subtitles now has some HTML capabilities, but I was wondering if you would consider adding a few more for the next update?

    Here are the other others I’m manually adding:

    ‘a’ => array(), // Link
    ‘href’ => array(),// Link URL
    ‘title’ => array(), // Link Title
    ‘br’ => array(), // Line break
    ‘target’ => array() //Link target

    Thanks for the consideration! And again, thanks for the awesome plugin. 🙂

    Sinoun

    https://wordpress.org/plugins/subtitles/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Hi Sinoun,

    You should be able to do this already. Have you seen this updated part of the FAQ?

    Cheers,
    Philip

    Thread Starter nuonis

    (@nuonis)

    Hi Philip,

    Thanks for the response. I do see that I am able to add a link. I guess the only thing I couldn’t do was the line break
    .

    Sinoun

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Hi Sinoun,

    You just need to add in 'br' into that list and you should be able to use those tags.

    Cheers,
    Philip

    Thread Starter nuonis

    (@nuonis)

    Maybe I’m missing something, but that’s what I did. I manually added ‘br’, but every time there’s a plugin update, I have to add it back, correct?

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    No, you can do this directly within your theme now. Please see this. In your case it’ll look something like this:

    function subtitles_mod_allowed_tags( $args ) {
        $args = array(
            'br' => array(), // line breaks
            'i' => array(), // italicized text
            'em' => array(), // emphasized text
            'strong' => array(), // strong text
            'a' => array(
                'href' => true, // links
            ),
        );
    
        return $args;
    } // end function subtitles_mod_allowed_tags
    add_filter( 'subtitles_allowed_tags', 'subtitles_mod_allowed_tags' );

    Cheers,
    Philip

    Thread Starter nuonis

    (@nuonis)

    Sorry for my ignorance, but how do I directly do this in my theme? Where do I insert the code in WP admin?

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    Hi there. You would put this directly into your theme’s functions.php file. Hope that helps!

    Thread Starter nuonis

    (@nuonis)

    Thanks for the clarification!

    Plugin Author Philip Arthur Moore

    (@philiparthurmoore)

    No worries! I’ll resolve this and close it out but please feel free to open another thread if you run into any other issues. Happy to help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘HTML update’ is closed to new replies.