Changeset 36565 for trunk/tests/phpunit/includes/functions.php
- Timestamp:
- 02/17/2016 10:51:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r32139 r36565 116 116 update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' ); 117 117 } 118 119 /** 120 * Helper used with the `upload_dir` filter to remove the /year/month sub directories from the uploads path and URL. 121 */ 122 function _upload_dir_no_subdir( $uploads ) { 123 $subdir = $uploads['subdir']; 124 125 $uploads['subdir'] = ''; 126 $uploads['path'] = str_replace( $subdir, '', $uploads['path'] ); 127 $uploads['url'] = str_replace( $subdir, '', $uploads['url'] ); 128 129 return $uploads; 130 } 131 132 /** 133 * Helper used with the `upload_dir` filter to set https upload URL. 134 */ 135 function _upload_dir_https( $uploads ) { 136 $uploads['url'] = str_replace( 'http://', 'https://', $uploads['url'] ); 137 $uploads['baseurl'] = str_replace( 'http://', 'https://', $uploads['baseurl'] ); 138 139 return $uploads; 140 }
Note: See TracChangeset
for help on using the changeset viewer.