Changeset 3325136
- Timestamp:
- 07/09/2025 04:20:01 PM (8 months ago)
- Location:
- chordpress
- Files:
-
- 3 edited
- 23 copied
-
tags/3.9.8 (copied) (copied from chordpress/trunk)
-
tags/3.9.8/admin/class-chordpress-admin.php (copied) (copied from chordpress/trunk/admin/class-chordpress-admin.php)
-
tags/3.9.8/admin/js/chordpress-admin.js (copied) (copied from chordpress/trunk/admin/js/chordpress-admin.js)
-
tags/3.9.8/admin/js/tinymce_buttons.js (copied) (copied from chordpress/trunk/admin/js/tinymce_buttons.js)
-
tags/3.9.8/admin/partials/chordpress-admin-chord-meta-box.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-chord-meta-box.php)
-
tags/3.9.8/admin/partials/chordpress-admin-license.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-license.php)
-
tags/3.9.8/admin/partials/chordpress-admin-options.php (copied) (copied from chordpress/trunk/admin/partials/chordpress-admin-options.php)
-
tags/3.9.8/chordpress.php (copied) (copied from chordpress/trunk/chordpress.php) (2 diffs)
-
tags/3.9.8/includes/class-chordpress-activator.php (copied) (copied from chordpress/trunk/includes/class-chordpress-activator.php)
-
tags/3.9.8/includes/class-chordpress-chord.php (copied) (copied from chordpress/trunk/includes/class-chordpress-chord.php)
-
tags/3.9.8/includes/class-chordpress-deactivator.php (copied) (copied from chordpress/trunk/includes/class-chordpress-deactivator.php)
-
tags/3.9.8/includes/class-chordpress-i18n.php (copied) (copied from chordpress/trunk/includes/class-chordpress-i18n.php)
-
tags/3.9.8/includes/class-chordpress-license.php (copied) (copied from chordpress/trunk/includes/class-chordpress-license.php)
-
tags/3.9.8/includes/class-chordpress-loader.php (copied) (copied from chordpress/trunk/includes/class-chordpress-loader.php)
-
tags/3.9.8/includes/class-chordpress-plugin.php (copied) (copied from chordpress/trunk/includes/class-chordpress-plugin.php)
-
tags/3.9.8/includes/class-chordpress-renderer.php (copied) (copied from chordpress/trunk/includes/class-chordpress-renderer.php) (10 diffs)
-
tags/3.9.8/languages/chordpress.pot (copied) (copied from chordpress/trunk/languages/chordpress.pot)
-
tags/3.9.8/makepot.cmd (copied) (copied from chordpress/trunk/makepot.cmd)
-
tags/3.9.8/public/class-chordpress-public.php (copied) (copied from chordpress/trunk/public/class-chordpress-public.php)
-
tags/3.9.8/public/css/chordpress-public.css (copied) (copied from chordpress/trunk/public/css/chordpress-public.css)
-
tags/3.9.8/public/js/chordpress-public.js (copied) (copied from chordpress/trunk/public/js/chordpress-public.js)
-
tags/3.9.8/readme.txt (copied) (copied from chordpress/trunk/readme.txt) (2 diffs)
-
tags/3.9.8/uninstall.php (copied) (copied from chordpress/trunk/uninstall.php)
-
trunk/chordpress.php (modified) (2 diffs)
-
trunk/includes/class-chordpress-renderer.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chordpress/tags/3.9.8/chordpress.php
r3311795 r3325136 19 19 * Plugin URI: https://lewe.gitbook.io/lewe-chordpress/ 20 20 * Description: This plugin renders ChordPro formatted text and chord diagrams in WordPress sites. 21 * Version: 3.9. 721 * Version: 3.9.8 22 22 * Author: George Lewe 23 23 * Author URI: https://www.lewe.com … … 38 38 */ 39 39 define('CHORDPRESS_NAME', 'ChordPress'); 40 define('CHORDPRESS_VERSION', '3.9. 7');40 define('CHORDPRESS_VERSION', '3.9.8'); 41 41 define('CHORDPRESS_AUTHOR', 'George Lewe'); 42 42 define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com'); -
chordpress/tags/3.9.8/includes/class-chordpress-renderer.php
r3311795 r3325136 719 719 720 720 $songsheetHtml = "\n\n 721 <!--begin: ChordPress SongSheet --> 721 <!-- ChordPress -->\n\n 722 <!-- ChordPress Styles --> 722 723 <div> 723 724 " . $this->songsheetStyles . " 724 </div>\n"; 725 </div>\n 726 <!-- /ChordPress Styles -->\n\n"; 725 727 726 728 /** … … 731 733 } 732 734 733 $songsheetHtml .= "<div id=\"%cpressID%\" class=\"cpress\">\n"; 735 $songsheetHtml .= "<!-- ChordPress Song %cpressID% -->\n 736 <div id=\"%cpressID%\" class=\"cpress\">\n"; 734 737 735 738 /** … … 742 745 $songsheetHtml .= '<' . $this->titleLevel . '>' . $this->arrDirectives['title'] . '</' . $this->titleLevel . ">\n"; 743 746 } else { 744 $cpressID = 'c cpress-id-' . $randId;747 $cpressID = 'cpress-id-' . $randId; 745 748 $songsheetHtml = str_replace('%cpressID%', $cpressID, $songsheetHtml); 746 749 } … … 788 791 */ 789 792 $this->inMonospace = false; 793 $openSections = []; // Stack to track open sections 790 794 foreach ($text as $line) { 795 $trimmed = trim($line); 796 797 if (strpos($trimmed, '{start_of_verse}') !== false) { 798 $songsheetHtml .= "<div class=\"cpress_verse\">\n<div class=\"cpress_line\">\n"; 799 $openSections[] = 'verse'; 800 continue; // no need to process further for this line 801 } 802 803 if (strpos($trimmed, '{end_of_verse}') !== false) { 804 if (!empty($openSections) && end($openSections) === 'verse') { 805 array_pop($openSections); 806 $songsheetHtml .= "</div></div>\n"; 807 } 808 continue; // no need to process further for this line 809 } 810 811 if (strpos($trimmed, '{start_of_chorus}') !== false) { 812 $songsheetHtml .= "<div class=\"cpress_chorus\">\n<div class=\"cpress_line\">\n"; 813 $openSections[] = 'chorus'; 814 continue; // no need to process further for this line 815 } 816 817 if (strpos($trimmed, '{end_of_chorus}') !== false) { 818 if (!empty($openSections) && end($openSections) === 'chorus') { 819 array_pop($openSections); 820 $songsheetHtml .= "</div></div>\n"; 821 } 822 continue; // no need to process further for this line 823 } 824 791 825 if ($this->inMonospace && strpos($line, "{end_of_monospace}") === false) { 792 826 $songsheetHtml .= $line; … … 795 829 } 796 830 } 831 // Close any remaining open sections 832 while (!empty($openSections)) { 833 $section = array_pop($openSections); 834 $songsheetHtml .= "</div></div>\n"; 835 } 836 837 /** 838 * End of ChordPress song 839 */ 840 $songsheetHtml .= "</div>\n 841 <!-- /ChordPress Song %cpressID% -->\n 842 <!-- /ChordPress -->\n\n"; 843 797 844 $songsheetHtml = str_replace('%cpressID%', $cpressID, $songsheetHtml); 798 845 799 846 /** 800 * End of ChordPress song801 */802 $songsheetHtml .= "</div>\n<!--end: ChordPress SongSheet-->\n";803 804 /**805 847 * Build chord sheet if option set to true. 806 848 */ 807 849 if ($this->showChordSheet) { 808 $chordSheetText = "\n<!-- begin:ChordPress ChordSheet-->\n";850 $chordSheetText = "\n<!-- ChordPress ChordSheet-->\n"; 809 851 $chordSheetText .= "<div class='cpress_chordsheet'>\n"; 810 852 $chordSheetText .= "<div><hr></div>\n"; … … 817 859 } 818 860 } 819 $chordSheetText .= "</div>\n<div style=\"clear:both; padding: 16px 0 16px 0;\"><hr></div>\n<!--end: ChordPress ChordSheet-->\n\n"; 861 $chordSheetText .= "</div>\n 862 <div style=\"clear:both; padding: 16px 0 16px 0;\"><hr></div>\n 863 <!-- /ChordPress ChordSheet-->\n\n"; 820 864 if ($this->showChordSheetOnTop) { 821 865 $songsheetHtml = $chordSheetText . $songsheetHtml; … … 847 891 */ 848 892 private function buildInteractionMenu(): string { 849 $interactionForm = "<div class=\"cpress-interaction cpress-row"; 893 $interactionForm = " 894 <!-- ChordPress Interaction --> 895 <div class=\"cpress-interaction cpress-row"; 896 850 897 if ($this->fixedInteraction) { 851 898 $interactionForm .= " fixed"; 852 899 } 900 853 901 $interactionForm .= "\">"; 854 902 855 903 if (!$this->hideFontsize) { 856 $interactionForm .= "<div class='cpress-col cpress-mb-2'>" . __('Font Size', 'chordpress') . "<br> 904 $interactionForm .= " 905 <div class='cpress-col cpress-mb-2'>" . __('Font Size', 'chordpress') . "<br> 857 906 <div class='cpress-btn-group' role='group'> 858 907 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"changeFontSize('%cpressID%', -5);\">-</button> … … 882 931 } 883 932 $interactionForm .= __('Transpose', 'chordpress') . "<br> 884 <div class='cpress-btn-group' role='group'>885 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'down', " . $songKey . ");\">-</button>886 <button id=\"btnTranspose-%cpressID%\" type='button' class='cpress-btn cpress-btn-outline-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'reset', " . $songKey . ");\" value='0'>" . $initialText . "</button>887 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'up', " . $songKey . ");\">+</button>888 </div>";933 <div class='cpress-btn-group' role='group'> 934 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'down', " . $songKey . ");\">-</button> 935 <button id=\"btnTranspose-%cpressID%\" type='button' class='cpress-btn cpress-btn-outline-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'reset', " . $songKey . ");\" value='0'>" . $initialText . "</button> 936 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'up', " . $songKey . ");\">+</button> 937 </div>"; 889 938 } else { 890 939 // … … 983 1032 $interactionForm .= "</div>"; 984 1033 } 1034 985 1035 $interactionForm .= "<div class='cpress-col cpress-pr-0'>"; 986 1036 if (!$this->hidePrint) { … … 991 1041 $interactionForm .= "<br><button class=\"cpress-btn cpress-btn-secondary cpress-btn-sm\" onclick=\"printElement('%cpressID%', '" . $printTitle . "', '" . $this->songsheetStyles . "');\">" . __('Print', 'chordpress') . "</button>\n"; 992 1042 } 993 $interactionForm .= "</div>"; 1043 $interactionForm .= "</div> 1044 </div>\n 1045 <!-- /ChordPress Interaction -->\n"; 1046 994 1047 return $interactionForm; 995 1048 } -
chordpress/tags/3.9.8/readme.txt
r3311795 r3325136 5 5 Requires at least: 4.0 6 6 Tested up to: 6.8 7 Stable tag: 3.9. 77 Stable tag: 3.9.8 8 8 Requires PHP: 5.2.4 9 9 License: GPLv3 … … 130 130 131 131 == Changelog == 132 = 3.9.8 = 133 * 2025-07-09 134 * Missing closing div fix 135 132 136 = 3.9.7 = 133 137 * 2025-06-15 -
chordpress/trunk/chordpress.php
r3311795 r3325136 19 19 * Plugin URI: https://lewe.gitbook.io/lewe-chordpress/ 20 20 * Description: This plugin renders ChordPro formatted text and chord diagrams in WordPress sites. 21 * Version: 3.9. 721 * Version: 3.9.8 22 22 * Author: George Lewe 23 23 * Author URI: https://www.lewe.com … … 38 38 */ 39 39 define('CHORDPRESS_NAME', 'ChordPress'); 40 define('CHORDPRESS_VERSION', '3.9. 7');40 define('CHORDPRESS_VERSION', '3.9.8'); 41 41 define('CHORDPRESS_AUTHOR', 'George Lewe'); 42 42 define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com'); -
chordpress/trunk/includes/class-chordpress-renderer.php
r3311795 r3325136 719 719 720 720 $songsheetHtml = "\n\n 721 <!--begin: ChordPress SongSheet --> 721 <!-- ChordPress -->\n\n 722 <!-- ChordPress Styles --> 722 723 <div> 723 724 " . $this->songsheetStyles . " 724 </div>\n"; 725 </div>\n 726 <!-- /ChordPress Styles -->\n\n"; 725 727 726 728 /** … … 731 733 } 732 734 733 $songsheetHtml .= "<div id=\"%cpressID%\" class=\"cpress\">\n"; 735 $songsheetHtml .= "<!-- ChordPress Song %cpressID% -->\n 736 <div id=\"%cpressID%\" class=\"cpress\">\n"; 734 737 735 738 /** … … 742 745 $songsheetHtml .= '<' . $this->titleLevel . '>' . $this->arrDirectives['title'] . '</' . $this->titleLevel . ">\n"; 743 746 } else { 744 $cpressID = 'c cpress-id-' . $randId;747 $cpressID = 'cpress-id-' . $randId; 745 748 $songsheetHtml = str_replace('%cpressID%', $cpressID, $songsheetHtml); 746 749 } … … 788 791 */ 789 792 $this->inMonospace = false; 793 $openSections = []; // Stack to track open sections 790 794 foreach ($text as $line) { 795 $trimmed = trim($line); 796 797 if (strpos($trimmed, '{start_of_verse}') !== false) { 798 $songsheetHtml .= "<div class=\"cpress_verse\">\n<div class=\"cpress_line\">\n"; 799 $openSections[] = 'verse'; 800 continue; // no need to process further for this line 801 } 802 803 if (strpos($trimmed, '{end_of_verse}') !== false) { 804 if (!empty($openSections) && end($openSections) === 'verse') { 805 array_pop($openSections); 806 $songsheetHtml .= "</div></div>\n"; 807 } 808 continue; // no need to process further for this line 809 } 810 811 if (strpos($trimmed, '{start_of_chorus}') !== false) { 812 $songsheetHtml .= "<div class=\"cpress_chorus\">\n<div class=\"cpress_line\">\n"; 813 $openSections[] = 'chorus'; 814 continue; // no need to process further for this line 815 } 816 817 if (strpos($trimmed, '{end_of_chorus}') !== false) { 818 if (!empty($openSections) && end($openSections) === 'chorus') { 819 array_pop($openSections); 820 $songsheetHtml .= "</div></div>\n"; 821 } 822 continue; // no need to process further for this line 823 } 824 791 825 if ($this->inMonospace && strpos($line, "{end_of_monospace}") === false) { 792 826 $songsheetHtml .= $line; … … 795 829 } 796 830 } 831 // Close any remaining open sections 832 while (!empty($openSections)) { 833 $section = array_pop($openSections); 834 $songsheetHtml .= "</div></div>\n"; 835 } 836 837 /** 838 * End of ChordPress song 839 */ 840 $songsheetHtml .= "</div>\n 841 <!-- /ChordPress Song %cpressID% -->\n 842 <!-- /ChordPress -->\n\n"; 843 797 844 $songsheetHtml = str_replace('%cpressID%', $cpressID, $songsheetHtml); 798 845 799 846 /** 800 * End of ChordPress song801 */802 $songsheetHtml .= "</div>\n<!--end: ChordPress SongSheet-->\n";803 804 /**805 847 * Build chord sheet if option set to true. 806 848 */ 807 849 if ($this->showChordSheet) { 808 $chordSheetText = "\n<!-- begin:ChordPress ChordSheet-->\n";850 $chordSheetText = "\n<!-- ChordPress ChordSheet-->\n"; 809 851 $chordSheetText .= "<div class='cpress_chordsheet'>\n"; 810 852 $chordSheetText .= "<div><hr></div>\n"; … … 817 859 } 818 860 } 819 $chordSheetText .= "</div>\n<div style=\"clear:both; padding: 16px 0 16px 0;\"><hr></div>\n<!--end: ChordPress ChordSheet-->\n\n"; 861 $chordSheetText .= "</div>\n 862 <div style=\"clear:both; padding: 16px 0 16px 0;\"><hr></div>\n 863 <!-- /ChordPress ChordSheet-->\n\n"; 820 864 if ($this->showChordSheetOnTop) { 821 865 $songsheetHtml = $chordSheetText . $songsheetHtml; … … 847 891 */ 848 892 private function buildInteractionMenu(): string { 849 $interactionForm = "<div class=\"cpress-interaction cpress-row"; 893 $interactionForm = " 894 <!-- ChordPress Interaction --> 895 <div class=\"cpress-interaction cpress-row"; 896 850 897 if ($this->fixedInteraction) { 851 898 $interactionForm .= " fixed"; 852 899 } 900 853 901 $interactionForm .= "\">"; 854 902 855 903 if (!$this->hideFontsize) { 856 $interactionForm .= "<div class='cpress-col cpress-mb-2'>" . __('Font Size', 'chordpress') . "<br> 904 $interactionForm .= " 905 <div class='cpress-col cpress-mb-2'>" . __('Font Size', 'chordpress') . "<br> 857 906 <div class='cpress-btn-group' role='group'> 858 907 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"changeFontSize('%cpressID%', -5);\">-</button> … … 882 931 } 883 932 $interactionForm .= __('Transpose', 'chordpress') . "<br> 884 <div class='cpress-btn-group' role='group'>885 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'down', " . $songKey . ");\">-</button>886 <button id=\"btnTranspose-%cpressID%\" type='button' class='cpress-btn cpress-btn-outline-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'reset', " . $songKey . ");\" value='0'>" . $initialText . "</button>887 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'up', " . $songKey . ");\">+</button>888 </div>";933 <div class='cpress-btn-group' role='group'> 934 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'down', " . $songKey . ");\">-</button> 935 <button id=\"btnTranspose-%cpressID%\" type='button' class='cpress-btn cpress-btn-outline-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'reset', " . $songKey . ");\" value='0'>" . $initialText . "</button> 936 <button type='button' class='cpress-btn cpress-btn-secondary cpress-btn-sm' onclick=\"transposeChords('%cpressID%', 'btnTranspose-', 'up', " . $songKey . ");\">+</button> 937 </div>"; 889 938 } else { 890 939 // … … 983 1032 $interactionForm .= "</div>"; 984 1033 } 1034 985 1035 $interactionForm .= "<div class='cpress-col cpress-pr-0'>"; 986 1036 if (!$this->hidePrint) { … … 991 1041 $interactionForm .= "<br><button class=\"cpress-btn cpress-btn-secondary cpress-btn-sm\" onclick=\"printElement('%cpressID%', '" . $printTitle . "', '" . $this->songsheetStyles . "');\">" . __('Print', 'chordpress') . "</button>\n"; 992 1042 } 993 $interactionForm .= "</div>"; 1043 $interactionForm .= "</div> 1044 </div>\n 1045 <!-- /ChordPress Interaction -->\n"; 1046 994 1047 return $interactionForm; 995 1048 } -
chordpress/trunk/readme.txt
r3311795 r3325136 5 5 Requires at least: 4.0 6 6 Tested up to: 6.8 7 Stable tag: 3.9. 77 Stable tag: 3.9.8 8 8 Requires PHP: 5.2.4 9 9 License: GPLv3 … … 130 130 131 131 == Changelog == 132 = 3.9.8 = 133 * 2025-07-09 134 * Missing closing div fix 135 132 136 = 3.9.7 = 133 137 * 2025-06-15
Note: See TracChangeset
for help on using the changeset viewer.