Plugin Directory

Changeset 1920776


Ignore:
Timestamp:
08/07/2018 06:06:42 AM (8 years ago)
Author:
zingtree
Message:

Added show_history, show_breadcrumbs options

File:
1 copied

Legend:

Unmodified
Added
Removed
  • zingtree/trunk/zingtree.php

    r1708798 r1920776  
    44Plugin URI: http://wordpress.org/plugins/zingtree/
    55Description: [zingtree name="Zingtree" id="123456789" ] shortcode
    6 Version: 4.0
     6Version: 5.0
    77Author: Zingtree
    88Author URI: https://zingtree.com
     
    1818{
    1919    // Register the script like this for a plugin:
    20     wp_register_script( 'zt-popup-modal', plugins_url( '/js/zt-popup-modal.js', __FILE__ ) );
     20    wp_register_script( 'zt-popup-modal', plugins_url( '/js/zt-popup-modal.js', __FILE__ ), array( 'jquery' ), false, true );
    2121    // Enqueue the script:
    2222    wp_enqueue_script( 'zt-popup-modal' );
     
    5656        'button_color' => '#314D68',        // background color for popup buttons
    5757        'button_text' => 'Open Zingtree',   // the text of the button
     58       
     59// version 5.0
     60
     61        'show_history' => '',          // =1 to embed history
     62        'show_breadcrumbs' => '',      // =1 to embed breadcrumbs
     63
     64       
    5865    );
    5966
     
    7885    if ($persist_names != '')
    7986        $parms .= "&persist_names=$persist_names&persist_node_ids=$persist_node_ids&disable_scroll=1" ;
     87
     88
     89// show history or breadcrumbs
     90
     91    if ($atts['show_history'] == "yes")
     92        $parms .= "&embed_history=1" ;
     93
     94    if ($atts['show_breadcrumbs'] == "yes")
     95        $parms .= "&embed_breadcrumbs=1" ;
    8096
    8197
Note: See TracChangeset for help on using the changeset viewer.