ableplayer / ableplayer-wordpress

Able Player plugin for WordPress
Other
5 stars 4 forks source link

Allow data-transcript-div to work in WP shortcode #3

Open CarlyGerard opened 4 years ago

CarlyGerard commented 4 years ago

Hey Terrill, I'm playing with the WP AblePlayer shortcode--so far so good! It would be great if the shortcode had a way to include the data-transcript-div feature in shortcode format. With our current WP theme, because there's not much room in the main container, the overflow from enabling the transcript is not ideal: https://wptest.wwu.edu/ableplayer-test/ (if you can't access this site, I'm happy to show you). It looks like data-transcript-div would work if we did static HTML, but it would be more efficient to have that attribute available in the shortcode.

It looks like height and width are available attrs, but not really keen on shrinking down the player if it's possible to just drop the transcript below the player.

Overall, love the new WP plugin! đź‘Ť

terrill commented 4 years ago

Hi @CarlyGerard ! Your use case is legit, but there are legit use cases for every Able Player attribute. If we add shortcode support for all of them, then the code is no longer short (seems to defeat the purpose - might as well as just type in HTML).

My current thinking is to add an options page that would allow all settings to be configured via the WordPress dashboard. Would that work for you?

CarlyGerard commented 4 years ago

@terrill A dashboard would work, and your reasoning totally makes sense. You're right that the real answer is to have some friendly UI that allows someone to access all available attributes while still using the shortcode functionality.

davidengebretson commented 4 years ago

I’m not sure I would consider a dashboard a “friendly UI” smile

A nice modal dialog feels more “friendly” to me, as a screen reader user, but probably too old school for a fancy dancy CMS like WP?

CarlyGerard commented 4 years ago

The Accordion Shortcodes plugin we use has a toggle button in the rich text editor that pops a dialog open with different options it can inject.

dialog of options for accordion shortcode in WordPress, content in background has gray overlay It does insert them as attributes in the shortcode itself, but maybe there's a way in AblePlayer to apply these attributes without adding them to the shortcode?