Changeset 19 for trunk/wp-content/plugins/xpressme
- Timestamp:
- Dec 8, 2008, 5:22:30 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/xpressme.php
r18 r19 8 8 Author URI: http://www.toemon.com 9 9 */ 10 require_once('xpressme_class.php'); 11 $xpessme = new XPressME_Class(); 10 12 11 add_filter("upload_dir","xpress_upload_filter", 1); // Change wp-include/wp_upload_dir() 12 function xpress_upload_filter($uploads) 13 { 14 if (1){ // Select XPressME Configlation 15 $wordpress_dir = ABSPATH ; 16 $xoops_dir = XOOPS_UPLOAD_PATH . '/'; 17 $wordpress_base_url = get_option( 'siteurl' ); 18 $xoops_upload_url = XOOPS_UPLOAD_URL; 19 20 $uploads[path] = str_replace ($wordpress_dir, $xoops_dir, $uploads[path]); 21 $uploads[basedir] = str_replace ($wordpress_dir, $xoops_dir, $uploads[basedir]); 22 $uploads[url] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[url]); 23 $uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]); 24 } 25 return $uploads; 26 } 13 add_action('admin_menu', array(&$xpessme, 'add_option_page')); 14 add_action('admin_head', array(&$xpessme, 'add_admin_head')); 15 add_filter("upload_dir",array(&$xpessme, 'xpress_upload_filter'), 1); // Change wp-include/wp_upload_dir() 16 27 17 ?>
Note: See TracChangeset
for help on using the changeset viewer.