Changeset 1668908
- Timestamp:
- 06/01/2017 04:10:58 PM (9 years ago)
- Location:
- dg-accordian
- Files:
-
- 2 added
- 1 deleted
- 3 edited
-
dg-accordian.php (modified) (2 diffs)
-
dg-accordian.php-tmp (deleted)
-
public/class-dg-accordian-public.php (modified) (4 diffs)
-
public/class-dg-accordian-public.php-tmp (added)
-
public/partials/dg-accordian-public-display.php (modified) (2 diffs)
-
public/partials/dg-accordian-public-display.php-tmp (added)
Legend:
- Unmodified
- Added
- Removed
-
dg-accordian/dg-accordian.php
r1667998 r1668908 10 10 * 11 11 * @link http://dinesh-ghimire.com.np/ 12 * @since 1.0. 012 * @since 1.0.1 13 13 * @package Dg_Accordian 14 14 * … … 65 65 * not affect the page life cycle. 66 66 * 67 * @since 1.0. 067 * @since 1.0.1 68 68 */ 69 69 function run_dg_accordian() { -
dg-accordian/public/class-dg-accordian-public.php
r1667988 r1668908 5 5 * 6 6 * @link http://projects.dinesh-ghimire.com.np/ 7 * @since 1.0. 07 * @since 1.0.1 8 8 * 9 9 * @package Dg_Accordian … … 41 41 private $version; 42 42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 1.0.047 * @param string $plugin_name The name of the plugin.48 * @param string $version The version of this plugin.49 */50 public function __construct( $plugin_name, $version ) {43 /** 44 * Initialize the class and set its properties. 45 * 46 * @since 1.0.0 47 * @param string $plugin_name The name of the plugin. 48 * @param string $version The version of this plugin. 49 */ 50 public function __construct( $plugin_name, $version ) { 51 51 52 $this->plugin_name = $plugin_name;53 $this->version = $version;54 $this->shortcode();52 $this->plugin_name = $plugin_name; 53 $this->version = $version; 54 $this->shortcode(); 55 55 56 }56 } 57 57 58 58 /** … … 63 63 public function enqueue_styles() { 64 64 65 /**66 * This function is provided for demonstration purposes only.67 *68 * An instance of this class should be passed to the run() function69 * defined in Dg_Accordian_Loader as all of the hooks are defined70 * in that particular class.71 *72 * The Dg_Accordian_Loader will then create the relationship73 * between the defined hooks and the functions defined in this74 * class.75 */65 /** 66 * This function is provided for demonstration purposes only. 67 * 68 * An instance of this class should be passed to the run() function 69 * defined in Dg_Accordian_Loader as all of the hooks are defined 70 * in that particular class. 71 * 72 * The Dg_Accordian_Loader will then create the relationship 73 * between the defined hooks and the functions defined in this 74 * class. 75 */ 76 76 77 wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui-1.12.1.css', array(), $this->version, 'all' );78 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/dg-accordian-public.css', array(), $this->version, 'all' );77 wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui-1.12.1.css', array(), $this->version, 'all' ); 78 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/dg-accordian-public.css', array(), $this->version, 'all' ); 79 79 80 80 } … … 87 87 public function enqueue_scripts() { 88 88 89 /**90 * This function is provided for demonstration purposes only.91 *92 * An instance of this class should be passed to the run() function93 * defined in Dg_Accordian_Loader as all of the hooks are defined94 * in that particular class.95 *96 * The Dg_Accordian_Loader will then create the relationship97 * between the defined hooks and the functions defined in this98 * class.99 */89 /** 90 * This function is provided for demonstration purposes only. 91 * 92 * An instance of this class should be passed to the run() function 93 * defined in Dg_Accordian_Loader as all of the hooks are defined 94 * in that particular class. 95 * 96 * The Dg_Accordian_Loader will then create the relationship 97 * between the defined hooks and the functions defined in this 98 * class. 99 */ 100 100 101 wp_enqueue_script( 'jquery', plugin_dir_url( __FILE__ ) . 'js/jquery-1.12.4.js', array( ), $this->version, false ); 102 wp_enqueue_script( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'js/jquery-ui-1.12.1.js', array( 'jquery' ), $this->version, false ); 103 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/dg-accordian-public.js', array( 'jquery-ui' ), $this->version, false ); 104 105 } 106 107 public function shortcode(){ 108 /** 109 * The class responsible for defining Accordian Shortcode. 110 */ 111 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-dg-accordian-shortcode.php'; 112 113 } 101 wp_enqueue_script( 'jquery', plugin_dir_url( __FILE__ ) . 'js/jquery-1.12.4.js', array( ), $this->version, false ); 102 wp_enqueue_script( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'js/jquery-ui-1.12.1.js', array( 'jquery' ), $this->version, false ); 103 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/dg-accordian-public.js', array( 'jquery-ui' ), $this->version, false ); 114 104 115 105 } 116 106 107 public function shortcode(){ 108 /** 109 * The class responsible for defining Accordian Shortcode. 110 */ 111 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-dg-accordian-shortcode.php'; 112 113 } 114 115 } 116 -
dg-accordian/public/partials/dg-accordian-public-display.php
r1667988 r1668908 6 6 * 7 7 * @link http://projects.dinesh-ghimire.com.np/ 8 * @since 1.0. 08 * @since 1.0.1 9 9 * 10 10 * @package Dg_Accordian … … 21 21 <div id="accordion"> 22 22 <?php while($query->have_posts()):$query->the_post(); ?> 23 <h3 class="post-title"><?php the_title(); ?></h3>24 <div class="post-excerpt post-<?php echo get_the_ID(); ?> ">25 <?php the_excerpt(); ?>26 </div>23 <h3 class="post-title"><?php the_title(); ?></h3> 24 <div class="post-excerpt post-<?php echo get_the_ID(); ?> "> 25 <?php the_excerpt(); ?> 26 </div> 27 27 <?php endwhile; ?> 28 28 </div>
Note: See TracChangeset
for help on using the changeset viewer.