wp.a11y.speak() is called. Requires a browser that supports speechSynthesis (currently Chrome and Safari).
* Version: 0.1
* Author: Weston Ruter, XWP
* Author URI: https://xwp.co/
* License: GPLv2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: a11y-speech-synthesis
* Domain Path: /languages
*
* Copyright (c) 2015 XWP (https://xwp.co/)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ( version_compare( phpversion(), '5.3', '>=' ) ) {
require_once __DIR__ . '/php/class-plugin-base.php';
require_once __DIR__ . '/php/class-plugin.php';
$class_name = '\A11ySpeechSynthesis\Plugin';
$GLOBALS['a11y_speech_synthesis_plugin'] = new $class_name();
} else {
/** Show error message. */
function a11y_speech_synthesis_php_version_error() {
printf( '
%s