Changeset 972774
- Timestamp:
- 08/26/2014 12:29:16 AM (12 years ago)
- Location:
- f6s
- Files:
-
- 2 edited
- 1 copied
-
tags/0.5 (copied) (copied from f6s/trunk)
-
tags/0.5/f6s.php (modified) (5 diffs)
-
trunk/f6s.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
f6s/tags/0.5/f6s.php
r642398 r972774 4 4 Plugin URI: http://www.f6s.com 5 5 Description: Integrate f6s data into your WordPress Site 6 Version: 0. 46 Version: 0.5 7 7 Author: f6s.com 8 8 License: GPL2 … … 135 135 } 136 136 137 function f6s_get_data( $type, $param ) {137 function f6s_get_data( $type, $param, $args = array() ) { 138 138 global $f6s_shortcodes, $f6s_transient_pref, $f6s_transient_time; 139 139 … … 158 158 break; 159 159 } 160 $raw_data = wp_remote_fopen( $api_url ); 160 if ($args) { 161 $api_url .= '&'.http_build_query($args); 162 } 163 $raw_data = file_get_contents( $api_url ); 161 164 } 162 165 … … 237 240 $param = $f6s_shortcodes[ $tag ][0]; 238 241 if( ! isset( $$param ) || ! is_numeric( $$param ) ) return ''; 239 240 $data = f6s_get_data( $tag, $$param ); 242 243 $args = array(); 244 foreach ($f6s_shortcodes[ $tag ] as $key => $shortcode) { 245 if ($key == 0) continue; 246 247 if (isset($$shortcode) && !empty($$shortcode)) 248 $args[$shortcode] = $$shortcode; 249 } 250 251 $data = f6s_get_data( $tag, $$param, $args ); 241 252 } 242 253 … … 333 344 $param = $f6s_shortcodes[ $tag ][0]; 334 345 if( ! isset( $$param ) || ! is_numeric( $$param ) ) return ''; 335 336 $data = f6s_get_data( $tag, $$param ); 346 347 $args = array(); 348 foreach ($f6s_shortcodes[ $tag ] as $key => $shortcode) { 349 if ($key == 0) continue; 350 351 if (isset($$shortcode) && !empty($$shortcode)) 352 $args[$shortcode] = $$shortcode; 353 } 354 355 $data = f6s_get_data( $tag, $$param, $args ); 337 356 $objects = $tag . 's'; 338 357 if ( is_object( $data ) && property_exists( $data, $objects ) ) { -
f6s/trunk/f6s.php
r642398 r972774 4 4 Plugin URI: http://www.f6s.com 5 5 Description: Integrate f6s data into your WordPress Site 6 Version: 0. 46 Version: 0.5 7 7 Author: f6s.com 8 8 License: GPL2 … … 135 135 } 136 136 137 function f6s_get_data( $type, $param ) {137 function f6s_get_data( $type, $param, $args = array() ) { 138 138 global $f6s_shortcodes, $f6s_transient_pref, $f6s_transient_time; 139 139 … … 158 158 break; 159 159 } 160 $raw_data = wp_remote_fopen( $api_url ); 160 if ($args) { 161 $api_url .= '&'.http_build_query($args); 162 } 163 $raw_data = file_get_contents( $api_url ); 161 164 } 162 165 … … 237 240 $param = $f6s_shortcodes[ $tag ][0]; 238 241 if( ! isset( $$param ) || ! is_numeric( $$param ) ) return ''; 239 240 $data = f6s_get_data( $tag, $$param ); 242 243 $args = array(); 244 foreach ($f6s_shortcodes[ $tag ] as $key => $shortcode) { 245 if ($key == 0) continue; 246 247 if (isset($$shortcode) && !empty($$shortcode)) 248 $args[$shortcode] = $$shortcode; 249 } 250 251 $data = f6s_get_data( $tag, $$param, $args ); 241 252 } 242 253 … … 333 344 $param = $f6s_shortcodes[ $tag ][0]; 334 345 if( ! isset( $$param ) || ! is_numeric( $$param ) ) return ''; 335 336 $data = f6s_get_data( $tag, $$param ); 346 347 $args = array(); 348 foreach ($f6s_shortcodes[ $tag ] as $key => $shortcode) { 349 if ($key == 0) continue; 350 351 if (isset($$shortcode) && !empty($$shortcode)) 352 $args[$shortcode] = $$shortcode; 353 } 354 355 $data = f6s_get_data( $tag, $$param, $args ); 337 356 $objects = $tag . 's'; 338 357 if ( is_object( $data ) && property_exists( $data, $objects ) ) {
Note: See TracChangeset
for help on using the changeset viewer.