Advertisement
Guest User

Untitled

a guest
Oct 5th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1.     //Statische seitem
  2.     $lastposts = get_pages ( 'numberposts=999' );
  3.     foreach ( $lastposts as $post ) {
  4.         $t = str_replace ( array (get_option ( 'siteurl' ) . "/", get_option ( 'siteurl' ), loaddaten ( "realstaticlocalurl" ), loaddaten ( "realstaticremoteurl" ), "//" ), array ("", "", "", "", "/" ), get_page_link ( $post->ID ) );
  5.         getnpush ( loaddaten ( "localurl" ) . $t, $t, true );
  6.    
  7.     }
  8.     // Function to loop through dir's and getnpush the data
  9.  // $basepath is the path to your WP installation on your servre
  10.  // $subpath is the path relative to your $basepath that you want to getnpush
  11.  // $sitepath is the path where the $basepath is accessible on the webserver
  12.  function getnpush_misc( $basepath, $subpath, $sitepath ){
  13.   $ignore = array( '.', '..' );
  14.   $dh = @opendir( $basepath.$subpath );
  15.   while( false !== ( $file = readdir( $dh ) ) ){
  16.   if( !in_array( $file, $ignore ) && !preg_match('/\.php$/', $file)){
  17.    if( is_dir( "$basepath$subpath/$file" ) ){
  18.     getnpush_misc( $basepath, "$subpath/$file", $sitepath);
  19.    } else {
  20.     getnpush ( "$sitepath/$subpath/$file", "$subpath/$file", true );
  21.    }
  22.   }
  23.  }
  24.  closedir( $dh );
  25.  }
  26.  
  27.  reallystatic_configok ( "->misc files", 2 );
  28.  
  29.  getnpush_misc("http://192.168.2.2/wordpress/", "wp-content/themes", get_option ( 'siteurl' ) . "/");
  30.  getnpush_misc("http://192.168.2.2/wordpress/", "wp-content/plugins", get_option ( 'siteurl' ) . "/");
  31.  getnpush_misc("http://192.168.2.2/wordpress/", "wp-includes", get_option ( 'siteurl' ) . "/");
  32.  
  33.     reallystatic_configok ( __("Finish", 'reallystatic' ), 3 );
  34. }
  35. ?>
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement