Changeset 1599472
- Timestamp:
- 02/20/2017 07:47:11 AM (9 years ago)
- Location:
- pdf24-posts-to-pdf/trunk
- Files:
-
- 3 edited
-
inc/common.php (modified) (6 diffs)
-
pdf24.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pdf24-posts-to-pdf/trunk/inc/common.php
r1567106 r1599472 693 693 } 694 694 695 function pdf24Plugin_getDate($str) { 696 if(!$str || $str == '') { 697 $str = 'Y-m-d'; 698 } 699 return date($str); 700 } 701 702 function pdf24Plugin_parseDocFilename($name) { 695 function pdf24Plugin_parseDocFilename($name) { 703 696 $repl = array( 704 697 '{blogName}' => get_bloginfo('name'), … … 720 713 ); 721 714 722 $name = preg_replace('/\{date(:(.*?))?}/e', 'pdf24Plugin_getDate("$2")', $name); 715 $name = preg_replace_callback('/\{date(:(.*?))?}/', function($m) { 716 $dp = 'Y-m-d'; 717 if(isset($m[2]) && $m[2]) { 718 $dp = $m[2]; 719 } 720 return date($dp); 721 }, $name); 723 722 724 723 if(is_category()) { … … 729 728 $repl['{catNiceName}'] = $yourcat->category_nicename; 730 729 } 730 731 731 if(is_page()) { 732 732 global $post; … … 739 739 } 740 740 } 741 741 742 if(is_single()) { 742 743 global $post; … … 749 750 } 750 751 } 752 751 753 if(is_search()) { 752 754 if(function_exists('get_search_query')) { … … 754 756 } 755 757 } 758 756 759 if(is_home()) { 757 760 } -
pdf24-posts-to-pdf/trunk/pdf24.php
r1567106 r1599472 6 6 Author: Stefan Ziegler 7 7 Author URI: https://www.pdf24.org 8 Version: 4.1. 08 Version: 4.1.1 9 9 License: GPL3 10 10 */ -
pdf24-posts-to-pdf/trunk/readme.txt
r1567106 r1599472 4 4 Tags: pdf, create pdf, convert to pdf, article to pdf, pdf plugin, pdf widget 5 5 Requires at least: 1.5.0 6 Tested up to: 4.7 7 Stable tag: 4.1. 06 Tested up to: 4.7.2 7 Stable tag: 4.1.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 119 119 120 120 == Changelog == 121 122 = 4.1.1 = 123 * Fixed deprecated preg_replace with e modifier 121 124 122 125 = 4.1.0 =
Note: See TracChangeset
for help on using the changeset viewer.