Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer.

Overview

Description

Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer.

Support [audio] tag, compatible with AMP.

Requirement

  • WordPress
  • APlayer

How To Using

Put class.aplayer.php into your theme folder, then put this following code to your theme functions.php:

class_exists('APlayerHandle') or require(get_template_directory() . '/class.aplayer.php');
$aplayer = new APlayerHandle;
$aplayer->init();

Shortcode example:

[aplayer mutex="true" autoplay="true" theme="#b7daff" preload="auto" mode="circulation" maxheight="500"]
[aplayer_trac title="あっちゅ~ま青春!" author="七森中☆ごらく部" src="http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3" pic="http://devtest.qiniudn.com/あっちゅ~ま青春!.jpg"]
[aplayer_trac title="回レ!雪月花" author="小倉唯" src="http://devtest.qiniudn.com/回レ!雪月花.mp3" pic="http://devtest.qiniudn.com/回レ!雪月花.jpg"]
[/aplayer]

Audio tag shortcode example:

[audio src="http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3" title="あっちゅ~ま青春!" author="七森中☆ごらく部"]

More information: https://kn007.net/topics/wordpress-blog-use-new-html5-player-aplayer/

Thank you list

DIYgod, the author of APlayer. Github repo

About

kn007's blog


中文说明

轻松的在WordPress使用上APlayer,短代码形式调用。

支持原生[audio]标签,不影响AMP模式。

依赖组件

  • WordPress
  • APlayer

如何使用

class.aplayer.php放在你主题的根目录下,然后将下面代码放在functions.php里即可。

class_exists('APlayerHandle') or require(get_template_directory() . '/class.aplayer.php');
$aplayer = new APlayerHandle;
$aplayer->init();

短代码调用方式举例:

[aplayer mutex="true" autoplay="true" theme="#b7daff" preload="auto" mode="circulation" maxheight="500"]
[aplayer_trac title="あっちゅ~ま青春!" author="七森中☆ごらく部" src="http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3" pic="http://devtest.qiniudn.com/あっちゅ~ま青春!.jpg"]
[aplayer_trac title="回レ!雪月花" author="小倉唯" src="http://devtest.qiniudn.com/回レ!雪月花.mp3" pic="http://devtest.qiniudn.com/回レ!雪月花.jpg"]
[/aplayer]

Audio短代码调用方式举例:

[audio src="http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3" title="あっちゅ~ま青春!" author="七森中☆ごらく部"]

详细说明见:https://kn007.net/topics/wordpress-blog-use-new-html5-player-aplayer/

特别鸣谢

感谢DIYgod写的APlayer,Github项目地址

关于作者

kn007的个人博客

You might also like...
WordPress & TypeScript. Simple starter template for WordPress projects

WordPress & TypeScript. Simple starter template for WordPress projects that want to use TypeScript in combination with @wordpress/scripts

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library.

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library. Import Jamendo playlists with tracks in WordPress posts.

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API

Wordpress XML-RPC PHP Client A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API Created by Hieu Le MIT licensed. Cur

Authentication for WPGraphQL using JWT (JSON Web Tokens)
Authentication for WPGraphQL using JWT (JSON Web Tokens)

WPGraphQL JWT Authentication This plugin extends the WPGraphQL plugin to provide authentication using JWT (JSON Web Tokens) JSON Web Tokens are an ope

WPGraphQL Extension: Adds "meta_query" support to postObject connection queries using WP_Query

WPGraphQL Meta Query This plugin adds Meta_Query support to the WP GraphQL Plugin for postObject query args. Why is this an extension and not part of

Send emails via mutation using WpGraphQl
Send emails via mutation using WpGraphQl

WPGraphQL Send Email Plugin One of the simple things about a traditional WordPress sites is sending emails, this plugin makes it easy to do this via a

Adds `tax_query` support to postObject connection queries using WP_Query

WPGraphQL Tax Query This plugin adds Tax_Query support to the WP GraphQL Plugin for postObject query args (WP_Query). Pre-req's Using this plugin requ

This Plugin is used to install and activate multiple plugins in one go. I was facing problem uploading plugins one by one so I developed this to solve my problem. Hope you will enjoy using this plugin.

=== Bulk Plugin Installer === Contributors: jawadarshad Donate link: https://jawadarshad.io/ Tags: bulk plugin installer, import multiple plugins, up

The PHP Shortcode Hunter, nested shortcodes and custom shortcodes

shortcode-hunter The Shortcode Hunter - PHP shortcode class, nested shortcodes and custom shortcodes Installation composer require enesakarsu/shortcod

Enes Akarsu 1 Nov 20, 2021
A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

WP Bootstrap 3.3k Jan 5, 2023
🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!

WP React Starter: WordPress React Boilerplate DEPRECATED: WP React Starter was a "research project" of devowl.io for the development of our WordPress

devowl.io GmbH 344 Jan 1, 2023
A completely BLANK WordPress theme for using with Oxygen Builder.

A completely BLANK WordPress "theme" to use with Oxygen Builder. After installation and activation delete all other themes. This theme will never need to be updated.

WebSchematix 10 Aug 26, 2022
WordPress plugin boilerplate using React and Block Editor components.

PluginWP Foundation ?? UNDER DEVELOPMENT ?? This code serves as a starting point for building a WordPress plugin using React and the block editor comp

JR Tashjian 5 Dec 8, 2022
A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities.

Awesome WordPress A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities. Inspired by bayand

Dropndot Limited 91 Dec 26, 2022
The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Pronamic 1 Oct 19, 2021
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Waren Gonzaga 3 Nov 15, 2021
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.

Twenty Twenty-Two Welcome to the development repository for the default theme that will launch with WordPress 5.9. About Twenty Twenty-Two is designed

null 414 Nov 28, 2022
WordPress plugin that lets you use Discourse as the community engine for a WordPress blog

WP Discourse Note: the wp-discourse plugin requires >= PHP-5.4.0. The WP Discourse plugin acts as an interface between your WordPress site and your Di

Discourse 497 Dec 10, 2022