diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 948bc20..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,28 +0,0 @@ - - -## Description - - -## How Has This Been Tested? - - - - -## Screenshots (jpeg or gifs if applicable): - -## Types of changes - - - - - -## Checklist: -- [ ] My code is tested. -- [ ] My code is backward-compatible with WordPress 4.9 and PHP 7.0. -- [ ] My code follows the WordPress coding standards. -- [ ] My code has proper inline documentation. diff --git a/.github/hookdoc-tmpl/README.md b/.github/hookdoc-tmpl/README.md deleted file mode 100644 index cd80fe5..0000000 --- a/.github/hookdoc-tmpl/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## My Tickets Plugin Hook Documentation - -This resource is generated documentation on actions and filters found in My Tickets. Use the sidebar to browse and navigate. - -For more information about using My Tickets, please see the [My Tickets user documentation](https://docs.joedolson.com/my-tickets/). - -To report an issue with My Tickets or contribute back to the project, please visit the [GitHub repository](https://github.com/joedolson/my-tickets/). \ No newline at end of file diff --git a/.github/hookdoc-tmpl/layout.tmpl b/.github/hookdoc-tmpl/layout.tmpl deleted file mode 100644 index 244c57e..0000000 --- a/.github/hookdoc-tmpl/layout.tmpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - <?js= title ?> - My Tickets Hook Doumentation - - - - - - - - - class="home"> - -
- -

-
- -
- - - -
- - - -
- - - - - diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index 92532e7..0000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Build Hook Docs - -on: - push: - branches: - - master - -jobs: - hookdocs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Use Node.js 10 - uses: actions/setup-node@v1 - with: - node-version: '10.x' - - name: npm install, and build docs - run: | - npm install - npm run build:docs - - name: Deploy to GH Pages - uses: peaceiris/actions-gh-pages@v3 - with: - publish_dir: './docs' - github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c4758dc..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Code Linting - -on: - push: - paths: - - '.github/workflows/main.yml' - - '**.php' - - 'phpcs.xml.dist' - - 'composer.json' - - 'composer.lock' - pull_request: - branches: - - trunk - # Only run if PHP-related files changed. - paths: - - '.github/workflows/main.yml' - - '**.php' - - 'phpcs.xml.dist' - - 'composer.json' - - 'composer.lock' - types: - - opened - - reopened - - synchronize - -jobs: - php-lint: - name: PHP - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: styfle/cancel-workflow-action@0.8.0 - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - name: Validate Composer configuration - run: composer validate --strict - - name: Composer Install - run: composer install --no-interaction --no-progress - - name: PHP Lint - run: composer lint diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ed3077b..0000000 --- a/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# JetBrains -.idea -src/.idea/workspace.xml -src/todo.txt -src/todo.txt -src/.idea/php.xml -src/.idea/workspace.xml -src/.idea/php.xml -src/.idea/workspace.xml -src/todo.txt -src/.idea/php.xml -src/.idea/workspace.xml diff --git a/docs/index.txt b/.nojekyll similarity index 100% rename from docs/index.txt rename to .nojekyll diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a63e3f6..0000000 --- a/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 University of Washington - -Able Player development is supported in part by The AccessComputing project, -with financial support from the National Science Foundation -(grant #CNS-0540615, CNS-0837508, and CNS-1042260); -and by the Committee on Institutional Cooperation (CIC). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 02dfaa9..0000000 --- a/README.md +++ /dev/null @@ -1,38 +0,0 @@ -## Able Player WordPress Plugin - -*Able Player* is a fully accessible cross-browser HTML5 media player for audio and video. - -This plugin is designed to simplify the process of adding Able Player to WordPress websites. - -See the [Able Player WordPress plug-in](https://wordpress.org/plugins/ableplayer/) site to download the latest stable version, rate the plugin, and report issues via the Support Forum. - -This GitHub repo is for development between stable versions. - -See the main [Able Player](http://ableplayer.github.io/ableplayer) project page for more details about Able Player. - -[![Code Linting](https://github.com/ableplayer/ableplayer-wordpress/actions/workflows/main.yml/badge.svg)](https://github.com/ableplayer/ableplayuer-wordpress/actions/workflows/main.yml) [![License](https://img.shields.io/badge/license-GPL--2.0%2B-green.svg)](https://www.gnu.org/license/gpl-2.0.html) - -## AblePlayer for WordPress Build Environment - -* Tags: html5,media,audio,video,accessibility -* Requires at least: 4.9 -* Tested up to: 6.3 -* Stable tag: `1.1` -* License: MIT -* License URI: https://github.com/ableplayer/ableplayer-wordpress/blob/master/LICENSE - -This is the development environment for Able Player for WordPress - -## Contact - -Bugs or feature development contributions should be made through the [GitHub repository](https://github.com/ableplayer/ableplayer-wordpress/issues) - -## Authors - -* [Terrill Thompson](https://terrillthompson.com) - -## Contributors - -[Github Contributors](https://github.com/ableplayer/ableplayer-wordpress/graphs/contributors) - -* [Joe Dolson](https://www.joedolson.com) \ No newline at end of file diff --git a/able_player_css.html b/able_player_css.html new file mode 100644 index 0000000..9d06b32 --- /dev/null +++ b/able_player_css.html @@ -0,0 +1,232 @@ + + + + + Filter: able_player_css - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Filter: able_player_css

+
+ + + + + +
+ +
+

+ +
+ +
+
+ + + + + +

apply_filters( 'able_player_css', $url, $debug ) → {string}

+ + + + + +
+

Filter the Able Player CSS URL.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
$url + + +string + + + +

URL to Able Player root directory.

$debug + + +bool + + + +

True if environment is debugging.

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + +
+ + +
+ +
+ + + + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/able_player_js.html b/able_player_js.html new file mode 100644 index 0000000..d1920a5 --- /dev/null +++ b/able_player_js.html @@ -0,0 +1,232 @@ + + + + + Filter: able_player_js - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Filter: able_player_js

+
+ + + + + +
+ +
+

+ +
+ +
+
+ + + + + +

apply_filters( 'able_player_js', $url, $debug ) → {string}

+ + + + + +
+

Filter the Able Player JS URL.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
$url + + +string + + + +

URL to Able Player root directory.

$debug + + +bool + + + +

True if environment is in debugging.

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + +
+ + +
+ +
+ + + + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/ableplayer.php.html b/ableplayer.php.html new file mode 100644 index 0000000..7a743a5 --- /dev/null +++ b/ableplayer.php.html @@ -0,0 +1,747 @@ + + + + + Source: ableplayer.php - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Source: ableplayer.php

+
+ + + + + +
+
+
<?php
+/**
+ * Able Player, accessible HTML5 media player
+ *
+ * @package     Able Player
+ * @author      Joe Dolson
+ * @license     MIT
+ *
+ * @wordpress-plugin
+ * Plugin Name:  Able Player, accessible HTML5 media player
+ * Plugin URI:  https://github.com/ableplayer/ableplayer-wordpress
+ * Description: This plug-in uses Able Player, an open-source fully-accessible cross-browser HTML5 media player, to embed audio or video within your WordPress page.
+ * Author:      Joe Dolson
+ * Author URI:  https://www.joedolson.com
+ * Text Domain: ableplayer
+ * License:     MIT
+ * License URI: https://github.com/ableplayer/ableplayer-wordpress/blob/master/LICENSE
+ * Version:     2.3.0
+ */
+
+// Configure debugging mode.
+define( 'ABLEPLAYER_DEBUG', false );
+
+// Get current version number.
+define( 'ABLEPLAYER_VERSION', '2.3.0' );
+
+require_once plugin_dir_path( __FILE__ ) . 'inc/settings.php';
+require_once plugin_dir_path( __FILE__ ) . 'inc/generator.php';
+require_once plugin_dir_path( __FILE__ ) . 'inc/kses.php';
+
+register_activation_hook( __FILE__, 'ableplayer_activation' );
+/**
+ * Configure plugin on activation.
+ */
+function ableplayer_activation() {
+	// Handle plugin activation.
+}
+
+register_deactivation_hook( __FILE__, 'ableplayer_plugin_deactivated' );
+/**
+ * On plugin deactivation.
+ */
+function ableplayer_plugin_deactivated() {
+	// Handle plugin deactivation.
+}
+
+/**
+ * Load styles and scripts to head.
+ */
+function ableplayer_enqueue_scripts() {
+	$debug        = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false;
+	$version      = ABLEPLAYER_VERSION;
+	$version      = ( $debug ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version;
+	$dependencies = array( 'jquery', 'ableplayer-video' );
+
+	// Register/enqueue other dependencies.
+	if ( 'true' === ableplayer_get_settings( 'cookies' ) ) {
+		$cookie_js = ( $debug ) ? '/js.cookie.js' : '/js.cookie.min.js';
+		wp_enqueue_script( 'js-cookie', plugins_url( 'thirdparty', __FILE__ ) . $cookie_js, array(), $version, true );
+		$dependencies = array( 'js-cookie', 'jquery', 'ableplayer-video' );
+	}
+	if ( 'true' === ableplayer_get_settings( 'vimeo' ) ) {
+		wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array(), $version, true );
+	}
+	wp_enqueue_style( 'ableplayer-video', plugins_url( 'assets', __FILE__ ) . '/css/media.css', array(), $version );
+	$media_js = ( $debug ) ? 'media.js' : 'media.min.js';
+	wp_register_script(
+		'ableplayer-video',
+		plugins_url( 'assets', __FILE__ ) . '/js/' . $media_js,
+		array(),
+		$version,
+		array(
+			'in_footer' => true,
+			'strategy'  => 'defer',
+		)
+	);
+	$settings = ableplayer_get_settings();
+	unset( $settings['last_shortcode'] );
+	wp_localize_script(
+		'ableplayer-video',
+		'ableplayer',
+		array(
+			'settings' => $settings,
+		)
+	);
+
+	$js_file  = ( $debug ) ? 'ableplayer.js' : 'ableplayer.min.js';
+	$css_file = ( $debug ) ? 'styles/ableplayer.css' : 'build/ableplayer.min.css';
+	/**
+	 * Filter the Able Player JS URL.
+	 *
+	 * @hook able_player_js
+	 *
+	 * @param {string} $url URL to Able Player root directory.
+	 * @param {bool}   $debug True if environment is in debugging.
+	 *
+	 * @return {string}
+	 */
+	$js_dir = apply_filters( 'able_player_js', plugins_url( 'build', __FILE__ ) . '/' . $js_file, $debug );
+	/**
+	 * Filter the Able Player CSS URL.
+	 *
+	 * @hook able_player_css
+	 *
+	 * @param {string} $url URL to Able Player root directory.
+	 * @param {bool}   $debug True if environment is debugging.
+	 *
+	 * @return {string}
+	 */
+	$css_dir = apply_filters( 'able_player_css', plugins_url( '', __FILE__ ) . '/' . $css_file, $debug );
+
+	/**
+	 * Filter the Able Player script dependencies.
+	 *
+	 * @hook ableplayer_dependencies
+	 *
+	 * @param {array} $dependencies Array of scripts required by the main Able Player script.
+	 * @param {bool}  $debug True if environment is in debugging mode.
+	 *
+	 * @return {array}
+	 */
+	$dependencies = apply_filters( 'ableplayer_dependencies', $dependencies, $debug );
+	wp_enqueue_script(
+		'ableplayer',
+		$js_dir,
+		$dependencies,
+		$version,
+		array(
+			'in_footer' => true,
+			'strategy'  => 'defer',
+		)
+	);
+	wp_enqueue_style( 'ableplayer', $css_dir, array(), $version );
+}
+add_action( 'wp_enqueue_scripts', 'ableplayer_enqueue_scripts' );
+
+/**
+ * Enqueue admin JS and CSS.
+ */
+function ableplayer_admin_scripts() {
+	$version  = ABLEPLAYER_VERSION;
+	$version  = ( SCRIPT_DEBUG ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version;
+	$admin_js = ( SCRIPT_DEBUG ) ? 'admin.js' : 'admin.min.js';
+	wp_enqueue_script( 'ableplayer-js', plugins_url( '/assets/js/' . $admin_js, __FILE__ ), array( 'jquery', 'wp-a11y', 'clipboard' ), $version, true );
+	wp_localize_script(
+		'ableplayer-js',
+		'ableplayer',
+		array(
+			'posterTitle'      => 'Select Poster Image',
+			'sourceTitle'      => 'Select Video',
+			'captionsTitle'    => 'Select Captions',
+			'subtitlesTitle'   => 'Select Subtitles',
+			'descriptionTitle' => 'Select Description',
+			'chaptersTitle'    => 'Select Chapters',
+			'buttonName'       => 'Choose Media',
+			'thumbHeight'      => '100',
+			'removed'          => __( 'Selected media removed', 'ableplayer' ),
+			'homeUrl'          => home_url(),
+		)
+	);
+	if ( function_exists( 'wp_enqueue_media' ) && ! did_action( 'wp_enqueue_media' ) ) {
+		wp_enqueue_media();
+	}
+	wp_enqueue_style( 'ableplayer', plugins_url( '/assets/css/admin.css', __FILE__ ), array(), $version );
+}
+add_action( 'admin_enqueue_scripts', 'ableplayer_admin_scripts' );
+
+/**
+ * Self-documenting array of Able Player attributes.
+ *
+ * @return array
+ */
+function able_player_parameters() {
+	/**
+	 * 'default': Default value in shortcode.
+	 * 'description': Explanation of field and value expected.
+	 * 'parameter': Parameter to use in output if not `data-{key}`.
+	 * 'options': Available options if fixed choices available. (If only one, checkbox input; multiple, select).
+	 */
+	$params = array(
+		'id'                  => array(
+			'default'     => ableplayer_get_unique_id(),
+			'description' => __( 'Automatically generated unique ID for an Able Player shortcode.', 'ableplayer' ),
+		),
+		'allow-fullscreen'    => array(
+			'default'     => '',
+			'description' => __( 'If set to “false” the player will not include a fullscreen button', 'ableplayer' ),
+			'options'     => array( 'false' ),
+		),
+		'autoplay'            => array(
+			'default'     => 'false',
+			'description' => __( 'Play media automatically when page loads. For accessibility reasons, this is not recommended unless user is sure to expect media to automatically start.', 'ableplayer' ),
+			'parameter'   => 'autoplay',
+			'options'     => array( 'true' ),
+		),
+		'captions-position'   => array(
+			'default'     => 'below',
+			'description' => __( 'Specify default position of captions relative to the video. Users can override this.', 'ableplayer' ),
+			'options'     => array( 'below', 'overlay' ),
+		),
+		'heading'             => array(
+			'default'     => '',
+			'description' => __( 'Able Player injects an off-screen HTML heading “Media Player” at the top of the player so screen reader users can easily find the player. It automatically assigns a heading level that is one level deeper than the closest parent heading. This attribute can be used to manually set the heading level.', 'ableplayer' ),
+			'options'     => array(
+				'h1'   => '1',
+				'h2'   => '2',
+				'h3'   => '3',
+				'h4'   => '4',
+				'h5'   => '5',
+				'h6'   => '6',
+				'Omit' => '0',
+			),
+		),
+		'height'              => array(
+			'default'     => '',
+			'description' => __( 'Height of the video in pixels. Defaults to height of container.', 'ableplayer' ),
+			'parameter'   => 'height',
+		),
+		'hidecontrols'        => array(
+			'default'     => '',
+			'description' => __( 'Hide controls during playback. Controls are visibly hidden but still accessible to assistive technologies. Controls reappear if user presses any key or moves the mouse over the video player region.', 'ableplayer' ),
+			'parameter'   => 'data-hide-controls',
+			'options'     => array( 'true' ),
+		),
+		'lang'                => array(
+			'default'     => '',
+			'description' => __( 'Specify language of the player using 2-character language code. Default "en" for English.', 'ableplayer' ),
+		),
+		'loop'                => array(
+			'default'     => '',
+			'description' => __( 'Loops and plays the media file repeatedly.', 'ableplayer' ),
+			'parameter'   => 'loop',
+			'options'     => array( 'true' ),
+		),
+		'nowplaying'          => array(
+			'default'     => '',
+			'description' => __( 'Include “Selected track” section within player; only applies when a playlist is present.', 'ableplayer' ),
+			'parameter'   => 'data-show-now-playing',
+			'options'     => array( 'true' ),
+		),
+		'playsinline'         => array(
+			'default'     => 'true',
+			'description' => __( 'Instructs supporting browsers to play the video “inline” within the web page. This is especially applicable on iPhones, which by default load the video in their own built-in video player.', 'ableplayer' ),
+			'parameter'   => 'playsinline',
+			'options'     => array( 'false' ),
+		),
+		'poster'              => array(
+			'default'     => '',
+			'description' => __( 'Path to an image file. Will be displayed in the player until the video is played.', 'ableplayer' ),
+			'parameter'   => 'poster',
+		),
+		'preload'             => array(
+			'default'     => 'auto',
+			'description' => __( 'Tells the browser how much media to download when the page loads.', 'ableplayer' ),
+			'parameter'   => 'preload',
+			'options'     => array( 'auto', 'metadata' ),
+		),
+		'seekinterval'        => array(
+			'default'     => '',
+			'description' => __( 'Interval (in seconds) of forward and rewind buttons. By default, seek interval is intelligently calculated based on duration of the media.', 'ableplayer' ),
+			'parameter'   => 'data-seek-interval',
+		),
+		'sign-src'            => array(
+			'default'     => '',
+			'description' => __( 'A path pointing to a synchronized sign language version of the video.', 'ableplayer' ),
+		),
+		'skin'                => array(
+			'default'     => '2020',
+			'description' => __( 'The default skin has two rows of controls, with the seekbar positioned in available space within the top row. The “2020” skin, introduced in version 4.2, has all buttons in one row beneath a full-width seekbar.', 'ableplayer' ),
+			'options'     => array( '2020', 'legacy' ),
+		),
+		'speed'               => array(
+			'default'     => 'animals',
+			'description' => __( 'The default setting uses a turtle icon for slower and a rabbit icon for faster. Setting this to “arrows” uses arrows pointing up for faster and down for slower.', 'ableplayer' ),
+			'parameter'   => 'data-speed-icons',
+			'options'     => array( 'animals', 'arrows' ),
+		),
+		'steno-mode'          => array(
+			'default'     => '',
+			'description' => __( 'Allow keyboard shortcuts for controlling the player remotely within textarea form fields.', 'ableplayer' ),
+			'options'     => array( 'true' ),
+		),
+		'start'               => array(
+			'default'     => '',
+			'description' => __( 'Time at which you want the media to start playing.', 'ableplayer' ),
+			'parameter'   => 'data-start-time',
+		),
+		'transcript-div'      => array(
+			'default'     => '',
+			'description' => __( 'ID of a custom div in which to display an interactive transcript.', 'ableplayer' ),
+		),
+		'transcript-src'      => array(
+			'default'     => '',
+			'description' => __( 'ID of an external div that contains a pre-existing manually coded transcript. Able Player will parse this transcript and interact with it during playback', 'ableplayer' ),
+		),
+		'include-transcript'  => array(
+			'default'     => '',
+			'description' => __( 'Set to “false” to exclude transcript button from controller.', 'ableplayer' ),
+			'options'     => array( 'true' ),
+		),
+		'transcript-title'    => array(
+			'default'     => '',
+			'description' => __( 'Override default transcript title (default is “Transcript”, or “Lyrics” if the data-lyrics-mode attribute is present)', 'ableplayer' ),
+		),
+		'lyrics-mode'         => array(
+			'default'     => '',
+			'description' => __( 'Forces a line break between and within captions in the transcript.', 'ableplayer' ),
+			'options'     => array( 'true' ),
+		),
+		'chapters-div'        => array(
+			'default'     => '',
+			'description' => __( 'ID of an external div in which to display a list of chapters. The list of chapters is generated automatically if a chapters track is available in a WebVTT file. If this attribute is not provided and chapter are available, chapters will be displayed in a popup menu triggered by the Chapters button.', 'ableplayer' ),
+		),
+		'use-chapters-button' => array(
+			'default'     => '',
+			'description' => __( 'Set to “false” to exclude chapters button from controller.', 'ableplayer' ),
+			'options'     => array( 'false' ),
+		),
+		'chapters-title'      => array(
+			'default'     => '',
+			'description' => __( 'Override default chapters title (default is “Chapters”)', 'ableplayer' ),
+		),
+		'chapters-default'    => array(
+			'default'     => '',
+			'description' => __( 'ID of default chapter (must correspond with the text or value immediately above the timestamp in your chapter’s WebVTT file). If this attribute is present, the media will be advanced to this start time.', 'ableplayer' ),
+		),
+		'seekbar-scope'       => array(
+			'default'     => '',
+			'description' => __( 'Default is “video” (seekbar represents full duration of video); if set to “chapter” seekbar represents the duration of the current chapter only', 'ableplayer' ),
+			'options'     => array( 'chapter' ),
+		),
+		'search'              => array(
+			'default'     => '',
+			'description' => __( 'Search terms to search for within the caption tracks, separated by a space.', 'ableplayer' ),
+		),
+		'search-lang'         => array(
+			'default'     => '',
+			'description' => __( '2-character language code of caption or subtitle track to search.', 'ableplayer' ),
+		),
+		'search-div'          => array(
+			'default'     => '',
+			'description' => __( 'ID of external container in which to display search results', 'ableplayer' ),
+		),
+		'vimeo-id'            => array(
+			'default'     => '',
+			'description' => __( 'ID or URL of a video on Vimeo.', 'ableplayer' ),
+		),
+		'vimeo-desc-id'       => array(
+			'default'     => '',
+			'description' => __( 'ID or URL of an alternate described version of a video on Vimeo', 'ableplayer' ),
+		),
+		'width'               => array(
+			'default'     => '',
+			'description' => __( 'Width of the video in pixels.', 'ableplayer' ),
+			'param'       => 'width',
+		),
+		'volume'              => array(
+			'default'     => '7',
+			'description' => __( 'Set the default volume from 0 to 10; default is 7 to avoid overpowering screen reader audio)', 'ableplayer' ),
+			'options'     => array( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ),
+		),
+		'youtube-id'          => array(
+			'default'     => '',
+			'description' => __( 'YouTube ID or a URL to a YouTube video page.', 'ableplayer' ),
+		),
+		'youtube-desc-id'     => array(
+			'default'     => '',
+			'description' => __( 'YouTube ID or URL of an alternative described version of a video.', 'ableplayer' ),
+		),
+		'youtube-sign-src'    => array(
+			'default'     => '',
+			'description' => __( 'YouTube ID or URL of a sign language interpreted version of a video.', 'ableplayer' ),
+		),
+		'youtube-nocookie'    => array(
+			'default'     => '',
+			'description' => __( 'If set to “true” the YouTube video will be embedded using the “youtube-nocookie.com” host.', 'ableplayer' ),
+			'options'     => array( 'true' ),
+		),
+	);
+	/**
+	 * Filter the default values, options, and descriptions for all Able Player shortcode parameters. Not used yet in 1.2.0.
+	 *
+	 * @hook ableplayer_parameters
+	 *
+	 * @param {array} $params Array of default parameters. The array is a multidimensional array with the shortcode
+	 *                        attribute as a key with array of `default` value, `description`, available `options`,
+	 *(                       and alternate `parameter` name if the output isn't `data-{key}`.
+	 *
+	 * @return {array} Array of parameters.
+	 */
+	return apply_filters( 'ableplayer_default_parameters', $params );
+}
+
+/**
+ * Remove Media Element scripts.
+ */
+function ableplayer_remove_scripts() {
+	if ( ! is_admin() ) {
+		$elements = ableplayer_get_settings( 'disable_elements' );
+		if ( 'true' === $elements ) {
+			wp_deregister_script( 'mediaelement' );
+			wp_deregister_script( 'wp-playlist' );
+		}
+	}
+}
+add_action( 'init', 'ableplayer_remove_scripts' );
+
+/**
+ * Add support for [ableplayer] shortcode.
+ *
+ * @param array  $atts Array of shortcode parameters.
+ * @param string $content Content between shortcode opening and closing tags, if any.
+ *
+ * @return string.
+ */
+function ableplayer_shortcode( $atts, $content = null ) {
+	// Each of the following attributes can be passed with the [ableplayer] shortcode.
+	// 'id' and 'type' (video or audio) is required.
+
+	// normalize attribute keys, lowercase.
+	$atts = array_change_key_case( (array) $atts, CASE_LOWER );
+
+	// build complete array of all attributes; defaults will be overridden with user values.
+	$all_atts = shortcode_atts(
+		array(
+			'id'               => ableplayer_get_unique_id(),
+			'youtube-id'       => '',
+			'youtube-desc-id'  => '',
+			'youtube-nocookie' => '',
+			'youtube-sign-src' => '',
+			'vimeo-id'         => '',
+			'vimeo-desc-id'    => '',
+			'media-id'         => '',
+			'media-desc-id'    => '',
+			'media-asl-id'     => '',
+			'captions'         => '',
+			'subtitles'        => '',
+			'descriptions'     => '',
+			'chapters'         => '',
+			'transcript-div'   => '',
+			'autoplay'         => 'false',
+			'preload'          => 'metadata',
+			'loop'             => 'false',
+			'playsinline'      => 'true',
+			'hidecontrols'     => 'false',
+			'poster'           => '',
+			'width'            => '',
+			'height'           => '',
+			'heading'          => '',
+			'speed'            => ableplayer_get_settings( 'default_speed' ),
+			'start'            => '',
+			'volume'           => '',
+			'seekinterval'     => '',
+			'nowplaying'       => '',
+			'skin'             => '',
+		),
+		$atts,
+		'ableplayer'
+	);
+	// Globally remove white space on attributes.
+	$all_atts = map_deep( $all_atts, 'trim' );
+	// If vimeo ID is set, enqueue the vimeo player.
+	if ( $all_atts['vimeo-id'] ) {
+		$debug   = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false;
+		$version = ABLEPLAYER_VERSION;
+		$version = ( $debug ) ? $version . '-' . wp_rand( 1000, 9999 ) : $version;
+		wp_enqueue_script( 'vimeo', 'https://player.vimeo.com/api/player.js', array( 'ableplayer' ), $version, true );
+	}
+
+	$source     = '';
+	$datasource = '';
+	$element    = 'video';
+	if ( ! ( $all_atts['youtube-id'] || $all_atts['vimeo-id'] || $all_atts['media-id'] ) ) {
+		// Shortcode must have one of YouTube, Vimeo, or a local source.
+		return false;
+	} else {
+		if ( $all_atts['media-id'] ) {
+			// If Video ID is set but is not a valid URL, return.
+			$media_id = ( is_numeric( $all_atts['media-id'] ) ) ? wp_get_attachment_url( $all_atts['media-id'] ) : $all_atts['media-id'];
+			if ( ! $media_id ) {
+				return false;
+			} else {
+				$type    = get_post_mime_type( $all_atts['media-id'] );
+				$type    = ( 'video/quicktime' === $type ) ? 'video/mp4' : $type;
+				$element = ( wp_attachment_is( 'audio', $all_atts['media-id'] ) ) ? 'audio' : 'video';
+				$source  = '<source type="' . esc_attr( $type ) . '" src="' . esc_url( $media_id ) . '"%datasrc%>' . PHP_EOL;
+			}
+		}
+		if ( $all_atts['media-desc-id'] ) {
+			// If Video ID is set but is not a valid URL, return.
+			$media_desc_id = ( is_numeric( $all_atts['media-desc-id'] ) ) ? wp_get_attachment_url( $all_atts['media-desc-id'] ) : $all_atts['media-desc-id'];
+			if ( $media_desc_id ) {
+				$datatype    = get_post_mime_type( $all_atts['media-desc-id'] );
+				$datatype    = ( 'video/quicktime' ) ? 'video/mp4' : $datatype;
+				$datasource .= ( $type === $datatype ) ? ' data-desc-src="' . esc_url( $media_desc_id ) . '"' : '';
+			}
+		}
+		if ( $all_atts['media-asl-id'] ) {
+			// If Video ID is set but is not a valid URL, return.
+			$media_asl_id = ( is_numeric( $all_atts['media-asl-id'] ) ) ? wp_get_attachment_url( $all_atts['media-asl-id'] ) : $all_atts['media-desc-id'];
+			if ( $media_asl_id ) {
+				$datatype    = get_post_mime_type( $all_atts['media-asl-id'] );
+				$datatype    = ( 'video/quicktime' ) ? 'video/mp4' : $datatype;
+				$datasource .= ( $type === $datatype ) ? ' data-sign-src="' . esc_url( $media_asl_id ) . '"' : '';
+			}
+		}
+		$source = str_replace( '%datasrc%', $datasource, $source );
+
+		$tracks = array();
+		$kinds  = array(
+			'captions'     => __( 'Captions', 'ableplayer' ),
+			'subtitles'    => __( 'Subtitles', 'ableplayer' ),
+			'descriptions' => __( 'Audio Description', 'ableplayer' ),
+			'chapters'     => __( 'Chapters', 'ableplayer' ),
+		);
+		// Switch locale to BCP47 syntax.
+		$default_lang = str_replace( '_', '-', get_locale() );
+		if ( $all_atts['captions'] || $all_atts['subtitles'] || $all_atts['descriptions'] || $all_atts['chapters'] ) {
+			foreach ( $kinds as $kind => $default_label ) {
+				$track = '';
+				if ( ! empty( $all_atts[ $kind ] ) ) {
+					$data = explode( '|', $all_atts[ $kind ] );
+					if ( empty( $data[0] ) ) {
+						continue;
+					}
+					// Optional lang and language.
+					$srclang  = ( isset( $data[1] ) && ! empty( $data[1] ) ) ? $data[1] : $default_lang;
+					$srclabel = ( isset( $data[2] ) && ! empty( $data[2] ) ) ? $data[2] : $default_label;
+					$src      = ( is_numeric( $data[0] ) ) ? wp_get_attachment_url( $data[0] ) : $data[0];
+					$track    = '<track kind="' . $kind . '" srclang="' . esc_attr( $srclang ) . '" srclabel="' . esc_attr( $srclabel ) . '" src="' . esc_url( $src ) . '">';
+					$tracks[] = $track;
+				}
+			}
+		}
+
+		// build a video player.
+		$o  = PHP_EOL . "<$element";
+		$o .= ' id="' . esc_attr( $all_atts['id'] ) . '"';
+		$o .= ' data-able-player';
+		if ( ableplayer_is_true( $all_atts['autoplay'] ) ) {
+			$o .= ' autoplay';
+		}
+		if ( ableplayer_is_true( $all_atts['loop'] ) ) {
+			$o .= ' loop';
+		}
+		if ( ableplayer_is_true( $all_atts['playsinline'] ) ) {
+			$o .= ' playsinline';
+		}
+		if ( ableplayer_is_true( $all_atts['hidecontrols'] ) ) {
+			$o .= ' data-hide-controls';
+		}
+		$preload = ( in_array( $all_atts['preload'], array( 'auto', 'metadata', 'none' ), true ) ) ? $all_atts['preload'] : '';
+		if ( $preload ) {
+			$o .= ' preload="' . esc_attr( $preload ) . '"';
+		}
+		if ( ! empty( $all_atts['poster'] ) ) {
+			// Allow passing an attachment ID as poster.
+			$poster = $all_atts['poster'];
+			if ( is_numeric( $poster ) ) {
+				$poster = absint( $poster );
+				$poster = wp_get_attachment_image_url( $poster, 'large' );
+			}
+			$o .= ' poster="' . esc_attr( $poster ) . '"';
+		}
+		if ( ! empty( $all_atts['width'] ) ) {
+			$o .= ' width="' . esc_attr( $all_atts['width'] ) . '"';
+		}
+		if ( ! empty( $all_atts['height'] ) ) {
+			$o .= ' height="' . esc_attr( $all_atts['height'] ) . '"';
+		}
+		if ( ! empty( $all_atts['heading'] ) && 'auto' !== $all_atts['heading'] ) {
+			$o .= ' data-heading-level="' . esc_attr( $all_atts['heading'] ) . '"';
+		}
+		if ( ! empty( $all_atts['speed'] ) ) {
+			$o .= ' data-speed-icons="' . esc_attr( $all_atts['speed'] ) . '"';
+		}
+		if ( ! empty( $all_atts['start'] ) ) {
+			$o .= ' data-start-time="' . esc_attr( $all_atts['start'] ) . '"';
+		}
+		if ( ! empty( $all_atts['volume'] ) ) {
+			$o .= 'data-volume="' . esc_attr( $all_atts['volume'] ) . '"';
+		}
+		if ( ! empty( $all_atts['seekinterval'] ) ) {
+			$o .= ' data-seek-interval="' . esc_attr( $all_atts['seekinterval'] ) . '"';
+		}
+		if ( ! empty( $all_atts['nowplaying'] ) ) {
+			$o .= ' data-show-now-playing="' . esc_attr( $all_atts['nowplaying'] ) . '"';
+		}
+		if ( ! empty( $all_atts['skin'] ) && '2020' !== $all_atts['skin'] ) {
+			$o .= ' data-skin="' . esc_attr( $all_atts['skin'] ) . '"';
+		}
+		if ( ! empty( $all_atts['youtube-id'] ) ) {
+			$o .= ' data-youtube-id="' . esc_attr( $all_atts['youtube-id'] ) . '"';
+		}
+		if ( ! empty( $all_atts['youtube-desc-id'] ) ) {
+			$o .= ' data-youtube-desc-id="' . esc_attr( $all_atts['youtube-desc-id'] ) . '"';
+		}
+		if ( ! empty( $all_atts['youtube-sign-src'] ) ) {
+			$o .= ' data-youtube-sign-src="' . esc_attr( $all_atts['youtube-sign-src'] ) . '"';
+		}
+		if ( ! empty( $all_atts['youtube-nocookie'] ) ) {
+			$o .= ' data-youtube-nocookie="' . esc_attr( $all_atts['youtube-nocookie'] ) . '"';
+		}
+		if ( ! empty( $all_atts['vimeo-id'] ) ) {
+			$o .= ' data-vimeo-id="' . esc_attr( $all_atts['vimeo-id'] ) . '"';
+		}
+		if ( ! empty( $all_atts['vimeo-desc-id'] ) ) {
+			$o .= ' data-vimeo-desc-id="' . esc_attr( $all_atts['vimeo-desc-id'] ) . '"';
+		}
+		if ( ! empty( $all_atts['transcript-div'] ) ) {
+			$o .= ' data-transcript-div="' . esc_attr( $all_atts['transcript-div'] ) . '"';
+		}
+		$o .= '>' . PHP_EOL;
+
+		$o .= "\t" . $source;
+
+		if ( ! empty( $tracks ) ) {
+			$o .= implode( PHP_EOL . "\t", $tracks );
+		}
+		// enclosing tags.
+		if ( ! is_null( $content ) ) {
+			// run shortcode parser recursively.
+			$o .= do_shortcode( $content );
+		}
+
+		// end media tag.
+		$o .= PHP_EOL . "</$element>";
+
+		return $o;
+	}
+}
+add_shortcode( 'ableplayer', 'ableplayer_shortcode' );
+
+/**
+ * Get unique ID for a specific Ableplayer instance.
+ *
+ * @return string
+ */
+function ableplayer_get_unique_id() {
+	// use add_option(), get_option(), update_option(), & delete_option()
+	// to track the number of Able Player instances on the current page
+	// return a unique id for each new player instance,
+	// using the form 'able_player_1', 'able_player_2', etc.
+	$this_player = 1;
+	$num_players = get_option( 'able_player_count' );
+	if ( empty( $num_players ) ) {
+		update_option( 'able_player_count', $this_player, false );
+
+		return 'able_player_' . $this_player;
+	} else {
+		// there's already at least one player.
+		$this_player = $num_players + 1;
+		update_option( 'able_player_count', $this_player, false );
+
+		return 'able_player_' . $this_player;
+	}
+}
+
+/**
+ * Test whether a given able player property is true.
+ *
+ * @param bool|string|int $condition A boolean-like value that should be treated as boolean.
+ *
+ * @return bool
+ */
+function ableplayer_is_true( $condition ) {
+	// check for all variations that might be considered 'true'.
+	if ( '1' === $condition || 'yes' === $condition || 'true' === $condition || 1 === $condition || true === $condition ) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+
+add_action( 'admin_notices', 'able_status_notice', 10 );
+/**
+ * Display notice in Playground for demo purposes.
+ */
+function able_status_notice() {
+	// Only shown when in the Playground preview.
+	if ( 'true' === get_option( 'able_show_playground_intro', '' ) ) {
+		$settings_url = admin_url( 'options-general.php?page=ableplayer' );
+		echo '<div class="notice notice-info">';
+		echo '<h3>' . __( 'Thanks for trying out Able Player!', 'ableplayer' ) . '</h3>';
+		echo '<p>' . __( "Let me give you a few quick things to try out while you're here:", 'ableplayer' ) . '</p>';
+		echo '<ol>';
+		echo '<li>' . __( 'Create a new post and add media to experiment with Able Player.', 'ableplayer' ) . '</li>';
+		// translators: link to settings page.
+		echo '<li>' . sprintf( __( 'Visit the <a href="%s">Able Player settings page</a> and explore options.', 'ableplayer' ), esc_url( $settings_url ) ) . '</li>';
+		echo '</ol>';
+		// translators: link to plugin documentation.
+		echo '<p>' . sprintf( __( 'To learn more, check out the <a href="%s">player documentation</a>.', 'ableplayer' ), 'https://ableplayer.github.io/ableplayer/' ) . '</p>';
+		echo '</div>';
+	}
+}
+
+
+
+ + + + +
+ +
+ + + +
+ + + + + diff --git a/ableplayer_dependencies.html b/ableplayer_dependencies.html new file mode 100644 index 0000000..8cf97c4 --- /dev/null +++ b/ableplayer_dependencies.html @@ -0,0 +1,232 @@ + + + + + Filter: ableplayer_dependencies - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Filter: ableplayer_dependencies

+
+ + + + + +
+ +
+

+ +
+ +
+
+ + + + + +

apply_filters( 'ableplayer_dependencies', $dependencies, $debug ) → {array}

+ + + + + +
+

Filter the Able Player script dependencies.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
$dependencies + + +array + + + +

Array of scripts required by the main Able Player script.

$debug + + +bool + + + +

True if environment is in debugging mode.

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +array + + +
+
+ + + + + + +
+ + +
+ +
+ + + + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/ableplayer_parameters.html b/ableplayer_parameters.html new file mode 100644 index 0000000..f495394 --- /dev/null +++ b/ableplayer_parameters.html @@ -0,0 +1,215 @@ + + + + + Filter: ableplayer_parameters - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Filter: ableplayer_parameters

+
+ + + + + +
+ +
+

+ +
+ +
+
+ + + + + +

apply_filters( 'ableplayer_parameters', $params ) → {array}

+ + + + + +
+

Filter the default values, options, and descriptions for all Able Player shortcode parameters. Not used yet in 1.2.0.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
$params + + +array + + + +

Array of default parameters. The array is a multidimensional array with the shortcode +attribute as a key with array of default value, description, available options, +( and alternate parameter name if the output isn't data-{key}.

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Array of parameters.

+
+ + + +
+
+ Type +
+
+ +array + + +
+
+ + + + + + +
+ + +
+ +
+ + + + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh deleted file mode 100644 index 878881f..0000000 --- a/bin/install-wp-tests.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash - -if [ $# -lt 3 ]; then - echo "usage: $0 [db-host] [wp-version] [skip-database-creation]" - exit 1 -fi - -DB_NAME=$1 -DB_USER=$2 -DB_PASS=$3 -DB_HOST=${4-localhost} -WP_VERSION=${5-latest} -SKIP_DB_CREATE=${6-false} - -TMPDIR=${TMPDIR-/tmp} -TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//") -WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib} -WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/} - -download() { - if [ `which curl` ]; then - curl -s "$1" > "$2"; - elif [ `which wget` ]; then - wget -nv -O "$2" "$1" - fi -} - -if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then - WP_TESTS_TAG="branches/$WP_VERSION" -elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then - if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then - # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x - WP_TESTS_TAG="tags/${WP_VERSION%??}" - else - WP_TESTS_TAG="tags/$WP_VERSION" - fi -elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then - WP_TESTS_TAG="trunk" -else - # http serves a single offer, whereas https serves multiple. we only want one - download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json - grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json - LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//') - if [[ -z "$LATEST_VERSION" ]]; then - echo "Latest WordPress version could not be found" - exit 1 - fi - WP_TESTS_TAG="tags/$LATEST_VERSION" -fi - -set -ex - -install_wp() { - - if [ -d $WP_CORE_DIR ]; then - return; - fi - - mkdir -p $WP_CORE_DIR - - if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then - mkdir -p $TMPDIR/wordpress-nightly - download https://wordpress.org/nightly-builds/wordpress-latest.zip $TMPDIR/wordpress-nightly/wordpress-nightly.zip - unzip -q $TMPDIR/wordpress-nightly/wordpress-nightly.zip -d $TMPDIR/wordpress-nightly/ - mv $TMPDIR/wordpress-nightly/wordpress/* $WP_CORE_DIR - else - if [ $WP_VERSION == 'latest' ]; then - local ARCHIVE_NAME='latest' - elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then - # https serves multiple offers, whereas http serves single. - download https://api.wordpress.org/core/version-check/1.7/ $TMPDIR/wp-latest.json - if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then - # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x - LATEST_VERSION=${WP_VERSION%??} - else - # otherwise, scan the releases and get the most up to date minor version of the major release - local VERSION_ESCAPED=`echo $WP_VERSION | sed 's/\./\\\\./g'` - LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' $TMPDIR/wp-latest.json | sed 's/"version":"//' | head -1) - fi - if [[ -z "$LATEST_VERSION" ]]; then - local ARCHIVE_NAME="wordpress-$WP_VERSION" - else - local ARCHIVE_NAME="wordpress-$LATEST_VERSION" - fi - else - local ARCHIVE_NAME="wordpress-$WP_VERSION" - fi - download https://wordpress.org/${ARCHIVE_NAME}.tar.gz $TMPDIR/wordpress.tar.gz - tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR - fi - - download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php -} - -install_test_suite() { - # portable in-place argument for both GNU sed and Mac OSX sed - if [[ $(uname -s) == 'Darwin' ]]; then - local ioption='-i .bak' - else - local ioption='-i' - fi - - # set up testing suite if it doesn't yet exist - if [ ! -d $WP_TESTS_DIR ]; then - # set up testing suite - mkdir -p $WP_TESTS_DIR - svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes - svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data - fi - - if [ ! -f wp-tests-config.php ]; then - download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php - # remove all forward slashes in the end - WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::") - sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php - sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php - fi - -} - -install_db() { - - if [ ${SKIP_DB_CREATE} = "true" ]; then - return 0 - fi - - # parse DB_HOST for port or socket references - local PARTS=(${DB_HOST//\:/ }) - local DB_HOSTNAME=${PARTS[0]}; - local DB_SOCK_OR_PORT=${PARTS[1]}; - local EXTRA="" - - if ! [ -z $DB_HOSTNAME ] ; then - if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then - EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" - elif ! [ -z $DB_SOCK_OR_PORT ] ; then - EXTRA=" --socket=$DB_SOCK_OR_PORT" - elif ! [ -z $DB_HOSTNAME ] ; then - EXTRA=" --host=$DB_HOSTNAME --protocol=tcp" - fi - fi - - # create database - mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA -} - -install_wp -install_test_suite -install_db diff --git a/composer.json b/composer.json deleted file mode 100644 index 48dca47..0000000 --- a/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "ableplayer/ableplayer-wordpress", - "description": "Able Player Plugin for WordPress", - "keywords": ["wordpress", "html5", "video", "audio"], - "homepage": "https://github.com/ableplayer/ableplayer-wordpress", - "license": "MIT", - "authors": [{ - "name": "Terrill Thompson", - "email": "test@test.com", - "homepage": "http://terrillthompson.com" - }], - "type": "wordpress-plugin", - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.5", - "squizlabs/php_codesniffer": "^3.5", - "wp-coding-standards/wpcs": "^2.2", - "wp-phpunit/wp-phpunit": "^5.8", - "yoast/phpunit-polyfills": "^1.0" - }, - "require": { - "composer/installers": "~1.0" - }, - "scripts": { - "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", - "lint": "phpcs --standard=phpcs.xml.dist", - "test": "phpunit -c phpunit.xml.dist --verbose" - }, - "config": { - "allow-plugins": { - "composer/installers": true, - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/fonts/OpenSans-Bold-webfont.eot b/fonts/OpenSans-Bold-webfont.eot new file mode 100644 index 0000000..5d20d91 Binary files /dev/null and b/fonts/OpenSans-Bold-webfont.eot differ diff --git a/fonts/OpenSans-Bold-webfont.svg b/fonts/OpenSans-Bold-webfont.svg new file mode 100644 index 0000000..3ed7be4 --- /dev/null +++ b/fonts/OpenSans-Bold-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-Bold-webfont.woff b/fonts/OpenSans-Bold-webfont.woff new file mode 100644 index 0000000..1205787 Binary files /dev/null and b/fonts/OpenSans-Bold-webfont.woff differ diff --git a/fonts/OpenSans-BoldItalic-webfont.eot b/fonts/OpenSans-BoldItalic-webfont.eot new file mode 100644 index 0000000..1f639a1 Binary files /dev/null and b/fonts/OpenSans-BoldItalic-webfont.eot differ diff --git a/fonts/OpenSans-BoldItalic-webfont.svg b/fonts/OpenSans-BoldItalic-webfont.svg new file mode 100644 index 0000000..6a2607b --- /dev/null +++ b/fonts/OpenSans-BoldItalic-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-BoldItalic-webfont.woff b/fonts/OpenSans-BoldItalic-webfont.woff new file mode 100644 index 0000000..ed760c0 Binary files /dev/null and b/fonts/OpenSans-BoldItalic-webfont.woff differ diff --git a/fonts/OpenSans-Italic-webfont.eot b/fonts/OpenSans-Italic-webfont.eot new file mode 100644 index 0000000..0c8a0ae Binary files /dev/null and b/fonts/OpenSans-Italic-webfont.eot differ diff --git a/fonts/OpenSans-Italic-webfont.svg b/fonts/OpenSans-Italic-webfont.svg new file mode 100644 index 0000000..e1075dc --- /dev/null +++ b/fonts/OpenSans-Italic-webfont.svg @@ -0,0 +1,1830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-Italic-webfont.woff b/fonts/OpenSans-Italic-webfont.woff new file mode 100644 index 0000000..ff652e6 Binary files /dev/null and b/fonts/OpenSans-Italic-webfont.woff differ diff --git a/fonts/OpenSans-Light-webfont.eot b/fonts/OpenSans-Light-webfont.eot new file mode 100644 index 0000000..1486840 Binary files /dev/null and b/fonts/OpenSans-Light-webfont.eot differ diff --git a/fonts/OpenSans-Light-webfont.svg b/fonts/OpenSans-Light-webfont.svg new file mode 100644 index 0000000..11a472c --- /dev/null +++ b/fonts/OpenSans-Light-webfont.svg @@ -0,0 +1,1831 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-Light-webfont.woff b/fonts/OpenSans-Light-webfont.woff new file mode 100644 index 0000000..e786074 Binary files /dev/null and b/fonts/OpenSans-Light-webfont.woff differ diff --git a/fonts/OpenSans-LightItalic-webfont.eot b/fonts/OpenSans-LightItalic-webfont.eot new file mode 100644 index 0000000..8f44592 Binary files /dev/null and b/fonts/OpenSans-LightItalic-webfont.eot differ diff --git a/fonts/OpenSans-LightItalic-webfont.svg b/fonts/OpenSans-LightItalic-webfont.svg new file mode 100644 index 0000000..431d7e3 --- /dev/null +++ b/fonts/OpenSans-LightItalic-webfont.svg @@ -0,0 +1,1835 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-LightItalic-webfont.woff b/fonts/OpenSans-LightItalic-webfont.woff new file mode 100644 index 0000000..43e8b9e Binary files /dev/null and b/fonts/OpenSans-LightItalic-webfont.woff differ diff --git a/fonts/OpenSans-Regular-webfont.eot b/fonts/OpenSans-Regular-webfont.eot new file mode 100644 index 0000000..6bbc3cf Binary files /dev/null and b/fonts/OpenSans-Regular-webfont.eot differ diff --git a/fonts/OpenSans-Regular-webfont.svg b/fonts/OpenSans-Regular-webfont.svg new file mode 100644 index 0000000..25a3952 --- /dev/null +++ b/fonts/OpenSans-Regular-webfont.svg @@ -0,0 +1,1831 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/OpenSans-Regular-webfont.woff b/fonts/OpenSans-Regular-webfont.woff new file mode 100644 index 0000000..e231183 Binary files /dev/null and b/fonts/OpenSans-Regular-webfont.woff differ diff --git a/hookdoc-conf.json b/hookdoc-conf.json deleted file mode 100644 index c309883..0000000 --- a/hookdoc-conf.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "opts": { - "destination": "docs", - "template": "node_modules/wp-hookdoc/template", - "recurse": true, - "readme": "./.github/hookdoc-tmpl/README.md" - }, - "source": { - "include": [ "./src" ], - "includePattern": ".+\\.(php)?$" - }, - "plugins": [ - "node_modules/wp-hookdoc/plugin", - "plugins/markdown" - ], - "templates": { - "default": { - "layoutFile": ".github/hookdoc-tmpl/layout.tmpl", - "staticFiles": { - "include": [ - "./.github/hookdoc-tmpl/static" - ] - } - } - } -} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..64831c1 --- /dev/null +++ b/index.html @@ -0,0 +1,120 @@ + + + + + Home - Able Player for WordPress Hook Doumentation + + + + + + + + + + +
+ +

Home

+
+ + + + + +
+ +
+

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +
+ + + + + + + + + +
+

Able Player for WordPress Plugin Hook Documentation

+

This resource is generated documentation on actions and filters found in Able Player for WordPress. Use the sidebar to browse and navigate.

+
+ + + + + + +
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/init.php b/init.php deleted file mode 100644 index dd29fb3..0000000 --- a/init.php +++ /dev/null @@ -1,29 +0,0 @@ -=10.0.0", - "npm": ">=6.9.0" - }, - "devDependencies": { - "@wordpress/env": "^4.1", - "jsdoc": "~3.6.3", - "wp-hookdoc": "^0.2.0" - }, - "scripts": { - "build:docs": "rm -rf docs/ && jsdoc -c hookdoc-conf.json", - "format-php": "wp-env run composer run-script format", - "prelint-php": "wp-env run composer 'install --no-interaction'", - "lint-php": "wp-env run composer run-script lint", - "pretest-php": "wp-env run composer 'install --no-interaction'", - "test-php": "wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/ableplayer-wordpress/phpunit.xml.dist --verbose'", - "wp-env": "wp-env" - } -} diff --git a/phpcs.xml.dist b/phpcs.xml.dist deleted file mode 100644 index c882889..0000000 --- a/phpcs.xml.dist +++ /dev/null @@ -1,20 +0,0 @@ - - - Generally-applicable sniffs for WordPress plugins - - - - - - - - - - . - - - - - */node_modules/* - */vendor/* - \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index fe1f300..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,14 +0,0 @@ - - - - ./tests/ - - - \ No newline at end of file diff --git a/scripts/linenumber.js b/scripts/linenumber.js new file mode 100644 index 0000000..8d52f7e --- /dev/null +++ b/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/scripts/prettify/Apache-License-2.0.txt b/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/scripts/prettify/lang-css.js b/scripts/prettify/lang-css.js new file mode 100644 index 0000000..041e1f5 --- /dev/null +++ b/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/scripts/prettify/prettify.js b/scripts/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p ableplayer_get_unique_id(), - 'youtube-id' => '', - 'youtube-desc-id' => '', - 'youtube-nocookie' => '', - 'vimeo-id' => '', - 'vimeo-desc-id' => '', - 'autoplay' => 'false', - 'preload' => 'auto', - 'loop' => 'false', - 'playsinline' => 'true', - 'hidecontrols' => 'false', - 'poster' => '', - 'width' => '', - 'height' => '', - 'heading' => '', - 'speed' => 'animals', - 'start' => '', - 'volume' => '', - 'seekinterval' => '', - 'nowplaying' => 'false', - 'skin' => '2020', - ), - $atts, - 'ableplayer' - ); - - // output. - if ( ! ( $all_atts['youtube-id'] || $all_atts['vimeo-id'] ) ) { - // required fields are missing. - return false; - } else { - // build a video player. - $o = '