Plugin Directory

Changeset 1599765


Ignore:
Timestamp:
02/20/2017 01:05:39 PM (9 years ago)
Author:
Sohelwpexpert
Message:

Update Some Debugging Code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • my-accordion/trunk/plugin-hook.php

    r1551536 r1599765  
    44Plugin URI: http://sohel.prowpexpert.com/
    55Description: This plugin will add an expand collapse accordion feature inside a post or page.
    6 Author: md sohel
     6Author: sohelwpexpert
    77Author URI: http://sohel.prowpexpert.com/
    8 Version: 1.0
     8Version: 1.1
    99*/
    1010
     
    2323*/
    2424/*Some Set-up*/
    25 define('WP_ACCORDION_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
     25define('PRO_ACCORDION_TOW_WORDPRESS', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
    2626
    2727
    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');
    3328
    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'));
     29function ms_wp_accordion_two_latest_jquery() {
     30/**
     31 * Register global styles & scripts.
     32 */
     33wp_register_style('wp-accordion-plugin-style', PRO_ACCORDION_TOW_WORDPRESS.'style.css');
    3634
    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');
     35wp_register_script('wp-accordion-plugin-script-active', PRO_ACCORDION_TOW_WORDPRESS.'main.js', array( 'jquery' ));
    4236
    4337
     38/**
     39 * Enqueue global styles & scripts.
     40 */
     41 
     42wp_enqueue_style('wp-accordion-plugin-style');
     43
     44wp_enqueue_script('wp-accordion-plugin-script-active');
     45wp_enqueue_script('jquery');
     46}
     47add_action( 'wp_enqueue_scripts', 'ms_wp_accordion_two_latest_jquery' );
    4448
    4549
     
    4852
    4953function 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");
    5256}
    5357
    54 function wpaccordion_button_js($plugin_array) {
     58function wpaccordion_two_button_js($plugin_array) {
    5559    $plugin_array['accordianwptutsa'] = plugins_url('accordian-button.js', __FILE__);
    5660    return $plugin_array;
    5761}
    5862
    59 function wpaccordionb($buttons) {
     63function wpaccordionb_two($buttons) {
    6064    array_push ($buttons, 'sohelaccordiontriger');
    6165    return $buttons;
Note: See TracChangeset for help on using the changeset viewer.