-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasayake.php
31 lines (28 loc) · 1.22 KB
/
asayake.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* Plugin Name: Asayake Player
* Plugin URI: https://www.matdombrock.com/asayake-player/
* Description: A simple, modular and highly customizable HTML 5 audio player for WordPress with support for playlists.
* Version: 1.0.5
* Author: Mathieu Dombrock
* Author URI: https://matdombrock.com
*/
add_action( 'wp_enqueue_scripts', 'aplayer_scripts' );
add_action( 'admin_enqueue_scripts', 'aplayer_admin_scripts' );
function aplayer_scripts(){
wp_enqueue_script( 'aplayer-js', plugins_url( '/js/player.js', __FILE__ ));
wp_localize_script( 'aplayer-js', 'phpdata', array(
'pluginsUrl' => plugins_url('',__FILE__),
));
wp_enqueue_style( 'aplayer-css', plugins_url( '/css/player.css', __FILE__ ));
}
function aplayer_admin_scripts(){
wp_enqueue_script( 'aplayer-scjs', plugins_url( '/js/scGenerator.js', __FILE__ ));
wp_enqueue_style( 'aplayer-css', plugins_url( '/css/scGenerator.css', __FILE__ ));
}
include( plugin_dir_path( __FILE__ ) . 'scGenerator.php');
include( plugin_dir_path( __FILE__ ) . 'shortcodes.php');
add_shortcode('aplayer', 'aplayerShortcode');
add_shortcode('aplayer-playlist', 'aplayerShortcodePlaylist');
add_shortcode('aplayer-playlist-item', 'aplayerShortcodePlaylistItem');
?>