Changeset 1599765
- Timestamp:
- 02/20/2017 01:05:39 PM (9 years ago)
- File:
-
- 1 edited
-
my-accordion/trunk/plugin-hook.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
my-accordion/trunk/plugin-hook.php
r1551536 r1599765 4 4 Plugin URI: http://sohel.prowpexpert.com/ 5 5 Description: This plugin will add an expand collapse accordion feature inside a post or page. 6 Author: md sohel6 Author: sohelwpexpert 7 7 Author URI: http://sohel.prowpexpert.com/ 8 Version: 1. 08 Version: 1.1 9 9 */ 10 10 … … 23 23 */ 24 24 /*Some Set-up*/ 25 define(' WP_ACCORDION_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );25 define('PRO_ACCORDION_TOW_WORDPRESS', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' ); 26 26 27 27 28 /* Adding Latest jQuery from Wordpress */29 function wp_accordion_latest_jquery() {30 wp_enqueue_script('jquery');31 }32 add_action('init', 'wp_accordion_latest_jquery');33 28 34 /* Adding plugin javascript Main file */ 35 //wp_enqueue_script('wp-accordion-plugin-main', WP_ACCORDION_PLUGIN_PATH.'js/ppm-accordion-main.js', array('jquery')); 29 function ms_wp_accordion_two_latest_jquery() { 30 /** 31 * Register global styles & scripts. 32 */ 33 wp_register_style('wp-accordion-plugin-style', PRO_ACCORDION_TOW_WORDPRESS.'style.css'); 36 34 37 /* Adding plugin javascript active file */ 38 wp_enqueue_script('wp-accordion-plugin-script-active', WP_ACCORDION_PLUGIN_PATH.'main.js', array('jquery'), '1.0', false); 39 40 /* Adding Plugin custm CSS file */ 41 wp_enqueue_style('wp-accordion-plugin-style', WP_ACCORDION_PLUGIN_PATH.'style.css'); 35 wp_register_script('wp-accordion-plugin-script-active', PRO_ACCORDION_TOW_WORDPRESS.'main.js', array( 'jquery' )); 42 36 43 37 38 /** 39 * Enqueue global styles & scripts. 40 */ 41 42 wp_enqueue_style('wp-accordion-plugin-style'); 43 44 wp_enqueue_script('wp-accordion-plugin-script-active'); 45 wp_enqueue_script('jquery'); 46 } 47 add_action( 'wp_enqueue_scripts', 'ms_wp_accordion_two_latest_jquery' ); 44 48 45 49 … … 48 52 49 53 function sohelaccordion_button() { 50 add_filter ("mce_external_plugins", "wpaccordion_ button_js");51 add_filter ("mce_buttons", "wpaccordionb ");54 add_filter ("mce_external_plugins", "wpaccordion_two_button_js"); 55 add_filter ("mce_buttons", "wpaccordionb_two"); 52 56 } 53 57 54 function wpaccordion_ button_js($plugin_array) {58 function wpaccordion_two_button_js($plugin_array) { 55 59 $plugin_array['accordianwptutsa'] = plugins_url('accordian-button.js', __FILE__); 56 60 return $plugin_array; 57 61 } 58 62 59 function wpaccordionb ($buttons) {63 function wpaccordionb_two($buttons) { 60 64 array_push ($buttons, 'sohelaccordiontriger'); 61 65 return $buttons;
Note: See TracChangeset
for help on using the changeset viewer.