Changeset 705620
- Timestamp:
- 04/29/2013 08:37:14 PM (13 years ago)
- File:
-
- 1 edited
-
cross-network-posts/trunk/cnp-get-blogs.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cross-network-posts/trunk/cnp-get-blogs.php
r705560 r705620 1 1 <?php 2 2 3 //todo activate WP functions 3 //get root of WP install 4 function get_wp_config_path($filename) 5 { 6 $base = dirname(__FILE__); 7 $path = false; 8 9 10 if (@file_exists(dirname(dirname($base))."/".$filename)) 11 { 12 $path = dirname(dirname($base))."/".$filename; 13 } 14 else 15 if (@file_exists(dirname(dirname(dirname($base)))."/".$filename)) 16 { 17 $path = dirname(dirname(dirname($base)))."/".$filename; 18 } 19 else 20 $path = false; 21 22 /* if ($path != false) 23 { 24 $path = str_replace("\\", "/", $path); 25 }*/ 26 return $path; 27 } 28 echo "ik doe dit"; 29 30 //activate WP functions 31 define('WP_USE_THEMES', false); 32 require(get_wp_config_path('wp-blog-header.php')); 4 33 5 34 //todo restrict to blogs a user has privilidges to? … … 14 43 echo $blog_id; 15 44 16 echo "ik doe iets";45 echo "ik doe iets"; 17 46 18 47 ?>
Note: See TracChangeset
for help on using the changeset viewer.