Changeset 3037244
- Timestamp:
- 02/17/2024 06:53:57 PM (2 years ago)
- Location:
- wpyog-documents/trunk
- Files:
-
- 2 edited
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpyog-documents/trunk/index.php
r2973008 r3037244 5 5 Author: WPYog 6 6 Author URI: http://wpyog.com/ 7 Version: 1.3. 27 Version: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 312 312 } 313 313 314 add_action('template_redirect','wpyog_document_template_redirect'); 315 function wpyog_document_template_redirect() { 316 if (isset($_REQUEST['download_url']) && !empty($_REQUEST['download_url'])) { 314 if (isset($_REQUEST['download_url']) && !empty($_REQUEST['download_url'])) { 317 315 $filepath = $_REQUEST['download_url']; 318 header('Content-Description: File Transfer'); 319 header('Content-Type: application/octet-stream'); 320 header('Content-Disposition: attachment; filename="'.basename($filepath).'"'); 321 header('Expires: 0'); 322 header('Cache-Control: must-revalidate'); 323 header('Pragma: public'); 324 header('Content-Length: ' . filesize($filepath)); 325 flush(); // Flush system output buffer 326 readfile($filepath); 327 die(); 328 } 329 } 316 if( strpos( $filepath, "/wp-content/uploads/" ) !== false ){ 317 header('Content-Description: File Transfer'); 318 header('Content-Type: application/octet-stream'); 319 header('Content-Disposition: attachment; filename="'.basename($filepath).'"'); 320 header('Expires: 0'); 321 header('Cache-Control: must-revalidate'); 322 header('Pragma: public'); 323 header('Content-Length: ' . filesize($filepath)); 324 flush(); // Flush system output buffer 325 readfile($filepath); 326 die(); 327 } 328 } 329 330 330 add_action( 'upgrader_process_complete', 'wpyog_plugin_upgrade_completed', 10, 2 ); 331 331 -
wpyog-documents/trunk/readme.txt
r2973008 r3037244 5 5 Tags: Document Management, Document, Simple Documents , Topics, PDF document upload, Word document upload 6 6 Requires at least: 4.0 7 Tested up to: 6. 27 Tested up to: 6.4.3 8 8 Stable tag: trunk 9 9 License: GPLv2 or later … … 20 20 Show only selected Documents: Choose documents selectively by ID and list them into pages, posts or any other post types. 21 21 22 * NEW IN VERSION 1.3. 222 * NEW IN VERSION 1.3.3 23 23 * Category Filters allows you to sort your documents easily. 24 24 * Support for post order type, which allows you to custom sort your documents.
Note: See TracChangeset
for help on using the changeset viewer.