Changeset 618262
- Timestamp:
- 10/28/2012 02:48:54 PM (13 years ago)
- Location:
- lazy-content-slider
- Files:
-
- 2 added
- 6 edited
- 1 copied
-
assets (added)
-
assets/banner-772x250.jpg (added)
-
tags/2.4 (copied) (copied from lazy-content-slider/trunk)
-
tags/2.4/lzcs.php (modified) (6 diffs)
-
tags/2.4/lzcs_admin.php (modified) (5 diffs)
-
tags/2.4/readme.txt (modified) (6 diffs)
-
trunk/lzcs.php (modified) (6 diffs)
-
trunk/lzcs_admin.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lazy-content-slider/tags/2.4/lzcs.php
r559497 r618262 23 23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 24 */ 25 25 add_action( 'admin_enqueue_scripts', 'add_jscss' ); 26 26 add_action('admin_menu', 'lzcs_add_admin_menu'); 27 27 add_action('wp_enqueue_scripts', 'add_jscss'); … … 71 71 } 72 72 add_filter('plugin_row_meta', 'lzcs_Plugin_Links',10,2); 73 add_option('lzcs_count'); 73 74 } 74 75 75 function lzcs_deactivate() { 76 76 delete_option('lzcs_cat'); 77 77 delete_option('lzcs_color'); 78 delete_option('lzcs_count'); 78 79 } 79 80 … … 90 91 } 91 92 92 function getDisplayPosts($limit = 4) 93 94 function getDisplayPosts() 93 95 { 96 $limit = get_option('lzcs_count')-1; 94 97 $posts = get_option('lzcs_cat'); 95 98 $args = array('category' => $posts ); … … 98 101 $output = array(); 99 102 foreach ($recent_posts as $post) { 100 setup_postdata($post);101 103 if (has_post_thumbnail($post['ID'])) { 102 104 $output[] = $post; … … 119 121 echo "<div id=\"featured\" >"; 120 122 echo "<ul class=\"ui-tabs-nav\">"; 121 122 123 foreach( $recent_posts as $recent ){ 123 setup_postdata($recent);124 124 $postid = $recent["ID"]; 125 126 $thumbnail = get_the_post_thumbnail( $postid, array(50, 50) ); 127 125 $thumbnail = get_the_post_thumbnail($postid, array(50,50) ); 128 126 ?> 129 127 <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $recent["ID"] ?> "> 130 <a href="#fragment-<?php echo $recent["ID"]; ?>"> 131 <?php echo $thumbnail ?> 132 <span><?php echo esc_attr($recent["post_title"]); ?></span> 133 </a> 128 <a href="#fragment-<?php echo $recent["ID"]; ?>"><?php echo $thumbnail ?><span><?php echo esc_attr($recent["post_title"]); ?></span></a> 134 129 </li> 135 130 <?php … … 145 140 $postexcerpt = string_limit_words($postexcerpt,15); 146 141 147 $largeimage = get_the_post_thumbnail( $postid, array(400,250));142 $largeimage = get_the_post_thumbnail($postid, array(400,250)); 148 143 ?> 149 144 <div id="fragment-<?php echo $recent["ID"] ?>" class="ui-tabs-panel" > -
lazy-content-slider/tags/2.4/lzcs_admin.php
r551362 r618262 17 17 */ 18 18 19 20 19 function register_lzcssettings() { 21 20 register_setting( 'lzcs_cat', 'lzcs' ); 22 21 register_setting( 'lzcs_color', 'lzcs' ); 22 register_setting( 'lzcs_count', 'lzcs' ); 23 23 } 24 24 … … 26 26 $myvariable = get_option('lzcs_cat'); 27 27 $lzcscolor = get_option('lzcs_color'); 28 $lzcscount = get_option('lzcs_count'); 28 29 if ($lzcscolor == "dark"){ 29 30 $selected = "checked"; … … 39 40 <table class="form-table"> 40 41 <tr valign="top"> 41 <th scope="row">Current Category</th> 42 <th scope="row"><?php $catid = get_option('lzcs_cat'); echo get_cat_name( $catid )?> </th> 43 <tr><td>Select new category</td></tr><tr> 44 <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => 0)); ?> 42 <?php $curcat = get_option('lzcs_cat'); ?> 43 <tr><td>Select new category</td> 44 <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => $curcat)); ?> 45 45 </td> 46 46 </tr> 47 47 <tr> 48 48 <td>Select Color</td> 49 </tr>50 49 <td> 51 50 <Input type = 'Radio' Name ='lzcs_color' value= 'light' <?php echo $selected_default ?>> Light 52 51 53 52 <Input type = 'Radio' Name ='lzcs_color' value= 'dark' <?php echo $selected ?>> Dark 53 54 </tr> 54 55 <tr> 55 56 <td>How many articles to display</td> 57 <td> 58 <select name ="lzcs_count"> 59 <option value="1" <?php if (get_option('lzcs_count') == 1) { echo "selected = selected"; } ?>>One</option> 60 <option value="2" <?php if (get_option('lzcs_count') == 2) { echo "selected = selected"; } ?>>Two</option> 61 <option value="3" <?php if (get_option('lzcs_count') == 3) { echo "selected = selected"; } ?>>Three</option> 62 <option value="4" <?php if (get_option('lzcs_count') == 4) { echo "selected = selected"; } ?>>Four</option> 63 <option value="5" <?php if (get_option('lzcs_count') == 5) { echo "selected = selected"; } ?>>Five</option> 64 </select> 65 </td> 56 66 </table> 57 67 … … 62 72 </form> 63 73 </div> 74 <div class="wrap"> 75 <?php if (function_exists("drawslider")){ drawslider(); }; ?> 76 </div> 77 <br><br> 64 78 <div class="wrap"> 65 79 <strong>How to use</strong><br> … … 87 101 $myvariable=$_POST["lzcs"]; 88 102 $lzcscolor=$_POST["lzcs_color"]; 103 $lzcscount=$_POST["lzcs_count"]; 89 104 update_option('lzcs_cat', $myvariable); 90 105 update_option('lzcs_color', $lzcscolor); 106 update_option('lzcs_count', $lzcscount); 91 107 draw_form(); 92 108 }else{ -
lazy-content-slider/tags/2.4/readme.txt
r559497 r618262 4 4 Tags: slider,content,featured,rotator 5 5 Requires at least: 2.9.2 6 Tested up to: 3. 3.27 Stable tag: 2. 36 Tested up to: 3.4.2 7 Stable tag: 2.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=25LDNVSUTHKAJ "Donate to support continued development") 35 35 36 Please rank this plugin at [Rate this plugin] http://wordpress.org/extend/plugins/lazy-content-slider/ 37 38 For [Support] http://wordpress.org/support/plugin/lazy-content-slider 39 36 40 == Installation == 37 41 1. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or … … 43 47 44 48 4. Add the shortcut code [lazyslider] to any page or post. 45 4a. add this "<?php if (function_exists("drawslider")){ drawslider(); }; ?>"to index.php or any page where you want to use the slider.49 4a. add this `<?php if (function_exists("drawslider")){ drawslider(); }; ?>` to index.php or any page where you want to use the slider. 46 50 47 51 5. Make sure the post has a featured image set. … … 62 66 Per request added a color option for darker themes 63 67 = 1.3.1 = 64 fixing svn68 Fixing svn 65 69 = 1.3.2 = 66 forgot to add dark style70 Forgot to add dark style 67 71 = 1.3.3 = 68 commiting files72 Commiting files 69 73 = 2.0 = 70 74 Removed font-family from css … … 76 80 = 2.3 = 77 81 Added hover pause 78 82 = 2.4 = 83 Added Preview 84 Added Article count 85 Cleaned up interface 79 86 80 87 … … 99 106 = 2.3 = 100 107 Added hover pause 108 = 2.4 = 109 Added Preview 110 Added Article count 111 Cleaned up interface -
lazy-content-slider/trunk/lzcs.php
r559497 r618262 23 23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24 24 */ 25 25 add_action( 'admin_enqueue_scripts', 'add_jscss' ); 26 26 add_action('admin_menu', 'lzcs_add_admin_menu'); 27 27 add_action('wp_enqueue_scripts', 'add_jscss'); … … 71 71 } 72 72 add_filter('plugin_row_meta', 'lzcs_Plugin_Links',10,2); 73 add_option('lzcs_count'); 73 74 } 74 75 75 function lzcs_deactivate() { 76 76 delete_option('lzcs_cat'); 77 77 delete_option('lzcs_color'); 78 delete_option('lzcs_count'); 78 79 } 79 80 … … 90 91 } 91 92 92 function getDisplayPosts($limit = 4) 93 94 function getDisplayPosts() 93 95 { 96 $limit = get_option('lzcs_count')-1; 94 97 $posts = get_option('lzcs_cat'); 95 98 $args = array('category' => $posts ); … … 98 101 $output = array(); 99 102 foreach ($recent_posts as $post) { 100 setup_postdata($post);101 103 if (has_post_thumbnail($post['ID'])) { 102 104 $output[] = $post; … … 119 121 echo "<div id=\"featured\" >"; 120 122 echo "<ul class=\"ui-tabs-nav\">"; 121 122 123 foreach( $recent_posts as $recent ){ 123 setup_postdata($recent);124 124 $postid = $recent["ID"]; 125 126 $thumbnail = get_the_post_thumbnail( $postid, array(50, 50) ); 127 125 $thumbnail = get_the_post_thumbnail($postid, array(50,50) ); 128 126 ?> 129 127 <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $recent["ID"] ?> "> 130 <a href="#fragment-<?php echo $recent["ID"]; ?>"> 131 <?php echo $thumbnail ?> 132 <span><?php echo esc_attr($recent["post_title"]); ?></span> 133 </a> 128 <a href="#fragment-<?php echo $recent["ID"]; ?>"><?php echo $thumbnail ?><span><?php echo esc_attr($recent["post_title"]); ?></span></a> 134 129 </li> 135 130 <?php … … 145 140 $postexcerpt = string_limit_words($postexcerpt,15); 146 141 147 $largeimage = get_the_post_thumbnail( $postid, array(400,250));142 $largeimage = get_the_post_thumbnail($postid, array(400,250)); 148 143 ?> 149 144 <div id="fragment-<?php echo $recent["ID"] ?>" class="ui-tabs-panel" > -
lazy-content-slider/trunk/lzcs_admin.php
r551362 r618262 17 17 */ 18 18 19 20 19 function register_lzcssettings() { 21 20 register_setting( 'lzcs_cat', 'lzcs' ); 22 21 register_setting( 'lzcs_color', 'lzcs' ); 22 register_setting( 'lzcs_count', 'lzcs' ); 23 23 } 24 24 … … 26 26 $myvariable = get_option('lzcs_cat'); 27 27 $lzcscolor = get_option('lzcs_color'); 28 $lzcscount = get_option('lzcs_count'); 28 29 if ($lzcscolor == "dark"){ 29 30 $selected = "checked"; … … 39 40 <table class="form-table"> 40 41 <tr valign="top"> 41 <th scope="row">Current Category</th> 42 <th scope="row"><?php $catid = get_option('lzcs_cat'); echo get_cat_name( $catid )?> </th> 43 <tr><td>Select new category</td></tr><tr> 44 <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => 0)); ?> 42 <?php $curcat = get_option('lzcs_cat'); ?> 43 <tr><td>Select new category</td> 44 <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => $curcat)); ?> 45 45 </td> 46 46 </tr> 47 47 <tr> 48 48 <td>Select Color</td> 49 </tr>50 49 <td> 51 50 <Input type = 'Radio' Name ='lzcs_color' value= 'light' <?php echo $selected_default ?>> Light 52 51 53 52 <Input type = 'Radio' Name ='lzcs_color' value= 'dark' <?php echo $selected ?>> Dark 53 54 </tr> 54 55 <tr> 55 56 <td>How many articles to display</td> 57 <td> 58 <select name ="lzcs_count"> 59 <option value="1" <?php if (get_option('lzcs_count') == 1) { echo "selected = selected"; } ?>>One</option> 60 <option value="2" <?php if (get_option('lzcs_count') == 2) { echo "selected = selected"; } ?>>Two</option> 61 <option value="3" <?php if (get_option('lzcs_count') == 3) { echo "selected = selected"; } ?>>Three</option> 62 <option value="4" <?php if (get_option('lzcs_count') == 4) { echo "selected = selected"; } ?>>Four</option> 63 <option value="5" <?php if (get_option('lzcs_count') == 5) { echo "selected = selected"; } ?>>Five</option> 64 </select> 65 </td> 56 66 </table> 57 67 … … 62 72 </form> 63 73 </div> 74 <div class="wrap"> 75 <?php if (function_exists("drawslider")){ drawslider(); }; ?> 76 </div> 77 <br><br> 64 78 <div class="wrap"> 65 79 <strong>How to use</strong><br> … … 87 101 $myvariable=$_POST["lzcs"]; 88 102 $lzcscolor=$_POST["lzcs_color"]; 103 $lzcscount=$_POST["lzcs_count"]; 89 104 update_option('lzcs_cat', $myvariable); 90 105 update_option('lzcs_color', $lzcscolor); 106 update_option('lzcs_count', $lzcscount); 91 107 draw_form(); 92 108 }else{ -
lazy-content-slider/trunk/readme.txt
r559497 r618262 4 4 Tags: slider,content,featured,rotator 5 5 Requires at least: 2.9.2 6 Tested up to: 3. 3.27 Stable tag: 2. 36 Tested up to: 3.4.2 7 Stable tag: 2.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=25LDNVSUTHKAJ "Donate to support continued development") 35 35 36 Please rank this plugin at [Rate this plugin] http://wordpress.org/extend/plugins/lazy-content-slider/ 37 38 For [Support] http://wordpress.org/support/plugin/lazy-content-slider 39 36 40 == Installation == 37 41 1. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or … … 43 47 44 48 4. Add the shortcut code [lazyslider] to any page or post. 45 4a. add this "<?php if (function_exists("drawslider")){ drawslider(); }; ?>"to index.php or any page where you want to use the slider.49 4a. add this `<?php if (function_exists("drawslider")){ drawslider(); }; ?>` to index.php or any page where you want to use the slider. 46 50 47 51 5. Make sure the post has a featured image set. … … 62 66 Per request added a color option for darker themes 63 67 = 1.3.1 = 64 fixing svn68 Fixing svn 65 69 = 1.3.2 = 66 forgot to add dark style70 Forgot to add dark style 67 71 = 1.3.3 = 68 commiting files72 Commiting files 69 73 = 2.0 = 70 74 Removed font-family from css … … 76 80 = 2.3 = 77 81 Added hover pause 78 82 = 2.4 = 83 Added Preview 84 Added Article count 85 Cleaned up interface 79 86 80 87 … … 99 106 = 2.3 = 100 107 Added hover pause 108 = 2.4 = 109 Added Preview 110 Added Article count 111 Cleaned up interface
Note: See TracChangeset
for help on using the changeset viewer.