Changeset 339811
- Timestamp:
- 02/02/2011 09:20:15 AM (15 years ago)
- Location:
- all-in-one-slideshow/trunk
- Files:
-
- 2 edited
-
all-in-one-slideshow.php (modified) (12 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
all-in-one-slideshow/trunk/all-in-one-slideshow.php
r317955 r339811 4 4 Plugin URI: http://www.sramekdesign.com/wordpress/plugins/all-in-one-slideshow/ 5 5 Description: All-In-One Slideshow plugin implements jCycle, Easing and Cufon scripts into the highly customizable slideshow gallery. You can combine 27 transition and 8 easing effects! The plugin comes with package of 8 cufon fonts. You can easlily add new fonts. Choose between arrow and numbered navigation. Or use both at once. Try out how easy it is to customize this slideshow gallery without knowledge of programming. 6 Version: 1. 2.16 Version: 1.3 7 7 Author: Tom Sramek 8 8 Author URI: http://www.sramekdesign.com/ … … 111 111 // define our defaults (filterable) 112 112 $aio_slideshow_defaults = apply_filters('aio_slideshow_defaults', array( 113 'on_posts' => '', 114 'on_pages' => '', 115 'on_archive' => 1, 113 116 'rotate' => 1, 114 117 'effect' => 'fade', … … 547 550 <div class="inside"> 548 551 <table class="form-table"> 552 <tr><th scope="row">Show slideshow on these single posts:</th> 553 <td> 1. Leave this field empty if you want to load the slideshow's scripts / write CSS styles into the header on all single posts.<br /> 554 2. Type in "1,2,3" if you want to load slidesow on single posts with IDs 1,2 and 3.<br /> 555 556 <input type="text" name="aio_slideshow_settings[on_posts]" value="<?php echo $options['on_posts'] ?>" /> 557 </td></tr> 558 <tr><th scope="row">Show slideshow on these pages:</th> 559 <td> 1. Leave this field empty if you want to load the slideshow's scripts / write CSS styles into the header on all pages.<br /> 560 2. Type in "1,2,3" if you want to load slideshow on pages with IDs 1,2 and 3.<br /> 561 562 <input type="text" name="aio_slideshow_settings[on_pages]" value="<?php echo $options['on_pages'] ?>" /> 563 </td></tr> 564 565 <tr valign="top"><th scope="row">Show on archive pages</th> 566 <td><input name="aio_slideshow_settings[on_archive]" type="checkbox" value="1" <?php checked('1', $options['on_archive']); ?> /> <label for="aio_slideshow_settings[on_archive]">Check this box if you want to show your slideshow on archive pages ( is_home, is_archive(), is_author(), is_category() )</td> 567 </tr> 549 568 550 569 <tr valign="top"><th scope="row">Transition Enabled</th> … … 795 814 796 815 </div><!-- /#poststuff --> 797 816 817 <div style="clear: both;"></div> 818 <p class="submit"><input type="submit" class="button-primary" value="<?php _e('Save Settings') ?>" /></p> 798 819 799 820 </div><!-- /.wrap --> … … 804 825 <div class="clear"></div> 805 826 <!-- The Reset Option --> 806 <form method="post" action="options.php" >827 <form method="post" action="options.php" style="margin: -48px 0 0 150px;" > 807 828 <?php settings_fields('aio_slideshow_settings'); ?> 808 829 <?php global $aio_slideshow_defaults; // use the defaults ?> … … 826 847 // this function sanitizes our settings data for storage 827 848 function aio_slideshow_settings_validate($input) { 849 $input['on_archive'] = ($input['on_archive'] == 1 ? 1 : 0); 828 850 $input['rotate'] = ($input['rotate'] == 1 ? 1 : 0); 829 851 $input['effect'] = wp_filter_nohtml_kses($input['effect']); … … 865 887 function aio_slideshow($args = array(), $content = null) { 866 888 global $aio_slideshow_settings, $aio_slideshow_images, $value; 867 889 868 890 // possible future use 869 891 $args = wp_parse_args($args, $aio_slideshow_settings); … … 903 925 echo '<div id="prevnext"><a id="prev" href="#prevslide">Prev</a> <a id="next" href="#nextslide">Next</a></div>'; 904 926 echo '</div>'.$newline; 927 echo $aio_slideshow_settings['on_pages']; 905 928 } 906 929 … … 918 941 } 919 942 920 add_action('wp_print_scripts', 'aio_slideshow_scripts'); 943 921 944 function aio_slideshow_scripts() { 922 945 global $aio_slideshow_settings; … … 931 954 } 932 955 933 add_action('wp_footer', 'aio_slideshow_args', 15); 956 934 957 function aio_slideshow_args() { 935 958 global $aio_slideshow_settings; ?> … … 1006 1029 <?php endif; ?> 1007 1030 1008 <?php } 1009 1010 add_action( 'wp_head', 'aio_slideshow_style' ); 1011 function aio_slideshow_style() {1031 <?php } // end of aio_slideshow_args() 1032 1033 function aio_slideshow_style() { 1034 1012 1035 global $aio_slideshow_settings; ?> 1013 1036 … … 1129 1152 </style> 1130 1153 1131 <?php } 1154 <?php } // end of aio_slideshow_style() 1155 1156 /** 1157 * next 3 functions check whethe to load slideshow scripts (since 1.3)) 1158 */ 1159 1160 //decide when you want to write styles into the header 1161 add_action( 'wp_head', 'aio_slideshow_when_styles' ); 1162 function aio_slideshow_when_styles() { 1163 1164 global $aio_slideshow_settings, $post; 1165 1166 //POSTS 1167 //if posts field is empty 1168 if( is_single() && $aio_slideshow_settings['on_posts'] == '' ) { 1169 1170 aio_slideshow_style(); 1171 1172 } 1173 1174 //if posts field is not empty 1175 if($aio_slideshow_settings['on_posts'] !== '') { 1176 1177 $on_posts_list = $aio_slideshow_settings['on_posts']; 1178 $on_posts = explode(',', $on_posts_list); 1179 if( is_single($on_posts)) { 1180 1181 aio_slideshow_style(); 1182 1183 } 1184 1185 } 1186 1187 //PAGES 1188 //if pages field is empty 1189 if( is_page() && $aio_slideshow_settings['on_pages'] == '' ) { 1190 1191 aio_slideshow_style(); 1192 1193 } 1194 1195 //if pages field is not empty 1196 if($aio_slideshow_settings['on_pages'] !== '') { 1197 1198 $on_pages_list = $aio_slideshow_settings['on_pages']; 1199 $on_pages = explode(',', $on_pages_list); 1200 if( is_page($on_pages)) { 1201 1202 aio_slideshow_style(); 1203 1204 } 1205 1206 } 1207 1208 //ARCHIVE 1209 if(($aio_slideshow_settings['on_archive']) && ( is_home() || is_archive() || is_category() || is_author() ) ) { 1210 1211 aio_slideshow_style(); 1212 1213 } 1214 1215 } 1216 1217 //decide when you want hook scripts into the wp_print_scripts 1218 add_action('wp_print_scripts', 'aio_slideshow_when_scripts'); 1219 function aio_slideshow_when_scripts() { 1220 1221 global $aio_slideshow_settings, $post; 1222 1223 //POSTS 1224 //if posts field is empty 1225 if( is_single() && $aio_slideshow_settings['on_posts'] == '' ) { 1226 1227 aio_slideshow_scripts(); 1228 1229 } 1230 1231 //if posts field is not empty 1232 if($aio_slideshow_settings['on_posts'] !== '') { 1233 1234 $on_posts_list = $aio_slideshow_settings['on_posts']; 1235 $on_posts = explode(',', $on_posts_list); 1236 if( is_single($on_posts)) { 1237 1238 aio_slideshow_scripts(); 1239 1240 } 1241 1242 } 1243 1244 //PAGES 1245 //if pages field is empty 1246 if( is_page() && $aio_slideshow_settings['on_pages'] == '' ) { 1247 1248 aio_slideshow_scripts(); 1249 1250 } 1251 1252 //if pages field is not empty 1253 if($aio_slideshow_settings['on_pages'] !== '') { 1254 1255 $on_pages_list = $aio_slideshow_settings['on_pages']; 1256 $on_pages = explode(',', $on_pages_list); 1257 if( is_page($on_pages)) { 1258 1259 aio_slideshow_scripts(); 1260 1261 } 1262 1263 } 1264 1265 //ARCHIVE 1266 if(($aio_slideshow_settings['on_archive']) && ( is_home() || is_archive() || is_category() || is_author() ) ) { 1267 1268 aio_slideshow_scripts(); 1269 1270 } 1271 1272 } 1273 1274 //decide when you want load / write scripts into the footer 1275 add_action('wp_footer', 'aio_slideshow_when_args', 15); 1276 1277 function aio_slideshow_when_args() { 1278 1279 global $aio_slideshow_settings, $post; 1280 1281 1282 //ARCHIVE 1283 if(($aio_slideshow_settings['on_archive']) && ( is_home() || is_archive() || is_category() || is_author() ) ) { 1284 1285 aio_slideshow_args(); 1286 1287 } 1288 1289 } 1132 1290 1133 1291 /** -
all-in-one-slideshow/trunk/readme.txt
r317953 r339811 26 26 1.2.0 2010/12/01 conflict with custom menus solved. 27 27 1.2.1 2010/12/02 identifier #nav changed to #aio-nav, added upload tutorial, fixed 'settings link'. I apologize for the 3rd update in 3 days but I just want all users to be satisfied with the plugin. thank you! 28 1.3.0 2011/02/02 one save button, option to set loading of scripts/styles only when you need them 28 29 29 30 Thanks to all who sent bug reports and ideas for
Note: See TracChangeset
for help on using the changeset viewer.