Changeset 687192
- Timestamp:
- 03/25/2013 09:09:59 PM (13 years ago)
- Location:
- wp-parallax-content-slider/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (5 diffs)
-
wp-parallax-content-slider.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-parallax-content-slider/trunk/README.txt
r685846 r687192 6 6 Requires at least: 3.0 7 7 Tested up to: 3.5.1 8 Stable tag: 0.9.38 Stable tag: trunk 9 9 10 10 A customizable JQuery content slider with CSS3 animations and parallax effects. … … 20 20 It is very easy to configure the plugin as it adds automatically an admin page in Wordpress administration section. You will be able to configure : 21 21 22 * New in v0.9.2 : The type of content to display (posts, pages, both); 22 * New in v0.9.4 : Filter category in a shortcode parameter (eg. [parallaxcontentslider cat="2"] or [parallaxcontentslider cat="2,5"]); 23 * The type of content to display (posts, pages, both); 23 24 * The number of slides to display; 24 25 * The auto-switch mode; … … 34 35 * Add extra parameters to the admin panel (Sizes, colors,...); 35 36 * Better touch support; 36 * Enbale the choice to use featured images in the slides in dynamic mode;37 * A new custom post type to manage static slides in the Wordpress admin panel 37 38 * and many more... 38 39 … … 107 108 == Changelog == 108 109 110 = 0.9.4 = 111 112 * Support for a new shortcode parameter to filter on one or more categories 113 109 114 = 0.9.3 = 110 111 Please don't forgive to backup your customized files and styles before doing an automatic update!112 115 113 116 * New translations (Georgian and Russian) thanks to Temur Danelia … … 115 118 * Database optimization: Settings are added in the DB into an array instead of many fields (Old settings will be retrieved before deletion) 116 119 * WPML support: Fixed post queries to improve WPML support 117 118 Notice: This would be the last release before a great code refactoring! V1.0 should really rocks ;)119 120 120 121 = 0.9.2 = -
wp-parallax-content-slider/trunk/wp-parallax-content-slider.php
r685846 r687192 6 6 * Author URI: http://jltweb.info/ 7 7 * Author: Julien Le Thuaut (MBA Multimedia) 8 * Version: 0.9. 38 * Version: 0.9.4 9 9 * Licence: GPLv2 10 10 */ … … 125 125 126 126 /** 127 * Enable shortcode : [parallaxcontentslider] 127 * Enable shortcodes : 128 * [parallaxcontentslider] 129 * [parallaxcontentslider cat="2"] 130 * [parallaxcontentslider cat="2,5"] 128 131 */ 129 132 public function parallaxcontentslider_shortcode_call( $atts ){ 130 get_wp_parallax_content_slider(); 131 // TODO: Add attributes to customize the slider? 133 // Extracting parameters 134 extract( shortcode_atts( array ( 135 'categ' => '', 136 ), $atts ) ); 137 138 get_wp_parallax_content_slider( $categ ); 132 139 } 133 140 … … 135 142 * Return the plugin HTML code for output 136 143 */ 137 public function get_parallax_content_slider( )144 public function get_parallax_content_slider( $category = '' ) 138 145 { 146 147 139 148 // Retrieving plugin parameters (user choices or default values) 140 149 $prlx_slider_settings = get_option( 'prlx_slider_settings'); 150 141 151 $prlx_slider_mode = $prlx_slider_settings['mode']; 142 152 $prlx_slider_theme = $prlx_slider_settings['theme']; … … 172 182 173 183 $typ = ''; 174 switch ( $prlx_slider_content_type) {184 switch ( $prlx_slider_content_type ) { 175 185 case "both": 176 186 $typ = array('post', 'page'); … … 184 194 185 195 $cat = ''; 186 if ($prlx_slider_category_filter) 196 if ( ! empty( $category ) ) 197 { 198 // Mode is forced to 'dynamic' 199 $prlx_slider_mode = 'dynamic'; 200 // Get category filter from shortcode attribute (i.e. function 'category' parameter) 201 $cat = $category; 202 } 203 elseif ($prlx_slider_category_filter) 187 204 { 188 205 $cat = $prlx_slider_categories; … … 192 209 'orderby' => $prlx_sort, 193 210 'order' => $prlx_order, 194 'numberposts' => $prlx_slider_nb_articles,195 'cat ' => $cat,196 'suppress_filters' =>0 ); // Added for WPML support211 'numberposts' => $prlx_slider_nb_articles, 212 'category' => $cat, 213 'suppress_filters' => 0 ); // Added for WPML support 197 214 198 215 $myposts = get_posts( $args ); … … 202 219 203 220 // TODO: remove this code in production mode 204 //echo $debug = "prlx_slider_content_type : " . $prlx_slider_content_type. "<br/>";221 echo $debug = "cat : " . $cat . " | " . $category . "<br/>"; 205 222 206 223 $outputDynamic = "<div id='da-slider' class='da-slider'>\n"; … … 688 705 $wp_parallax_content_slider = new WpParallaxContentSlider(); 689 706 690 function get_wp_parallax_content_slider( )707 function get_wp_parallax_content_slider( $cat_filter = '' ) 691 708 { 692 709 global $wp_parallax_content_slider; 693 echo $wp_parallax_content_slider->get_parallax_content_slider( );710 echo $wp_parallax_content_slider->get_parallax_content_slider( $cat_filter ); 694 711 } 695 712
Note: See TracChangeset
for help on using the changeset viewer.