Changeset 409529
- Timestamp:
- 07/13/2011 10:44:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
infinite-scroll/tags/2.0b2.110713_RC1/wp_infinite_scroll.php
r409519 r409529 119 119 { 120 120 echo "<div id='infinitescroll-warning' class='updated fade'><p><strong>".__('Infinite Scroll is almost ready.')."</strong> ".sprintf(__('Please <a href="%1$s">review the configuration and set the state to ON</a>.'), "options-general.php?page=wp_infinite_scroll.php")."</p></div>\n"; 121 }122 function wp_inf_scroll_getAttribute($attrib, $tag)123 {124 //get attribute from html tag125 $re = '/' . preg_quote($attrib) . '=([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)/is';126 if (preg_match_all($re, $tag, $match)) {127 return $match[2];128 }129 return false;130 121 } 131 122 /* … … 240 231 echo "<script type=\"text/javascript\" src=\"$plugin_dir/jquery.infinitescroll.min.js\"></script>"; 241 232 echo "<script type=\"text/javascript\"> 233 //We leave a function outside the infinite-scroll area so that it works with older jQuery versions 242 234 function infinite_scroll_callback() { 243 235 $js_calls … … 245 237 jQuery(document).ready(function($) { 246 238 // Infinite Scroll jQuery+Wordpress plugin 247 jQuery('$content_selector').infinitescroll({ 239 // Now we're inside, we should be able to use $ again 240 $('$content_selector').infinitescroll({ 248 241 debug : $debug, 249 242 loading : {
Note: See TracChangeset
for help on using the changeset viewer.