Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #841: Native AMP audio and video playlists. #954

Merged
merged 20 commits into from
Feb 18, 2018

Commits on Feb 11, 2018

  1. Issue #841: Native AMP video playlists.

    Create a custom shortcode handler for video playlists.
    Use <amp-video> and <amp-state>, on Weston't suggestion.
    This still doesn't support audio playlists.
    Ryan Kienstra committed Feb 11, 2018
    Configuration menu
    Copy the full SHA
    00a3f08 View commit details
    Browse the repository at this point in the history
  2. Issue #841: Remove dependence on test files.

    Before, test_shortcode() used test files from Core.
    But these did not exist in 4.7, and caused a failure.
    So create new mock files to test.
    Ryan Kienstra committed Feb 11, 2018
    Configuration menu
    Copy the full SHA
    8140a40 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2018

  1. Issue #841: Add audio playlist shortcode support.

    Use an <amp-carousel>,
    As <amp-bind> doesn't work with <amp-audio>.
    Abstract common logic into helper methods.
    This mainly allows using styling from
    wp-mediaelement.css.
    But there are 4 rules needed to correct the styling.
    Ryan Kienstra committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    cddce46 View commit details
    Browse the repository at this point in the history
  2. Issue #841: Align @param descriptions in PHP DocBlock.

    Ryan Kienstra committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    f19c281 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2018

  1. Issue #841: Enqueue Core playlist styling, and custom styling.

    The video and audio playlist need 'wp-mediaelement.'
    And the audio playlist needs a simple custom stylesheet.
    Use the action 'wp_enqueue_scripts,'
    instead of 'wp_playlist_script.'
    That enqueues too late.
    Also, update the tests.
    Ryan Kienstra committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    ca78258 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2018

  1. Issue #841: Use wp_json_encode in 'on' attribute.

    At Weston's suggestion.
    This is easier to understand.
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    78f7368 View commit details
    Browse the repository at this point in the history
  2. Issue #841: Move ternaary conditionals inside escaping functions.

    Before, the output was only escaped
    if the value was set.
    Also, remove the isset() check for $title.
    As Weston mentioned, this is always a string.
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    ccc066d View commit details
    Browse the repository at this point in the history
  3. Issue #841: Empty string return in audio_playlist().

    Inside a conditional, return an empty string.
    As Weston mentioned, the PHP DocBlock
    indicates a string return value.
    Also, add an assertion for this.
    And correct the documentation of 'content_width.'
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    aba8cf1 View commit details
    Browse the repository at this point in the history
  4. Issue #841: Improve the PLAYLIST_REGEX.

    Props @westonruter for the new regex.
    Also, remove periods from '@return void.'
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    f13d2ad View commit details
    Browse the repository at this point in the history
  5. Issue #841: Make remove_embed() add previous shortcode.

    On Weston's suggestion.
    This function should return the shortcode
    to the state before this embed handler changed it.
    So it stores the previous callback in $removed_shortcode.
    And it adds that callback in remove_embed().
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    d3cc386 View commit details
    Browse the repository at this point in the history
  6. Issue #841: Return an array() inside the conditional.

    As Weston mentioned, the DocBlock indicates an array().
    So return an empty array instead of void.
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    1b07e90 View commit details
    Browse the repository at this point in the history
  7. Issue #841: Remove isset() check for $track['src'].

    This should always be present.
    @see wp_playlist_shortcode().
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    168b9ba View commit details
    Browse the repository at this point in the history
  8. Issue #841: Set a default height and width for 'audio.'

    Audio playlists have thumbnail images.
    If the height and width aren't defined in $data,
    Set fallbacks.
    These are based on the fallback heights in:
    wp_playlist_shortcode().
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    7cae35c View commit details
    Browse the repository at this point in the history
  9. Issue #841: Remove the carousel buttons fro 'audio' playlist.

    The playlist is actually a carousel,
    as it's not possible to use <amp-bind>.
    But that doesn't match native WP UI.
    So remove the buttons that go other carousel items.
    One can click the tracks to go to another track.
    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    d01e9ea View commit details
    Browse the repository at this point in the history
  10. Issue #841: Align equals signs to prevent Travis error.

    Ryan Kienstra committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    e08bc8b View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2018

  1. Enqueue playlist styles just-in-time when used

    * Restore wp_print_head_scripts and wp_print_footer_scripts.
    * Return associative array instead of positional array in get_thumb_dimensions.
    * Further clean phpdoc.
    westonruter committed Feb 17, 2018
    Configuration menu
    Copy the full SHA
    b093c85 View commit details
    Browse the repository at this point in the history
  2. Prevent playlist scripts from being enqueued which will be stripped o…

    …ut anyway
    
    * Remove script output by wp_comment_form_unfiltered_html_nonce().
    * Remove wp-embed script enqueued by wp_oembed_add_host_js().
    westonruter committed Feb 17, 2018
    Configuration menu
    Copy the full SHA
    b9d9f09 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    365af92 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2018

  1. Configuration menu
    Copy the full SHA
    d94888d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13370ed View commit details
    Browse the repository at this point in the history