Changeset 2399576
- Timestamp:
- 10/14/2020 03:20:46 PM (5 years ago)
- Location:
- slick-engagement/trunk
- Files:
-
- 4 edited
-
SlickEngagement_Plugin.php (modified) (3 diffs)
-
SlickEngagement_Widgets.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
slick-engagement.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
slick-engagement/trunk/SlickEngagement_Plugin.php
r2379103 r2399576 114 114 // add_shortcode('slick-next-up', array($this, 'doNextUpShortcode')); 115 115 add_shortcode('slick-story', array($this, 'doSlickStoryShortcode')); 116 add_shortcode('slick-grid', array($this, 'doSlickGridShortcode')); 116 117 117 118 // Register AJAX hooks … … 148 149 // return '<div class="slick-widget slick-next-up slick-shortcode"></div>'; 149 150 // } 151 152 public function doSlickGridShortcode($attrs, $content, $tag) 153 { 154 extract(shortcode_atts(array('id' => ''), $attrs)); 155 if (isset($id)) { 156 return '<div class="slick-content-grid" data-config="' . trim($id) . '"></div>' . "\n"; 157 } else { 158 return '<div class="slick-content-grid"></div>' . "\n"; 159 } 160 } 150 161 151 162 public function doSlickStoryShortcode($attrs, $content, $tag) … … 239 250 global $post; 240 251 echo "\n"; 241 echo '<meta property="slick:wpversion" content="1.1. 7" />' . "\n";252 echo '<meta property="slick:wpversion" content="1.1.8" />' . "\n"; 242 253 $siteCode = trim($this->getOption('SiteCode')); 243 254 if ($siteCode) { -
slick-engagement/trunk/SlickEngagement_Widgets.php
r2284281 r2399576 109 109 } 110 110 111 class Slick_Grid_Widget extends WP_Widget 112 { 113 /** 114 * based on https://www.wpexplorer.com/create-widget-plugin-wordpress/ 115 116 * The widget simply creates a container that the Slick script will populate 117 * after the page loads with the Slick grid widget. 118 */ 119 120 public function __construct() 121 { 122 parent::__construct( 123 'slick_grid_widget', 124 __('Slick Grid Widget', 'text_domain'), 125 array('customize_selective_refresh' => true) 126 ); 127 } 128 129 public function form($instance) 130 { 131 $defaults = array( 132 'title' => '', 133 'id' => '', 134 ); 135 extract(wp_parse_args((array) $instance, $defaults)); 136 ?> 137 <?php // Widget Title ?> 138 <p> 139 <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Widget Title', 'text_domain');?></label> 140 <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> 141 </p> 142 <p> 143 <label for="<?php echo esc_attr($this->get_field_id('id')); ?>"><?php _e('Slickstream ID', 'text_domain');?></label> 144 <input class="widefat" id="<?php echo esc_attr($this->get_field_id('id')); ?>" name="<?php echo esc_attr($this->get_field_name('id')); ?>" type="text" value="<?php echo esc_attr($id); ?>" /> 145 </p> 146 <?php 147 } 148 149 public function update($new_instance, $old_instance) 150 { 151 $instance = $old_instance; 152 $instance['title'] = isset($new_instance['title']) ? wp_strip_all_tags($new_instance['title']) : ''; 153 $instance['id'] = isset($new_instance['id']) ? wp_strip_all_tags($new_instance['id']) : ''; 154 return $instance; 155 } 156 157 public function widget($args, $instance) 158 { 159 extract($args); 160 $title = isset($instance['title']) ? apply_filters('widget_title', $instance['title']) : ''; 161 $id = $instance['id']; 162 echo $before_widget; 163 if ($title) { 164 echo $before_title . $title . $after_title; 165 } 166 if (isset($id)) { 167 echo '<div class="slick-content-grid" data-config="' . trim($id) . '"></div>' . "\n"; 168 } else { 169 echo '<div class="slick-content-grid"></div>' . "\n"; 170 } 171 echo $after_widget; 172 } 173 } 174 111 175 function register_slick_widgets() 112 176 { 113 177 register_widget('Slick_FilmStrip_Widget'); 114 178 register_widget('Slick_Game_Widget'); 179 register_widget('Slick_Grid_Widget'); 115 180 } 116 181 -
slick-engagement/trunk/readme.txt
r2379103 r2399576 7 7 Requires at least: 4.0 8 8 Tested up to: 5.4.2 9 Stable tag: 1.1. 79 Stable tag: 1.1.8 10 10 11 11 Increase pageviews and delight visitors with fast and responsive site search, beautiful content discovery tools and more. … … 104 104 = 1.1.7 105 105 - Revised shortcode for story-viewer 106 107 = 1.1.8 108 - Added widget and shortcode support for content-grid widget -
slick-engagement/trunk/slick-engagement.php
r2379103 r2399576 3 3 Plugin Name: Slickstream Search and Engagement 4 4 Plugin URI: https://slickstream.com/getting-started 5 Version: 1.1. 75 Version: 1.1.8 6 6 Author: Slickstream 7 7 Author URI: https://slickstream.com
Note: See TracChangeset
for help on using the changeset viewer.