[ol]//图片时间目录存储function custom_upload_directory( $uploads ) { date_default_timezone_set("Asia/Shanghai");//设置时区 $subdir = date("Y/m/d-H");//设置目录格式 $uploads['subdir'] = $subdir; $uploads['path'] = $uploads['basedir'].DIRECTORY_SEPARATOR.$subdir; $uploads['url'] = $uploads['baseurl'].'/'.$subdir; return $uploads;}add_filter( 'upload_dir', 'custom_upload_directory' );[/ol]复制代码 目录, 媒体文件