Plugin Directory

Changeset 2877462


Ignore:
Timestamp:
03/09/2023 08:56:56 PM (3 years ago)
Author:
glewe
Message:

Tagging version 3.4.0

Location:
chordpress
Files:
9 edited
23 copied

Legend:

Unmodified
Added
Removed
  • chordpress/tags/3.4.0/admin/partials/chordpress-admin-options.php

    r2838045 r2877462  
    444444                                <td>
    445445                                    <input type="text" id="<?php echo $pname; ?>_text_meta_style" name="<?php echo $pname; ?>_text_meta_style" value="<?php echo get_option($pname . '_text_meta_style'); ?>" />
    446                                     <p class="description"><?php echo esc_html(__('Enter CSS for the meta header block, e.g.: font-style: italic;', 'chordpress')); ?></p>
     446                                    <p class="description"><?php echo esc_html(__('Enter CSS for the meta header block, e.g.', 'chordpress')); ?>:<br>
     447                                    <code>font-style: italic;</code></p>
    447448                                </td>
    448449                            </tr>
     
    458459                                <td>
    459460                                    <input type="text" id="<?php echo $pname; ?>_text_chord_style" name="<?php echo $pname; ?>_text_chord_style" value="<?php echo get_option($pname . '_text_chord_style'); ?>" />
    460                                     <p class="description"><?php echo esc_html(__('Enter CSS for the chords here or leave empty to use the page default. E.g. font-weight:bold;color:#990000;', 'chordpress')); ?></p>
     461                                    <p class="description"><?php echo esc_html(__("Enter CSS for the chords here or leave empty to use the page default. E.g. try this for red text on a light yellow badge", 'chordpress')); ?>:<br>
     462                                    <code>background-color: #F7F1AF; border-radius: 0.3em; color: #990000; padding: 0.1em 0.3em 0.1em 0.3em;</code></p>
    461463                                </td>
    462464                            </tr>
     
    472474                                <td>
    473475                                    <input type="text" id="<?php echo $pname; ?>_text_comment_style" name="<?php echo $pname; ?>_text_comment_style" value="<?php echo get_option($pname . '_text_comment_style'); ?>" />
    474                                     <p class="description"><?php echo esc_html(__('Enter CSS for comments, e.g.: background-color: #606060; font-style: italic; padding: 4px;', 'chordpress')); ?></p>
     476                                    <p class="description"><?php echo esc_html(__('Enter CSS for comments, e.g.', 'chordpress')); ?>:<br>
     477                                    <code>background-color: #606060; font-style: italic; padding: 4px;</code></p>
    475478                                </td>
    476479                            </tr>
     
    780783
    781784                <?php
    782                 //  ,------------------,
    783                 // _| Tab: Addc Chords |_
     785                //  ,-----------------,
     786                // _| Tab: Add Chords |_
    784787                //
    785788                if ($active_tab == 'tab_samples') $display = "display:block;";
     
    895898                        <tbody>
    896899                            <tr>
    897                                 <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete"><?php echo esc_html(__('Remove data on uninstall', 'chordpress')); ?></label></th>
    898                                 <td>
    899                                     <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete" name="<?php echo $pname; ?>_checkbox_uninstall_delete" <?php checked(get_option($pname . '_checkbox_uninstall_delete'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
    900                                     <p class="description"><?php echo esc_html(__('Remove plugin options from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
     900                                <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete_options"><?php echo esc_html(__('Remove options on delete', 'chordpress')); ?></label></th>
     901                                <td>
     902                                    <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete_options" name="<?php echo $pname; ?>_checkbox_uninstall_delete_options" <?php checked(get_option($pname . '_checkbox_uninstall_delete_options'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
     903                                    <p class="description"><?php echo esc_html(__('Remove plugin options and settings from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
     904                                </td>
     905                            </tr>
     906                            <tr>
     907                                <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts"><?php echo esc_html(__('Remove guitar chord posts on delete', 'chordpress')); ?></label></th>
     908                                <td>
     909                                    <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts" name="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts" <?php checked(get_option($pname . '_checkbox_uninstall_delete_chordposts'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
     910                                    <p class="description"><?php echo esc_html(__('Remove all guitar chord posts from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
    901911                                </td>
    902912                            </tr>
  • chordpress/tags/3.4.0/chordpress.php

    r2874790 r2877462  
    3636 */
    3737define('CHORDPRESS_NAME', 'ChordPress');
    38 define('CHORDPRESS_VERSION', '3.3.3');
     38define('CHORDPRESS_VERSION', '3.4.0');
    3939define('CHORDPRESS_AUTHOR', 'George Lewe');
    4040define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com');
  • chordpress/tags/3.4.0/includes/class-chordpress-chord.php

    r2874790 r2877462  
    611611     * Replaces round brackets with square brackets.
    612612     *
    613      * @param  string    $input    String with round bracktes
    614      * @return string             String with square brackets
     613     * @param  string $input  String with round bracktes
     614     * @return string - String with square brackets
    615615     */
    616616    public function replace_brackets($input)
  • chordpress/tags/3.4.0/includes/class-chordpress-plugin.php

    r2838045 r2877462  
    200200            $this->plugin_name . '_number_chord_tuningsFontSize',
    201201
    202             $this->plugin_name . '_checkbox_uninstall_delete'
     202            $this->plugin_name . '_checkbox_uninstall_delete_options',
     203            $this->plugin_name . '_checkbox_uninstall_delete_chordposts'
    203204
    204205        );
  • chordpress/tags/3.4.0/includes/class-chordpress-renderer.php

    r2874790 r2877462  
    528528     *
    529529     * @since    1.0.0
    530      * @param    string    $text    Text inside shortcode wrapper.
     530     * @param    object    $text    Text inside shortcode wrapper.
    531531     * @return   string             Formatted HTML of the ChordPro text.
    532532     */
    533     public function displayText($text)
     533    public function displayText($text): string
    534534    {
    535535        /**
     
    562562         * Interactive transpose / print
    563563         */
    564         if (strtolower($this->interactive) == "yes") {
     564        if (in_array(strtolower($this->interactive), array("yes", "1", "true"))) {
    565565            $returnText .= "<div class=\"cpress_interaction\">";
    566566            $transposeForm = "";
     
    991991        $nashvilleChords = array('1', '2', '3', '4', '5', '6', '7');
    992992
    993         if (strlen($ch) == 0) return;
     993        if (strlen($ch) == 0) return '';
    994994
    995995        /**
     
    11401140        );
    11411141
    1142         if ($this->hbNotation == 'yes') {
     1142        if (in_array(strtolower($this->hbNotation), array("yes", "1", "true"))) {
    11431143            if (array_key_exists(strtoupper($n), $hbNotation)) {
    11441144                return $hbNotation[strtoupper($n)];
  • chordpress/tags/3.4.0/languages/chordpress.pot

    r2838045 r2877462  
    1 # Copyright (C) 2022 George Lewe
     1# Copyright (C) 2023 George Lewe
    22# This file is distributed under the same license as the Lewe ChordPress plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Lewe ChordPress 3.2.1\n"
     5"Project-Id-Version: Lewe ChordPress 3.3.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/chordpress\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-12-22T16:01:46+01:00\n"
     12"POT-Creation-Date: 2023-03-09T21:55:13+01:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    157157#: admin/partials/chordpress-admin-license.php:41
    158158#: admin/partials/chordpress-admin-options.php:253
    159 #: admin/partials/chordpress-admin-options.php:943
     159#: admin/partials/chordpress-admin-options.php:953
    160160msgid "Documentation"
    161161msgstr ""
    162162
    163163#: admin/class-chordpress-admin.php:246
    164 #: admin/partials/chordpress-admin-options.php:949
     164#: admin/partials/chordpress-admin-options.php:959
    165165msgid "Support"
    166166msgstr ""
     
    178178#: admin/class-chordpress-admin.php:301
    179179#: admin/partials/chordpress-admin-chord-meta-box.php:53
    180 #: admin/partials/chordpress-admin-options.php:925
     180#: admin/partials/chordpress-admin-options.php:935
    181181msgid "Name"
    182182msgstr ""
    183183
    184184#: admin/class-chordpress-admin.php:302
    185 #: admin/partials/chordpress-admin-options.php:689
     185#: admin/partials/chordpress-admin-options.php:692
    186186msgid "Strings"
    187187msgstr ""
     
    221221
    222222#: admin/partials/chordpress-admin-chord-meta-box.php:92
    223 #: admin/partials/chordpress-admin-options.php:754
     223#: admin/partials/chordpress-admin-options.php:757
    224224msgid "Tuning"
    225225msgstr ""
     
    563563
    564564#: admin/partials/chordpress-admin-options.php:446
    565 msgid "Enter CSS for the meta header block, e.g.: font-style: italic;"
    566 msgstr ""
    567 
    568 #: admin/partials/chordpress-admin-options.php:450
     565msgid "Enter CSS for the meta header block, e.g."
     566msgstr ""
     567
     568#: admin/partials/chordpress-admin-options.php:451
    569569msgid "Line Style"
    570570msgstr ""
    571571
    572 #: admin/partials/chordpress-admin-options.php:453
     572#: admin/partials/chordpress-admin-options.php:454
    573573msgid "Enter CSS for the lines here or leave empty to use the default (margin: 1em 0 1em 0;)."
    574574msgstr ""
    575575
    576 #: admin/partials/chordpress-admin-options.php:457
     576#: admin/partials/chordpress-admin-options.php:458
    577577msgid "Chord Style"
    578578msgstr ""
    579579
    580 #: admin/partials/chordpress-admin-options.php:460
    581 msgid "Enter CSS for the chords here or leave empty to use the page default. E.g. font-weight:bold;color:#990000;"
    582 msgstr ""
    583 
    584 #: admin/partials/chordpress-admin-options.php:464
     580#: admin/partials/chordpress-admin-options.php:461
     581msgid "Enter CSS for the chords here or leave empty to use the page default. E.g. try this for red text on a light yellow badge"
     582msgstr ""
     583
     584#: admin/partials/chordpress-admin-options.php:466
    585585msgid "Lyrics Style"
    586586msgstr ""
    587587
    588 #: admin/partials/chordpress-admin-options.php:467
     588#: admin/partials/chordpress-admin-options.php:469
    589589msgid "Enter CSS for the lyrics here or leave empty to use the page default."
    590590msgstr ""
    591591
    592 #: admin/partials/chordpress-admin-options.php:471
     592#: admin/partials/chordpress-admin-options.php:473
    593593msgid "Comment Style"
    594594msgstr ""
    595595
    596 #: admin/partials/chordpress-admin-options.php:474
    597 msgid "Enter CSS for comments, e.g.: background-color: #606060; font-style: italic; padding: 4px;"
    598 msgstr ""
    599 
    600 #: admin/partials/chordpress-admin-options.php:478
     596#: admin/partials/chordpress-admin-options.php:476
     597msgid "Enter CSS for comments, e.g."
     598msgstr ""
     599
     600#: admin/partials/chordpress-admin-options.php:481
    601601msgid "Chorus Style"
    602602msgstr ""
    603603
    604 #: admin/partials/chordpress-admin-options.php:481
     604#: admin/partials/chordpress-admin-options.php:484
     605#: admin/partials/chordpress-admin-options.php:491
     606msgid "Enter CSS for the"
     607msgstr ""
     608
     609#: admin/partials/chordpress-admin-options.php:484
     610msgid "chorus sections"
     611msgstr ""
     612
    605613#: admin/partials/chordpress-admin-options.php:488
    606 msgid "Enter CSS for the"
    607 msgstr ""
    608 
    609 #: admin/partials/chordpress-admin-options.php:481
    610 msgid "chorus sections"
    611 msgstr ""
    612 
    613 #: admin/partials/chordpress-admin-options.php:485
    614614msgid "Verse Style"
    615615msgstr ""
    616616
    617 #: admin/partials/chordpress-admin-options.php:488
     617#: admin/partials/chordpress-admin-options.php:491
    618618msgid "verse sections"
    619619msgstr ""
    620620
    621 #: admin/partials/chordpress-admin-options.php:507
     621#: admin/partials/chordpress-admin-options.php:510
    622622msgid "Use this tab to specify global styles and formats for the ChordPress guitar chord diagrams.<br>For single chords using the <code>[chordpress-chord]</code> shortcode, some of them can be overwritten by shortcode parameters."
    623623msgstr ""
    624624
    625 #: admin/partials/chordpress-admin-options.php:512
     625#: admin/partials/chordpress-admin-options.php:515
    626626msgid "Sample Display"
    627627msgstr ""
    628628
    629 #: admin/partials/chordpress-admin-options.php:524
     629#: admin/partials/chordpress-admin-options.php:527
    630630msgid "This is a sample display based on your settings. You might need to refresh the page to show the diagram."
    631631msgstr ""
    632632
    633 #: admin/partials/chordpress-admin-options.php:528
     633#: admin/partials/chordpress-admin-options.php:531
    634634msgid "Background Color"
    635635msgstr ""
    636636
    637 #: admin/partials/chordpress-admin-options.php:531
     637#: admin/partials/chordpress-admin-options.php:534
    638638msgid "The background CSS color of the chord diagram, e.g. #FFFFFF. To set the background to transparent (default) either set this to 'none' or leave empty."
    639639msgstr ""
    640640
    641 #: admin/partials/chordpress-admin-options.php:535
     641#: admin/partials/chordpress-admin-options.php:538
    642642msgid "Barre Border Radius"
    643643msgstr ""
    644644
    645 #: admin/partials/chordpress-admin-options.php:538
     645#: admin/partials/chordpress-admin-options.php:541
    646646msgid "The barre chord rectangle border radius relative to the nutSize (eg. 1 means completely round endges, 0 means not rounded at all). Leave empty for the default: 0.25."
    647647msgstr ""
    648648
    649 #: admin/partials/chordpress-admin-options.php:542
     649#: admin/partials/chordpress-admin-options.php:545
    650650msgid "Barre Bar Stroke Color"
    651651msgstr ""
    652652
    653 #: admin/partials/chordpress-admin-options.php:545
     653#: admin/partials/chordpress-admin-options.php:548
    654654msgid "The stroke CSS color of a barre chord. Defaults to the nut color if not set. Leave empty for the default 'Nut Color'."
    655655msgstr ""
    656656
    657 #: admin/partials/chordpress-admin-options.php:549
     657#: admin/partials/chordpress-admin-options.php:552
    658658msgid "Barre Bar Stroke Width"
    659659msgstr ""
    660660
    661 #: admin/partials/chordpress-admin-options.php:552
     661#: admin/partials/chordpress-admin-options.php:555
    662662msgid "The stroke width of a barre chord in pixel. Leave empty for the default 0."
    663663msgstr ""
    664664
    665 #: admin/partials/chordpress-admin-options.php:556
     665#: admin/partials/chordpress-admin-options.php:559
    666666msgid "Canvas Width"
    667667msgstr ""
    668668
    669 #: admin/partials/chordpress-admin-options.php:559
     669#: admin/partials/chordpress-admin-options.php:562
    670670msgid "Enter the width of the chord diagrams canvas in pixel. Leave emtpy for the default of 180. The height will be adjusted automatically."
    671671msgstr ""
    672672
    673 #: admin/partials/chordpress-admin-options.php:563
     673#: admin/partials/chordpress-admin-options.php:566
    674674msgid "Global Color"
    675675msgstr ""
    676676
    677 #: admin/partials/chordpress-admin-options.php:566
     677#: admin/partials/chordpress-admin-options.php:569
    678678msgid "Global color of the whole chart. Can be overridden with more specific color settings such as 'Title Color' or 'String Color'. Leave empty for the default #000000."
    679679msgstr ""
    680680
    681 #: admin/partials/chordpress-admin-options.php:570
     681#: admin/partials/chordpress-admin-options.php:573
    682682msgid "Empty String Indicator Size"
    683683msgstr ""
    684684
    685 #: admin/partials/chordpress-admin-options.php:573
     685#: admin/partials/chordpress-admin-options.php:576
    686686msgid "Size of the Xs and Os above empty strings relative to the space between two strings. Leave empty for the default: 0.6."
    687687msgstr ""
    688688
    689 #: admin/partials/chordpress-admin-options.php:577
     689#: admin/partials/chordpress-admin-options.php:580
    690690msgid "Fixed Diagram Position"
    691691msgstr ""
    692692
    693 #: admin/partials/chordpress-admin-options.php:580
     693#: admin/partials/chordpress-admin-options.php:583
    694694msgid "With this option selected, the distance between the chord diagram and the top of the SVG stays the same, no matter if a title is defined or not. Default is off."
    695695msgstr ""
    696696
    697 #: admin/partials/chordpress-admin-options.php:584
     697#: admin/partials/chordpress-admin-options.php:587
    698698msgid "Font Family"
    699699msgstr ""
    700700
    701 #: admin/partials/chordpress-admin-options.php:587
     701#: admin/partials/chordpress-admin-options.php:590
    702702msgid "The font family used for all letters and numbers. Leave empty for the default: 'Arial, \"Helvetica Neue\", Helvetica, sans-serif'."
    703703msgstr ""
    704704
    705 #: admin/partials/chordpress-admin-options.php:591
     705#: admin/partials/chordpress-admin-options.php:594
    706706msgid "Fret Color"
    707707msgstr ""
    708708
    709 #: admin/partials/chordpress-admin-options.php:594
     709#: admin/partials/chordpress-admin-options.php:597
    710710msgid "Fret color. Leave empty for default: 'Global Color'."
    711711msgstr ""
    712712
    713 #: admin/partials/chordpress-admin-options.php:598
     713#: admin/partials/chordpress-admin-options.php:601
    714714msgid "Fret Label Color"
    715715msgstr ""
    716716
    717 #: admin/partials/chordpress-admin-options.php:601
     717#: admin/partials/chordpress-admin-options.php:604
    718718msgid "Fret label color. Leave empty for default: 'Global Color'."
    719719msgstr ""
    720720
    721 #: admin/partials/chordpress-admin-options.php:605
     721#: admin/partials/chordpress-admin-options.php:608
    722722msgid "Fret Label Font Size"
    723723msgstr ""
    724724
    725 #: admin/partials/chordpress-admin-options.php:608
     725#: admin/partials/chordpress-admin-options.php:611
    726726msgid "Font size of the fret label. Leave empty for the default: 38."
    727727msgstr ""
    728728
    729 #: admin/partials/chordpress-admin-options.php:612
     729#: admin/partials/chordpress-admin-options.php:615
    730730msgid "Frets"
    731731msgstr ""
    732732
    733 #: admin/partials/chordpress-admin-options.php:615
     733#: admin/partials/chordpress-admin-options.php:618
    734734msgid "Number of frets to show in the chart. Leave empty for the default: 4."
    735735msgstr ""
    736736
    737 #: admin/partials/chordpress-admin-options.php:619
     737#: admin/partials/chordpress-admin-options.php:622
    738738msgid "Fret Height"
    739739msgstr ""
    740740
    741 #: admin/partials/chordpress-admin-options.php:622
     741#: admin/partials/chordpress-admin-options.php:625
    742742msgid "Height of a fret, relative to the space between two strings. Leave empty for the default: 1.5."
    743743msgstr ""
    744744
    745 #: admin/partials/chordpress-admin-options.php:626
     745#: admin/partials/chordpress-admin-options.php:629
    746746msgid "Nut Size"
    747747msgstr ""
    748748
    749 #: admin/partials/chordpress-admin-options.php:629
     749#: admin/partials/chordpress-admin-options.php:632
    750750msgid "Size of a nut relative to the string spacing. Leave empty for the default: 0.85."
    751751msgstr ""
    752752
    753 #: admin/partials/chordpress-admin-options.php:633
     753#: admin/partials/chordpress-admin-options.php:636
    754754msgid "Nut Color"
    755755msgstr ""
    756756
    757 #: admin/partials/chordpress-admin-options.php:636
     757#: admin/partials/chordpress-admin-options.php:639
    758758msgid "Color of a finger/nut. Leave empty for default: 'Global Color'."
    759759msgstr ""
    760760
    761 #: admin/partials/chordpress-admin-options.php:640
     761#: admin/partials/chordpress-admin-options.php:643
    762762msgid "Nut Stroke Color"
    763763msgstr ""
    764764
    765 #: admin/partials/chordpress-admin-options.php:643
     765#: admin/partials/chordpress-admin-options.php:646
    766766msgid "Stroke color of a nut. Leave empty for default: 'Nut Color'. If nut color is not set it defaults to 'Global Color'."
    767767msgstr ""
    768768
    769 #: admin/partials/chordpress-admin-options.php:647
     769#: admin/partials/chordpress-admin-options.php:650
    770770msgid "Nut Stroke Width"
    771771msgstr ""
    772772
    773 #: admin/partials/chordpress-admin-options.php:650
     773#: admin/partials/chordpress-admin-options.php:653
    774774msgid "Stroke width of a nut. Leave empty for the default: 0."
    775775msgstr ""
    776776
    777 #: admin/partials/chordpress-admin-options.php:654
     777#: admin/partials/chordpress-admin-options.php:657
    778778msgid "Nut Text Color"
    779779msgstr ""
    780780
    781 #: admin/partials/chordpress-admin-options.php:657
     781#: admin/partials/chordpress-admin-options.php:660
    782782msgid "Text color of a nut. Leave empty for default: #FFFFFF."
    783783msgstr ""
    784784
    785 #: admin/partials/chordpress-admin-options.php:661
     785#: admin/partials/chordpress-admin-options.php:664
    786786msgid "Nut Text Size"
    787787msgstr ""
    788788
    789 #: admin/partials/chordpress-admin-options.php:664
     789#: admin/partials/chordpress-admin-options.php:667
    790790msgid "Font size of the nut label. Leave empty for the default: 24."
    791791msgstr ""
    792792
    793 #: admin/partials/chordpress-admin-options.php:668
     793#: admin/partials/chordpress-admin-options.php:671
    794794msgid "Position"
    795795msgstr ""
    796796
    797 #: admin/partials/chordpress-admin-options.php:671
     797#: admin/partials/chordpress-admin-options.php:674
    798798msgid "Default start fret position (first fret is 1). Leave empty for the default: 1."
    799799msgstr ""
    800800
    801 #: admin/partials/chordpress-admin-options.php:675
     801#: admin/partials/chordpress-admin-options.php:678
    802802msgid "Side Padding"
    803803msgstr ""
    804804
    805 #: admin/partials/chordpress-admin-options.php:678
     805#: admin/partials/chordpress-admin-options.php:681
    806806msgid "The minimum side padding (from the guitar to the edge of the chart) relative to the whole width. This is only applied if it's larger than the letters inside of the padding (eg the starting fret). Leave empty for the default: 0.2."
    807807msgstr ""
    808808
    809 #: admin/partials/chordpress-admin-options.php:682
     809#: admin/partials/chordpress-admin-options.php:685
    810810msgid "String Color"
    811811msgstr ""
    812812
    813 #: admin/partials/chordpress-admin-options.php:685
     813#: admin/partials/chordpress-admin-options.php:688
    814814msgid "Text color of a nut. Leave empty for default: 'Global Color'."
    815815msgstr ""
    816816
    817 #: admin/partials/chordpress-admin-options.php:700
     817#: admin/partials/chordpress-admin-options.php:703
    818818msgid "Number of strings. Default is '6'."
    819819msgstr ""
    820820
    821 #: admin/partials/chordpress-admin-options.php:704
     821#: admin/partials/chordpress-admin-options.php:707
    822822msgid "Stroke Width"
    823823msgstr ""
    824824
    825 #: admin/partials/chordpress-admin-options.php:707
     825#: admin/partials/chordpress-admin-options.php:710
    826826msgid "Global stroke width. Leave empty for the default: 2."
    827827msgstr ""
    828828
    829 #: admin/partials/chordpress-admin-options.php:711
     829#: admin/partials/chordpress-admin-options.php:714
    830830msgid "Style"
    831831msgstr ""
    832832
    833 #: admin/partials/chordpress-admin-options.php:722
     833#: admin/partials/chordpress-admin-options.php:725
    834834msgid "Select between 'Normal' and 'Handdrawn'. Default is 'Normal'."
    835835msgstr ""
    836836
    837 #: admin/partials/chordpress-admin-options.php:726
     837#: admin/partials/chordpress-admin-options.php:729
    838838msgid "Title Bottom Margin"
    839839msgstr ""
    840840
    841 #: admin/partials/chordpress-admin-options.php:729
     841#: admin/partials/chordpress-admin-options.php:732
    842842msgid "Space between the title and the chart. Leave empty for the default: 0."
    843843msgstr ""
    844844
    845 #: admin/partials/chordpress-admin-options.php:733
     845#: admin/partials/chordpress-admin-options.php:736
    846846msgid "Title Color"
    847847msgstr ""
    848848
    849 #: admin/partials/chordpress-admin-options.php:736
     849#: admin/partials/chordpress-admin-options.php:739
    850850msgid "Text color of the title. Leave empty for default: 'Global Color'."
    851851msgstr ""
    852852
    853 #: admin/partials/chordpress-admin-options.php:740
     853#: admin/partials/chordpress-admin-options.php:743
    854854msgid "Title Font Size"
    855855msgstr ""
    856856
    857 #: admin/partials/chordpress-admin-options.php:743
     857#: admin/partials/chordpress-admin-options.php:746
    858858msgid "Font size of the title. This is only the initial font size. If the title doesn't fit, the title is automatically scaled so that it fits. Leave empty for the default: 48."
    859859msgstr ""
    860860
    861 #: admin/partials/chordpress-admin-options.php:747
     861#: admin/partials/chordpress-admin-options.php:750
    862862msgid "Top Fret Width"
    863863msgstr ""
    864864
    865 #: admin/partials/chordpress-admin-options.php:750
     865#: admin/partials/chordpress-admin-options.php:753
    866866msgid "Top fret width (only used if position is 1). Leave empty for the default: 10."
    867867msgstr ""
    868868
    869 #: admin/partials/chordpress-admin-options.php:757
     869#: admin/partials/chordpress-admin-options.php:760
    870870msgid "Labels under the strings for their tuning. Leave empty for default: [ 'E', 'A', 'D', 'G', 'B', 'E' ]."
    871871msgstr ""
    872872
    873 #: admin/partials/chordpress-admin-options.php:761
     873#: admin/partials/chordpress-admin-options.php:764
    874874msgid "Tunings Color"
    875875msgstr ""
    876876
    877 #: admin/partials/chordpress-admin-options.php:764
     877#: admin/partials/chordpress-admin-options.php:767
    878878msgid "Tunings color. Leave empty for default: 'Global Color'."
    879879msgstr ""
    880880
    881 #: admin/partials/chordpress-admin-options.php:768
     881#: admin/partials/chordpress-admin-options.php:771
    882882msgid "Tunings Font Size"
    883883msgstr ""
    884884
    885 #: admin/partials/chordpress-admin-options.php:771
     885#: admin/partials/chordpress-admin-options.php:774
    886886msgid "Font size of the tunig labels. Leave empty for the default: 28."
    887887msgstr ""
    888888
    889 #: admin/partials/chordpress-admin-options.php:790
     889#: admin/partials/chordpress-admin-options.php:793
    890890msgid "Use this tab to create chord diagrams. These diagram are saved as \"Guitar Chord\" posts. They will be added to the ones that already exist."
    891891msgstr ""
    892892
    893 #: admin/partials/chordpress-admin-options.php:795
     893#: admin/partials/chordpress-admin-options.php:798
    894894msgid "Major Chords"
    895895msgstr ""
    896896
    897 #: admin/partials/chordpress-admin-options.php:798
     897#: admin/partials/chordpress-admin-options.php:801
    898898msgid "Imports a common version of the major chords for the base notes A, B, C, D, E, F and G."
    899899msgstr ""
    900900
    901 #: admin/partials/chordpress-admin-options.php:802
     901#: admin/partials/chordpress-admin-options.php:805
    902902msgid "Major 7 Chords"
    903903msgstr ""
    904904
    905 #: admin/partials/chordpress-admin-options.php:805
     905#: admin/partials/chordpress-admin-options.php:808
    906906msgid "Imports a common version of the major 7 chords for the base notes A, B, C, D, E, F and G."
    907907msgstr ""
    908908
    909 #: admin/partials/chordpress-admin-options.php:809
     909#: admin/partials/chordpress-admin-options.php:812
    910910msgid "Major 5 Chords"
    911911msgstr ""
    912912
    913 #: admin/partials/chordpress-admin-options.php:812
     913#: admin/partials/chordpress-admin-options.php:815
    914914msgid "Imports a common version of the major 5 chords for the base notes A, B, C, D, E, F and G."
    915915msgstr ""
    916916
    917 #: admin/partials/chordpress-admin-options.php:816
     917#: admin/partials/chordpress-admin-options.php:819
    918918msgid "Minor Chords"
    919919msgstr ""
    920920
    921 #: admin/partials/chordpress-admin-options.php:819
     921#: admin/partials/chordpress-admin-options.php:822
    922922msgid "Imports a common version of the minor chords for the base notes A, B, C, D, E, F and G."
    923923msgstr ""
    924924
    925 #: admin/partials/chordpress-admin-options.php:823
     925#: admin/partials/chordpress-admin-options.php:826
    926926msgid "Minor 7 Chords"
    927927msgstr ""
    928928
    929 #: admin/partials/chordpress-admin-options.php:826
     929#: admin/partials/chordpress-admin-options.php:829
    930930msgid "Imports a common version of the minor 7 chords for the base notes A, B, C, D, E, F and G."
    931931msgstr ""
    932932
    933 #: admin/partials/chordpress-admin-options.php:830
     933#: admin/partials/chordpress-admin-options.php:833
    934934msgid "Diminished Chords"
    935935msgstr ""
    936936
    937 #: admin/partials/chordpress-admin-options.php:833
     937#: admin/partials/chordpress-admin-options.php:836
    938938msgid "Imports a common version of the diminished chords for the base notes A, B, C, D, E, F and G."
    939939msgstr ""
    940940
    941 #: admin/partials/chordpress-admin-options.php:837
     941#: admin/partials/chordpress-admin-options.php:840
    942942msgid "Diminished 7 Chords"
    943943msgstr ""
    944944
    945 #: admin/partials/chordpress-admin-options.php:840
     945#: admin/partials/chordpress-admin-options.php:843
    946946msgid "Imports a common version of the diminished 7 chords for the base notes A, B, C, D, E, F and G."
    947947msgstr ""
    948948
    949 #: admin/partials/chordpress-admin-options.php:844
     949#: admin/partials/chordpress-admin-options.php:847
    950950msgid "Augurated Chords"
    951951msgstr ""
    952952
    953 #: admin/partials/chordpress-admin-options.php:847
     953#: admin/partials/chordpress-admin-options.php:850
    954954msgid "Imports a common version of the augurated chords for the base notes A, B, C, D, E, F and G."
    955955msgstr ""
    956956
    957 #: admin/partials/chordpress-admin-options.php:851
     957#: admin/partials/chordpress-admin-options.php:854
    958958msgid "Suspended 2 Chords"
    959959msgstr ""
    960960
    961 #: admin/partials/chordpress-admin-options.php:854
     961#: admin/partials/chordpress-admin-options.php:857
    962962msgid "Imports a common version of the suspended 2 chords for the base notes A, B, C, D, E, F and G."
    963963msgstr ""
    964964
    965 #: admin/partials/chordpress-admin-options.php:858
     965#: admin/partials/chordpress-admin-options.php:861
    966966msgid "Suspended 4 Chords"
    967967msgstr ""
    968968
    969 #: admin/partials/chordpress-admin-options.php:861
     969#: admin/partials/chordpress-admin-options.php:864
    970970msgid "Imports a common version of the suspended 4 chords for the base notes A, B, C, D, E, F and G."
    971971msgstr ""
    972972
    973 #: admin/partials/chordpress-admin-options.php:865
     973#: admin/partials/chordpress-admin-options.php:868
    974974msgid "Suspended 7_4 Chords"
    975975msgstr ""
    976976
    977 #: admin/partials/chordpress-admin-options.php:868
     977#: admin/partials/chordpress-admin-options.php:871
    978978msgid "Imports a common version of the suspended 7_4 chords for the base notes A, B, C, D, E, F and G."
    979979msgstr ""
    980980
    981 #: admin/partials/chordpress-admin-options.php:872
     981#: admin/partials/chordpress-admin-options.php:875
    982982msgid "Maj 7 Chords"
    983983msgstr ""
    984984
    985 #: admin/partials/chordpress-admin-options.php:875
     985#: admin/partials/chordpress-admin-options.php:878
    986986msgid "Imports a common version of the Maj 7 chords for the base notes A, B, C, D, E, F and G."
    987987msgstr ""
    988988
    989 #: admin/partials/chordpress-admin-options.php:892
     989#: admin/partials/chordpress-admin-options.php:895
    990990msgid "Select general options for this plugin."
    991991msgstr ""
    992992
    993 #: admin/partials/chordpress-admin-options.php:897
    994 msgid "Remove data on uninstall"
    995 msgstr ""
    996 
    997 #: admin/partials/chordpress-admin-options.php:899
     993#: admin/partials/chordpress-admin-options.php:900
     994msgid "Remove options on delete"
     995msgstr ""
     996
     997#: admin/partials/chordpress-admin-options.php:902
     998#: admin/partials/chordpress-admin-options.php:909
    998999msgid "Yes"
    9991000msgstr ""
    10001001
    1001 #: admin/partials/chordpress-admin-options.php:900
    1002 msgid "Remove plugin options from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
    1003 msgstr ""
    1004 
    1005 #: admin/partials/chordpress-admin-options.php:931
     1002#: admin/partials/chordpress-admin-options.php:903
     1003msgid "Remove plugin options and settings from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
     1004msgstr ""
     1005
     1006#: admin/partials/chordpress-admin-options.php:907
     1007msgid "Remove guitar chord posts on delete"
     1008msgstr ""
     1009
     1010#: admin/partials/chordpress-admin-options.php:910
     1011msgid "Remove all guitar chord posts from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
     1012msgstr ""
     1013
     1014#: admin/partials/chordpress-admin-options.php:941
    10061015msgid "Version"
    10071016msgstr ""
    10081017
    1009 #: admin/partials/chordpress-admin-options.php:937
     1018#: admin/partials/chordpress-admin-options.php:947
    10101019msgid "Author"
    10111020msgstr ""
    10121021
    1013 #: admin/partials/chordpress-admin-options.php:955
     1022#: admin/partials/chordpress-admin-options.php:965
    10141023msgid "Credits"
    10151024msgstr ""
     
    11801189msgstr ""
    11811190
    1182 #: includes/class-chordpress-renderer.php:579
     1191#: includes/class-chordpress-renderer.php:583
    11831192msgid "Transpose up"
    11841193msgstr ""
    11851194
    1186 #: includes/class-chordpress-renderer.php:593
     1195#: includes/class-chordpress-renderer.php:597
    11871196msgid "No chords"
    11881197msgstr ""
    11891198
    1190 #: includes/class-chordpress-renderer.php:598
     1199#: includes/class-chordpress-renderer.php:602
    11911200msgid "Print"
    11921201msgstr ""
    11931202
    1194 #: includes/class-chordpress-renderer.php:630
     1203#: includes/class-chordpress-renderer.php:635
    11951204msgid "Composer"
    11961205msgstr ""
    11971206
    1198 #: includes/class-chordpress-renderer.php:631
     1207#: includes/class-chordpress-renderer.php:636
    11991208msgid "Artist"
    12001209msgstr ""
    12011210
    1202 #: includes/class-chordpress-renderer.php:632
     1211#: includes/class-chordpress-renderer.php:637
    12031212msgid "Year"
    12041213msgstr ""
    12051214
    1206 #: includes/class-chordpress-renderer.php:633
     1215#: includes/class-chordpress-renderer.php:638
    12071216msgid "Album"
    12081217msgstr ""
    12091218
    1210 #: includes/class-chordpress-renderer.php:636
     1219#: includes/class-chordpress-renderer.php:641
    12111220msgid "Key (original)"
    12121221msgstr ""
    12131222
    1214 #: includes/class-chordpress-renderer.php:637
     1223#: includes/class-chordpress-renderer.php:642
    12151224msgid "Key (transposed)"
    12161225msgstr ""
    12171226
    1218 #: includes/class-chordpress-renderer.php:644
     1227#: includes/class-chordpress-renderer.php:649
    12191228msgid "Time"
    12201229msgstr ""
    12211230
    1222 #: includes/class-chordpress-renderer.php:645
     1231#: includes/class-chordpress-renderer.php:650
    12231232msgid "Tempo"
    12241233msgstr ""
    12251234
    1226 #: includes/class-chordpress-renderer.php:646
     1235#: includes/class-chordpress-renderer.php:651
    12271236msgid "Capo"
    12281237msgstr ""
    12291238
    1230 #: includes/class-chordpress-renderer.php:668
     1239#: includes/class-chordpress-renderer.php:674
    12311240msgid "These known chords are used in this song"
    12321241msgstr ""
    12331242
    1234 #: includes/class-chordpress-renderer.php:761
     1243#: includes/class-chordpress-renderer.php:767
    12351244msgid "Missing square bracket in line"
    12361245msgstr ""
  • chordpress/tags/3.4.0/makepot.cmd

    r2754156 r2877462  
    1 D:\xampp8.1.6\php\php.exe D:/wp-cli.phar i18n make-pot . languages/chordpress.pot --slug=chordpress --include="*.php,admin/*.php,admin/partials/*.php,includes/*.php,public/*.php,public/partials/*.php"
     1D:\xampp8.1.12\php\php.exe D:/wp-cli.phar i18n make-pot . languages/chordpress.pot --slug=chordpress --include="*.php,admin/*.php,admin/partials/*.php,includes/*.php,public/*.php,public/partials/*.php"
  • chordpress/tags/3.4.0/readme.txt

    r2874790 r2877462  
    55Requires at least: 4.0
    66Tested up to: 6.1
    7 Stable tag: 3.3.3
     7Stable tag: 3.4.0
    88Requires PHP: 5.2.4
    99License: GPLv3
     
    130130
    131131== Changelog ==
     132= 3.4.0 =
     133* 2023-03-09
     134* Allow "yes", "1" and "true" for shortcode parameters
     135* Updated delete function (option to delete settings and chord posts)
     136
    132137= 3.3.3 =
    133138* 2023-03-04
  • chordpress/tags/3.4.0/uninstall.php

    r2624179 r2877462  
    11<?php
    2 
    3 /**
    4  * Fired when the plugin is uninstalled.
     2/** ===========================================================================
     3 *  Fired when the plugin is uninstalled.
    54 *
    65 * @link       https://www.lewe.com
     
    1312/**
    1413 * If uninstall not called from WordPress, then exit.
    15  *
    16  * @since    2.0.0
    1714 */
    18 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    19     exit;
     15if (!defined('WP_UNINSTALL_PLUGIN')) {
     16    exit;
    2017}
    2118
    2219/**
    23  * The unique name (slug) of this plugin.
    24  *
    25  * @since    2.0.0
    26  * @var      string    $pname    The ID of this plugin.
     20 * @var string $pname The unique name of this plugin.
    2721 */
    2822$pname = 'chordpress';
     
    3024/**
    3125 * Exit if admin did not select to delete the plugin data upon uninstall/delete.
    32  *
    33  * @since    2.0.0
    3426 */
    35 if (!get_option($pname.'_checkbox_uninstall_delete')) return false;
     27if (!get_option($pname . '_checkbox_uninstall_delete_options') && !get_option($pname . '_checkbox_uninstall_delete_chordposts')) return false;
    3628
     29// ----------------------------------------------------------------------------
    3730/**
    3831 * Delete plugin options.
    39  *
    40  * @since    2.0.0
    4132 */
    42 $options = array (
     33if (get_option($pname . '_checkbox_uninstall_delete_options')) {
     34    $options = array(
     35        $pname . '_checkbox_hide_album',
     36        $pname . '_checkbox_hide_artist',
     37        $pname . '_checkbox_hide_chords',
     38        $pname . '_checkbox_hide_comments',
     39        $pname . '_checkbox_hide_composer',
     40        $pname . '_checkbox_hide_print',
     41        $pname . '_checkbox_hide_subtitle',
     42        $pname . '_checkbox_hide_title',
     43        $pname . '_checkbox_hide_transpose',
     44        $pname . '_checkbox_hide_year',
     45        $pname . '_checkbox_hb_notation',
     46        $pname . '_checkbox_show_chord_sheet',
     47        $pname . '_checkbox_show_jtab_sheet',
     48        $pname . '_checkbox_show_chord_sheet_on_top',
     49        $pname . '_select_title_level',
     50        $pname . '_select_subtitle_level',
     51        $pname . '_text_meta_style',
     52        $pname . '_text_chord_style',
     53        $pname . '_text_lyrics_style',
     54        $pname . '_text_comment_style',
     55        $pname . '_text_chorus_style',
     56        $pname . '_text_verse_style',
     57        $pname . '_text_line_style',
     58        $pname . '_text_chord_backgroundColor',
     59        $pname . '_number_chord_barreChordRadius',
     60        $pname . '_text_chord_barreChordStrokeColor',
     61        $pname . '_number_chord_barreChordStrokeWidth',
     62        $pname . '_number_chord_canvasWidth',
     63        $pname . '_text_chord_color',
     64        $pname . '_number_chord_emptyStringIndicatorSize',
     65        $pname . '_checkbox_chord_fixedDiagramPosition',
     66        $pname . '_text_chord_fontFamily',
     67        $pname . '_text_chord_fretColor',
     68        $pname . '_text_chord_fretLabelColor',
     69        $pname . '_text_chord_fretLabelColor',
     70        $pname . '_select_chord_fretLabelPosition',
     71        $pname . '_number_chord_fretLabelFontSize',
     72        $pname . '_number_chord_frets',
     73        $pname . '_number_chord_fretSize',
     74        $pname . '_number_chord_nutSize',
     75        $pname . '_text_chord_nutColor',
     76        $pname . '_text_chord_nutStrokeColor',
     77        $pname . '_number_chord_nutStrokeWidth',
     78        $pname . '_text_chord_nutTextColor',
     79        $pname . '_number_chord_nutTextSize',
     80        $pname . '_number_chord_position',
     81        $pname . '_number_chord_sidePadding',
     82        $pname . '_text_chord_stringColor',
     83        $pname . '_select_chord_strings',
     84        $pname . '_number_chord_strokeWidth',
     85        $pname . '_select_chord_style',
     86        $pname . '_number_chord_titleBottomMargin',
     87        $pname . '_text_chord_titleColor',
     88        $pname . '_number_chord_titleFontSize',
     89        $pname . '_number_chord_topFretWidth',
     90        $pname . '_text_chord_tuning',
     91        $pname . '_text_chord_tuningsColor',
     92        $pname . '_number_chord_tuningsFontSize',
     93    );
    4394
    44    $pname.'_checkbox_uninstall_delete',
    45    $pname.'_checkbox_hide_album',
    46    $pname.'_checkbox_hide_artist',
    47    $pname.'_checkbox_hide_chords',
    48    $pname.'_checkbox_hide_comments',
    49    $pname.'_checkbox_hide_composer',
    50    $pname.'_checkbox_hide_print',
    51    $pname.'_checkbox_hide_subtitle',
    52    $pname.'_checkbox_hide_title',
    53    $pname.'_checkbox_hide_transpose',
    54    $pname.'_checkbox_hide_year',
    55    $pname.'_checkbox_hb_notation',
    56    $pname.'_select_title_level',
    57    $pname.'_select_subtitle_level',
    58    $pname.'_text_meta_style',
    59    $pname.'_text_chord_style',
    60    $pname.'_text_lyrics_style',
    61    $pname.'_text_comment_style',
    62    $pname.'_text_chorus_style',
    63    $pname.'_text_verse_style'
     95    foreach ($options as $option) {
     96        delete_option($option);
     97    }
     98}
    6499
    65 );
     100// ----------------------------------------------------------------------------
     101/**
     102 * Delete guitar chord posts and post type.
     103 */
     104if (get_option($pname . '_checkbox_uninstall_delete_chordposts')) {
     105    $args = array(
     106        'post_type' => 'guitar_chord',
     107        'posts_per_page' => -1
     108    );
     109    $query = new WP_Query ($args);
     110    while ($query->have_posts()) {
     111        $query->the_post();
     112        $id = get_the_ID();
     113        wp_delete_post($id, true);
     114    }
     115    wp_reset_postdata();
    66116
    67 foreach ($options as $option) {
    68 
    69    delete_option($option);
    70    
     117    global $wp_post_types;
     118    if (isset($wp_post_types['guitar_chord'])) {
     119        unset($wp_post_types['guitar_chord']);
     120    }
    71121}
  • chordpress/trunk/admin/partials/chordpress-admin-options.php

    r2838045 r2877462  
    444444                                <td>
    445445                                    <input type="text" id="<?php echo $pname; ?>_text_meta_style" name="<?php echo $pname; ?>_text_meta_style" value="<?php echo get_option($pname . '_text_meta_style'); ?>" />
    446                                     <p class="description"><?php echo esc_html(__('Enter CSS for the meta header block, e.g.: font-style: italic;', 'chordpress')); ?></p>
     446                                    <p class="description"><?php echo esc_html(__('Enter CSS for the meta header block, e.g.', 'chordpress')); ?>:<br>
     447                                    <code>font-style: italic;</code></p>
    447448                                </td>
    448449                            </tr>
     
    458459                                <td>
    459460                                    <input type="text" id="<?php echo $pname; ?>_text_chord_style" name="<?php echo $pname; ?>_text_chord_style" value="<?php echo get_option($pname . '_text_chord_style'); ?>" />
    460                                     <p class="description"><?php echo esc_html(__('Enter CSS for the chords here or leave empty to use the page default. E.g. font-weight:bold;color:#990000;', 'chordpress')); ?></p>
     461                                    <p class="description"><?php echo esc_html(__("Enter CSS for the chords here or leave empty to use the page default. E.g. try this for red text on a light yellow badge", 'chordpress')); ?>:<br>
     462                                    <code>background-color: #F7F1AF; border-radius: 0.3em; color: #990000; padding: 0.1em 0.3em 0.1em 0.3em;</code></p>
    461463                                </td>
    462464                            </tr>
     
    472474                                <td>
    473475                                    <input type="text" id="<?php echo $pname; ?>_text_comment_style" name="<?php echo $pname; ?>_text_comment_style" value="<?php echo get_option($pname . '_text_comment_style'); ?>" />
    474                                     <p class="description"><?php echo esc_html(__('Enter CSS for comments, e.g.: background-color: #606060; font-style: italic; padding: 4px;', 'chordpress')); ?></p>
     476                                    <p class="description"><?php echo esc_html(__('Enter CSS for comments, e.g.', 'chordpress')); ?>:<br>
     477                                    <code>background-color: #606060; font-style: italic; padding: 4px;</code></p>
    475478                                </td>
    476479                            </tr>
     
    780783
    781784                <?php
    782                 //  ,------------------,
    783                 // _| Tab: Addc Chords |_
     785                //  ,-----------------,
     786                // _| Tab: Add Chords |_
    784787                //
    785788                if ($active_tab == 'tab_samples') $display = "display:block;";
     
    895898                        <tbody>
    896899                            <tr>
    897                                 <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete"><?php echo esc_html(__('Remove data on uninstall', 'chordpress')); ?></label></th>
    898                                 <td>
    899                                     <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete" name="<?php echo $pname; ?>_checkbox_uninstall_delete" <?php checked(get_option($pname . '_checkbox_uninstall_delete'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
    900                                     <p class="description"><?php echo esc_html(__('Remove plugin options from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
     900                                <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete_options"><?php echo esc_html(__('Remove options on delete', 'chordpress')); ?></label></th>
     901                                <td>
     902                                    <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete_options" name="<?php echo $pname; ?>_checkbox_uninstall_delete_options" <?php checked(get_option($pname . '_checkbox_uninstall_delete_options'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
     903                                    <p class="description"><?php echo esc_html(__('Remove plugin options and settings from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
     904                                </td>
     905                            </tr>
     906                            <tr>
     907                                <th scope="row"><label for="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts"><?php echo esc_html(__('Remove guitar chord posts on delete', 'chordpress')); ?></label></th>
     908                                <td>
     909                                    <p><input type="checkbox" id="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts" name="<?php echo $pname; ?>_checkbox_uninstall_delete_chordposts" <?php checked(get_option($pname . '_checkbox_uninstall_delete_chordposts'), 1); ?> value='1'>&nbsp;<?php echo esc_html(__('Yes', 'chordpress')); ?></p>
     910                                    <p class="description"><?php echo esc_html(__('Remove all guitar chord posts from the database when the plugin is deleted (does not apply when the plugin is just deactivated).', 'chordpress')); ?></p>
    901911                                </td>
    902912                            </tr>
  • chordpress/trunk/chordpress.php

    r2874790 r2877462  
    3636 */
    3737define('CHORDPRESS_NAME', 'ChordPress');
    38 define('CHORDPRESS_VERSION', '3.3.3');
     38define('CHORDPRESS_VERSION', '3.4.0');
    3939define('CHORDPRESS_AUTHOR', 'George Lewe');
    4040define('CHORDPRESS_AUTHOR_URI', 'https://www.lewe.com');
  • chordpress/trunk/includes/class-chordpress-chord.php

    r2874790 r2877462  
    611611     * Replaces round brackets with square brackets.
    612612     *
    613      * @param  string    $input    String with round bracktes
    614      * @return string             String with square brackets
     613     * @param  string $input  String with round bracktes
     614     * @return string - String with square brackets
    615615     */
    616616    public function replace_brackets($input)
  • chordpress/trunk/includes/class-chordpress-plugin.php

    r2838045 r2877462  
    200200            $this->plugin_name . '_number_chord_tuningsFontSize',
    201201
    202             $this->plugin_name . '_checkbox_uninstall_delete'
     202            $this->plugin_name . '_checkbox_uninstall_delete_options',
     203            $this->plugin_name . '_checkbox_uninstall_delete_chordposts'
    203204
    204205        );
  • chordpress/trunk/includes/class-chordpress-renderer.php

    r2874790 r2877462  
    528528     *
    529529     * @since    1.0.0
    530      * @param    string    $text    Text inside shortcode wrapper.
     530     * @param    object    $text    Text inside shortcode wrapper.
    531531     * @return   string             Formatted HTML of the ChordPro text.
    532532     */
    533     public function displayText($text)
     533    public function displayText($text): string
    534534    {
    535535        /**
     
    562562         * Interactive transpose / print
    563563         */
    564         if (strtolower($this->interactive) == "yes") {
     564        if (in_array(strtolower($this->interactive), array("yes", "1", "true"))) {
    565565            $returnText .= "<div class=\"cpress_interaction\">";
    566566            $transposeForm = "";
     
    991991        $nashvilleChords = array('1', '2', '3', '4', '5', '6', '7');
    992992
    993         if (strlen($ch) == 0) return;
     993        if (strlen($ch) == 0) return '';
    994994
    995995        /**
     
    11401140        );
    11411141
    1142         if ($this->hbNotation == 'yes') {
     1142        if (in_array(strtolower($this->hbNotation), array("yes", "1", "true"))) {
    11431143            if (array_key_exists(strtoupper($n), $hbNotation)) {
    11441144                return $hbNotation[strtoupper($n)];
  • chordpress/trunk/languages/chordpress.pot

    r2838045 r2877462  
    1 # Copyright (C) 2022 George Lewe
     1# Copyright (C) 2023 George Lewe
    22# This file is distributed under the same license as the Lewe ChordPress plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Lewe ChordPress 3.2.1\n"
     5"Project-Id-Version: Lewe ChordPress 3.3.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/chordpress\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-12-22T16:01:46+01:00\n"
     12"POT-Creation-Date: 2023-03-09T21:55:13+01:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    157157#: admin/partials/chordpress-admin-license.php:41
    158158#: admin/partials/chordpress-admin-options.php:253
    159 #: admin/partials/chordpress-admin-options.php:943
     159#: admin/partials/chordpress-admin-options.php:953
    160160msgid "Documentation"
    161161msgstr ""
    162162
    163163#: admin/class-chordpress-admin.php:246
    164 #: admin/partials/chordpress-admin-options.php:949
     164#: admin/partials/chordpress-admin-options.php:959
    165165msgid "Support"
    166166msgstr ""
     
    178178#: admin/class-chordpress-admin.php:301
    179179#: admin/partials/chordpress-admin-chord-meta-box.php:53
    180 #: admin/partials/chordpress-admin-options.php:925
     180#: admin/partials/chordpress-admin-options.php:935
    181181msgid "Name"
    182182msgstr ""
    183183
    184184#: admin/class-chordpress-admin.php:302
    185 #: admin/partials/chordpress-admin-options.php:689
     185#: admin/partials/chordpress-admin-options.php:692
    186186msgid "Strings"
    187187msgstr ""
     
    221221
    222222#: admin/partials/chordpress-admin-chord-meta-box.php:92
    223 #: admin/partials/chordpress-admin-options.php:754
     223#: admin/partials/chordpress-admin-options.php:757
    224224msgid "Tuning"
    225225msgstr ""
     
    563563
    564564#: admin/partials/chordpress-admin-options.php:446
    565 msgid "Enter CSS for the meta header block, e.g.: font-style: italic;"
    566 msgstr ""
    567 
    568 #: admin/partials/chordpress-admin-options.php:450
     565msgid "Enter CSS for the meta header block, e.g."
     566msgstr ""
     567
     568#: admin/partials/chordpress-admin-options.php:451
    569569msgid "Line Style"
    570570msgstr ""
    571571
    572 #: admin/partials/chordpress-admin-options.php:453
     572#: admin/partials/chordpress-admin-options.php:454
    573573msgid "Enter CSS for the lines here or leave empty to use the default (margin: 1em 0 1em 0;)."
    574574msgstr ""
    575575
    576 #: admin/partials/chordpress-admin-options.php:457
     576#: admin/partials/chordpress-admin-options.php:458
    577577msgid "Chord Style"
    578578msgstr ""
    579579
    580 #: admin/partials/chordpress-admin-options.php:460
    581 msgid "Enter CSS for the chords here or leave empty to use the page default. E.g. font-weight:bold;color:#990000;"
    582 msgstr ""
    583 
    584 #: admin/partials/chordpress-admin-options.php:464
     580#: admin/partials/chordpress-admin-options.php:461
     581msgid "Enter CSS for the chords here or leave empty to use the page default. E.g. try this for red text on a light yellow badge"
     582msgstr ""
     583
     584#: admin/partials/chordpress-admin-options.php:466
    585585msgid "Lyrics Style"
    586586msgstr ""
    587587
    588 #: admin/partials/chordpress-admin-options.php:467
     588#: admin/partials/chordpress-admin-options.php:469
    589589msgid "Enter CSS for the lyrics here or leave empty to use the page default."
    590590msgstr ""
    591591
    592 #: admin/partials/chordpress-admin-options.php:471
     592#: admin/partials/chordpress-admin-options.php:473
    593593msgid "Comment Style"
    594594msgstr ""
    595595
    596 #: admin/partials/chordpress-admin-options.php:474
    597 msgid "Enter CSS for comments, e.g.: background-color: #606060; font-style: italic; padding: 4px;"
    598 msgstr ""
    599 
    600 #: admin/partials/chordpress-admin-options.php:478
     596#: admin/partials/chordpress-admin-options.php:476
     597msgid "Enter CSS for comments, e.g."
     598msgstr ""
     599
     600#: admin/partials/chordpress-admin-options.php:481
    601601msgid "Chorus Style"
    602602msgstr ""
    603603
    604 #: admin/partials/chordpress-admin-options.php:481
     604#: admin/partials/chordpress-admin-options.php:484
     605#: admin/partials/chordpress-admin-options.php:491
     606msgid "Enter CSS for the"
     607msgstr ""
     608
     609#: admin/partials/chordpress-admin-options.php:484
     610msgid "chorus sections"
     611msgstr ""
     612
    605613#: admin/partials/chordpress-admin-options.php:488
    606 msgid "Enter CSS for the"
    607 msgstr ""
    608 
    609 #: admin/partials/chordpress-admin-options.php:481
    610 msgid "chorus sections"
    611 msgstr ""
    612 
    613 #: admin/partials/chordpress-admin-options.php:485
    614614msgid "Verse Style"
    615615msgstr ""
    616616
    617 #: admin/partials/chordpress-admin-options.php:488
     617#: admin/partials/chordpress-admin-options.php:491
    618618msgid "verse sections"
    619619msgstr ""
    620620
    621 #: admin/partials/chordpress-admin-options.php:507
     621#: admin/partials/chordpress-admin-options.php:510
    622622msgid "Use this tab to specify global styles and formats for the ChordPress guitar chord diagrams.<br>For single chords using the <code>[chordpress-chord]</code> shortcode, some of them can be overwritten by shortcode parameters."
    623623msgstr ""
    624624
    625 #: admin/partials/chordpress-admin-options.php:512
     625#: admin/partials/chordpress-admin-options.php:515
    626626msgid "Sample Display"
    627627msgstr ""
    628628
    629 #: admin/partials/chordpress-admin-options.php:524
     629#: admin/partials/chordpress-admin-options.php:527
    630630msgid "This is a sample display based on your settings. You might need to refresh the page to show the diagram."
    631631msgstr ""
    632632
    633 #: admin/partials/chordpress-admin-options.php:528
     633#: admin/partials/chordpress-admin-options.php:531
    634634msgid "Background Color"
    635635msgstr ""
    636636
    637 #: admin/partials/chordpress-admin-options.php:531
     637#: admin/partials/chordpress-admin-options.php:534
    638638msgid "The background CSS color of the chord diagram, e.g. #FFFFFF. To set the background to transparent (default) either set this to 'none' or leave empty."
    639639msgstr ""
    640640
    641 #: admin/partials/chordpress-admin-options.php:535
     641#: admin/partials/chordpress-admin-options.php:538
    642642msgid "Barre Border Radius"
    643643msgstr ""
    644644
    645 #: admin/partials/chordpress-admin-options.php:538
     645#: admin/partials/chordpress-admin-options.php:541
    646646msgid "The barre chord rectangle border radius relative to the nutSize (eg. 1 means completely round endges, 0 means not rounded at all). Leave empty for the default: 0.25."
    647647msgstr ""
    648648
    649 #: admin/partials/chordpress-admin-options.php:542
     649#: admin/partials/chordpress-admin-options.php:545
    650650msgid "Barre Bar Stroke Color"
    651651msgstr ""
    652652
    653 #: admin/partials/chordpress-admin-options.php:545
     653#: admin/partials/chordpress-admin-options.php:548
    654654msgid "The stroke CSS color of a barre chord. Defaults to the nut color if not set. Leave empty for the default 'Nut Color'."
    655655msgstr ""
    656656
    657 #: admin/partials/chordpress-admin-options.php:549
     657#: admin/partials/chordpress-admin-options.php:552
    658658msgid "Barre Bar Stroke Width"
    659659msgstr ""
    660660
    661 #: admin/partials/chordpress-admin-options.php:552
     661#: admin/partials/chordpress-admin-options.php:555
    662662msgid "The stroke width of a barre chord in pixel. Leave empty for the default 0."
    663663msgstr ""
    664664
    665 #: admin/partials/chordpress-admin-options.php:556
     665#: admin/partials/chordpress-admin-options.php:559
    666666msgid "Canvas Width"
    667667msgstr ""
    668668
    669 #: admin/partials/chordpress-admin-options.php:559
     669#: admin/partials/chordpress-admin-options.php:562
    670670msgid "Enter the width of the chord diagrams canvas in pixel. Leave emtpy for the default of 180. The height will be adjusted automatically."
    671671msgstr ""
    672672
    673 #: admin/partials/chordpress-admin-options.php:563
     673#: admin/partials/chordpress-admin-options.php:566
    674674msgid "Global Color"
    675675msgstr ""
    676676
    677 #: admin/partials/chordpress-admin-options.php:566
     677#: admin/partials/chordpress-admin-options.php:569
    678678msgid "Global color of the whole chart. Can be overridden with more specific color settings such as 'Title Color' or 'String Color'. Leave empty for the default #000000."
    679679msgstr ""
    680680
    681 #: admin/partials/chordpress-admin-options.php:570
     681#: admin/partials/chordpress-admin-options.php:573
    682682msgid "Empty String Indicator Size"
    683683msgstr ""
    684684
    685 #: admin/partials/chordpress-admin-options.php:573
     685#: admin/partials/chordpress-admin-options.php:576
    686686msgid "Size of the Xs and Os above empty strings relative to the space between two strings. Leave empty for the default: 0.6."
    687687msgstr ""
    688688
    689 #: admin/partials/chordpress-admin-options.php:577
     689#: admin/partials/chordpress-admin-options.php:580
    690690msgid "Fixed Diagram Position"
    691691msgstr ""
    692692
    693 #: admin/partials/chordpress-admin-options.php:580
     693#: admin/partials/chordpress-admin-options.php:583
    694694msgid "With this option selected, the distance between the chord diagram and the top of the SVG stays the same, no matter if a title is defined or not. Default is off."
    695695msgstr ""
    696696
    697 #: admin/partials/chordpress-admin-options.php:584
     697#: admin/partials/chordpress-admin-options.php:587
    698698msgid "Font Family"
    699699msgstr ""
    700700
    701 #: admin/partials/chordpress-admin-options.php:587
     701#: admin/partials/chordpress-admin-options.php:590
    702702msgid "The font family used for all letters and numbers. Leave empty for the default: 'Arial, \"Helvetica Neue\", Helvetica, sans-serif'."
    703703msgstr ""
    704704
    705 #: admin/partials/chordpress-admin-options.php:591
     705#: admin/partials/chordpress-admin-options.php:594
    706706msgid "Fret Color"
    707707msgstr ""
    708708
    709 #: admin/partials/chordpress-admin-options.php:594
     709#: admin/partials/chordpress-admin-options.php:597
    710710msgid "Fret color. Leave empty for default: 'Global Color'."
    711711msgstr ""
    712712
    713 #: admin/partials/chordpress-admin-options.php:598
     713#: admin/partials/chordpress-admin-options.php:601
    714714msgid "Fret Label Color"
    715715msgstr ""
    716716
    717 #: admin/partials/chordpress-admin-options.php:601
     717#: admin/partials/chordpress-admin-options.php:604
    718718msgid "Fret label color. Leave empty for default: 'Global Color'."
    719719msgstr ""
    720720
    721 #: admin/partials/chordpress-admin-options.php:605
     721#: admin/partials/chordpress-admin-options.php:608
    722722msgid "Fret Label Font Size"
    723723msgstr ""
    724724
    725 #: admin/partials/chordpress-admin-options.php:608
     725#: admin/partials/chordpress-admin-options.php:611
    726726msgid "Font size of the fret label. Leave empty for the default: 38."
    727727msgstr ""
    728728
    729 #: admin/partials/chordpress-admin-options.php:612
     729#: admin/partials/chordpress-admin-options.php:615
    730730msgid "Frets"
    731731msgstr ""
    732732
    733 #: admin/partials/chordpress-admin-options.php:615
     733#: admin/partials/chordpress-admin-options.php:618
    734734msgid "Number of frets to show in the chart. Leave empty for the default: 4."
    735735msgstr ""
    736736
    737 #: admin/partials/chordpress-admin-options.php:619
     737#: admin/partials/chordpress-admin-options.php:622
    738738msgid "Fret Height"
    739739msgstr ""
    740740
    741 #: admin/partials/chordpress-admin-options.php:622
     741#: admin/partials/chordpress-admin-options.php:625
    742742msgid "Height of a fret, relative to the space between two strings. Leave empty for the default: 1.5."
    743743msgstr ""
    744744
    745 #: admin/partials/chordpress-admin-options.php:626
     745#: admin/partials/chordpress-admin-options.php:629
    746746msgid "Nut Size"
    747747msgstr ""
    748748
    749 #: admin/partials/chordpress-admin-options.php:629
     749#: admin/partials/chordpress-admin-options.php:632
    750750msgid "Size of a nut relative to the string spacing. Leave empty for the default: 0.85."
    751751msgstr ""
    752752
    753 #: admin/partials/chordpress-admin-options.php:633
     753#: admin/partials/chordpress-admin-options.php:636
    754754msgid "Nut Color"
    755755msgstr ""
    756756
    757 #: admin/partials/chordpress-admin-options.php:636
     757#: admin/partials/chordpress-admin-options.php:639
    758758msgid "Color of a finger/nut. Leave empty for default: 'Global Color'."
    759759msgstr ""
    760760
    761 #: admin/partials/chordpress-admin-options.php:640
     761#: admin/partials/chordpress-admin-options.php:643
    762762msgid "Nut Stroke Color"
    763763msgstr ""
    764764
    765 #: admin/partials/chordpress-admin-options.php:643
     765#: admin/partials/chordpress-admin-options.php:646
    766766msgid "Stroke color of a nut. Leave empty for default: 'Nut Color'. If nut color is not set it defaults to 'Global Color'."
    767767msgstr ""
    768768
    769 #: admin/partials/chordpress-admin-options.php:647
     769#: admin/partials/chordpress-admin-options.php:650
    770770msgid "Nut Stroke Width"
    771771msgstr ""
    772772
    773 #: admin/partials/chordpress-admin-options.php:650
     773#: admin/partials/chordpress-admin-options.php:653
    774774msgid "Stroke width of a nut. Leave empty for the default: 0."
    775775msgstr ""
    776776
    777 #: admin/partials/chordpress-admin-options.php:654
     777#: admin/partials/chordpress-admin-options.php:657
    778778msgid "Nut Text Color"
    779779msgstr ""
    780780
    781 #: admin/partials/chordpress-admin-options.php:657
     781#: admin/partials/chordpress-admin-options.php:660
    782782msgid "Text color of a nut. Leave empty for default: #FFFFFF."
    783783msgstr ""
    784784
    785 #: admin/partials/chordpress-admin-options.php:661
     785#: admin/partials/chordpress-admin-options.php:664
    786786msgid "Nut Text Size"
    787787msgstr ""
    788788
    789 #: admin/partials/chordpress-admin-options.php:664
     789#: admin/partials/chordpress-admin-options.php:667
    790790msgid "Font size of the nut label. Leave empty for the default: 24."
    791791msgstr ""
    792792
    793 #: admin/partials/chordpress-admin-options.php:668
     793#: admin/partials/chordpress-admin-options.php:671
    794794msgid "Position"
    795795msgstr ""
    796796
    797 #: admin/partials/chordpress-admin-options.php:671
     797#: admin/partials/chordpress-admin-options.php:674
    798798msgid "Default start fret position (first fret is 1). Leave empty for the default: 1."
    799799msgstr ""
    800800
    801 #: admin/partials/chordpress-admin-options.php:675
     801#: admin/partials/chordpress-admin-options.php:678
    802802msgid "Side Padding"
    803803msgstr ""
    804804
    805 #: admin/partials/chordpress-admin-options.php:678
     805#: admin/partials/chordpress-admin-options.php:681
    806806msgid "The minimum side padding (from the guitar to the edge of the chart) relative to the whole width. This is only applied if it's larger than the letters inside of the padding (eg the starting fret). Leave empty for the default: 0.2."
    807807msgstr ""
    808808
    809 #: admin/partials/chordpress-admin-options.php:682
     809#: admin/partials/chordpress-admin-options.php:685
    810810msgid "String Color"
    811811msgstr ""
    812812
    813 #: admin/partials/chordpress-admin-options.php:685
     813#: admin/partials/chordpress-admin-options.php:688
    814814msgid "Text color of a nut. Leave empty for default: 'Global Color'."
    815815msgstr ""
    816816
    817 #: admin/partials/chordpress-admin-options.php:700
     817#: admin/partials/chordpress-admin-options.php:703
    818818msgid "Number of strings. Default is '6'."
    819819msgstr ""
    820820
    821 #: admin/partials/chordpress-admin-options.php:704
     821#: admin/partials/chordpress-admin-options.php:707
    822822msgid "Stroke Width"
    823823msgstr ""
    824824
    825 #: admin/partials/chordpress-admin-options.php:707
     825#: admin/partials/chordpress-admin-options.php:710
    826826msgid "Global stroke width. Leave empty for the default: 2."
    827827msgstr ""
    828828
    829 #: admin/partials/chordpress-admin-options.php:711
     829#: admin/partials/chordpress-admin-options.php:714
    830830msgid "Style"
    831831msgstr ""
    832832
    833 #: admin/partials/chordpress-admin-options.php:722
     833#: admin/partials/chordpress-admin-options.php:725
    834834msgid "Select between 'Normal' and 'Handdrawn'. Default is 'Normal'."
    835835msgstr ""
    836836
    837 #: admin/partials/chordpress-admin-options.php:726
     837#: admin/partials/chordpress-admin-options.php:729
    838838msgid "Title Bottom Margin"
    839839msgstr ""
    840840
    841 #: admin/partials/chordpress-admin-options.php:729
     841#: admin/partials/chordpress-admin-options.php:732
    842842msgid "Space between the title and the chart. Leave empty for the default: 0."
    843843msgstr ""
    844844
    845 #: admin/partials/chordpress-admin-options.php:733
     845#: admin/partials/chordpress-admin-options.php:736
    846846msgid "Title Color"
    847847msgstr ""
    848848
    849 #: admin/partials/chordpress-admin-options.php:736
     849#: admin/partials/chordpress-admin-options.php:739
    850850msgid "Text color of the title. Leave empty for default: 'Global Color'."
    851851msgstr ""
    852852
    853 #: admin/partials/chordpress-admin-options.php:740
     853#: admin/partials/chordpress-admin-options.php:743
    854854msgid "Title Font Size"
    855855msgstr ""
    856856
    857 #: admin/partials/chordpress-admin-options.php:743
     857#: admin/partials/chordpress-admin-options.php:746
    858858msgid "Font size of the title. This is only the initial font size. If the title doesn't fit, the title is automatically scaled so that it fits. Leave empty for the default: 48."
    859859msgstr ""
    860860
    861 #: admin/partials/chordpress-admin-options.php:747
     861#: admin/partials/chordpress-admin-options.php:750
    862862msgid "Top Fret Width"
    863863msgstr ""
    864864
    865 #: admin/partials/chordpress-admin-options.php:750
     865#: admin/partials/chordpress-admin-options.php:753
    866866msgid "Top fret width (only used if position is 1). Leave empty for the default: 10."
    867867msgstr ""
    868868
    869 #: admin/partials/chordpress-admin-options.php:757
     869#: admin/partials/chordpress-admin-options.php:760
    870870msgid "Labels under the strings for their tuning. Leave empty for default: [ 'E', 'A', 'D', 'G', 'B', 'E' ]."
    871871msgstr ""
    872872
    873 #: admin/partials/chordpress-admin-options.php:761
     873#: admin/partials/chordpress-admin-options.php:764
    874874msgid "Tunings Color"
    875875msgstr ""
    876876
    877 #: admin/partials/chordpress-admin-options.php:764
     877#: admin/partials/chordpress-admin-options.php:767
    878878msgid "Tunings color. Leave empty for default: 'Global Color'."
    879879msgstr ""
    880880
    881 #: admin/partials/chordpress-admin-options.php:768
     881#: admin/partials/chordpress-admin-options.php:771
    882882msgid "Tunings Font Size"
    883883msgstr ""
    884884
    885 #: admin/partials/chordpress-admin-options.php:771
     885#: admin/partials/chordpress-admin-options.php:774
    886886msgid "Font size of the tunig labels. Leave empty for the default: 28."
    887887msgstr ""
    888888
    889 #: admin/partials/chordpress-admin-options.php:790
     889#: admin/partials/chordpress-admin-options.php:793
    890890msgid "Use this tab to create chord diagrams. These diagram are saved as \"Guitar Chord\" posts. They will be added to the ones that already exist."
    891891msgstr ""
    892892
    893 #: admin/partials/chordpress-admin-options.php:795
     893#: admin/partials/chordpress-admin-options.php:798
    894894msgid "Major Chords"
    895895msgstr ""
    896896
    897 #: admin/partials/chordpress-admin-options.php:798
     897#: admin/partials/chordpress-admin-options.php:801
    898898msgid "Imports a common version of the major chords for the base notes A, B, C, D, E, F and G."
    899899msgstr ""
    900900
    901 #: admin/partials/chordpress-admin-options.php:802
     901#: admin/partials/chordpress-admin-options.php:805
    902902msgid "Major 7 Chords"
    903903msgstr ""
    904904
    905 #: admin/partials/chordpress-admin-options.php:805
     905#: admin/partials/chordpress-admin-options.php:808
    906906msgid "Imports a common version of the major 7 chords for the base notes A, B, C, D, E, F and G."
    907907msgstr ""
    908908
    909 #: admin/partials/chordpress-admin-options.php:809
     909#: admin/partials/chordpress-admin-options.php:812
    910910msgid "Major 5 Chords"
    911911msgstr ""
    912912
    913 #: admin/partials/chordpress-admin-options.php:812
     913#: admin/partials/chordpress-admin-options.php:815
    914914msgid "Imports a common version of the major 5 chords for the base notes A, B, C, D, E, F and G."
    915915msgstr ""
    916916
    917 #: admin/partials/chordpress-admin-options.php:816
     917#: admin/partials/chordpress-admin-options.php:819
    918918msgid "Minor Chords"
    919919msgstr ""
    920920
    921 #: admin/partials/chordpress-admin-options.php:819
     921#: admin/partials/chordpress-admin-options.php:822
    922922msgid "Imports a common version of the minor chords for the base notes A, B, C, D, E, F and G."
    923923msgstr ""
    924924
    925 #: admin/partials/chordpress-admin-options.php:823
     925#: admin/partials/chordpress-admin-options.php:826
    926926msgid "Minor 7 Chords"
    927927msgstr ""
    928928
    929 #: admin/partials/chordpress-admin-options.php:826
     929#: admin/partials/chordpress-admin-options.php:829
    930930msgid "Imports a common version of the minor 7 chords for the base notes A, B, C, D, E, F and G."
    931931msgstr ""
    932932
    933 #: admin/partials/chordpress-admin-options.php:830
     933#: admin/partials/chordpress-admin-options.php:833
    934934msgid "Diminished Chords"
    935935msgstr ""
    936936
    937 #: admin/partials/chordpress-admin-options.php:833
     937#: admin/partials/chordpress-admin-options.php:836
    938938msgid "Imports a common version of the diminished chords for the base notes A, B, C, D, E, F and G."
    939939msgstr ""
    940940
    941 #: admin/partials/chordpress-admin-options.php:837
     941#: admin/partials/chordpress-admin-options.php:840
    942942msgid "Diminished 7 Chords"
    943943msgstr ""
    944944
    945 #: admin/partials/chordpress-admin-options.php:840
     945#: admin/partials/chordpress-admin-options.php:843
    946946msgid "Imports a common version of the diminished 7 chords for the base notes A, B, C, D, E, F and G."
    947947msgstr ""
    948948
    949 #: admin/partials/chordpress-admin-options.php:844
     949#: admin/partials/chordpress-admin-options.php:847
    950950msgid "Augurated Chords"
    951951msgstr ""
    952952
    953 #: admin/partials/chordpress-admin-options.php:847
     953#: admin/partials/chordpress-admin-options.php:850
    954954msgid "Imports a common version of the augurated chords for the base notes A, B, C, D, E, F and G."
    955955msgstr ""
    956956
    957 #: admin/partials/chordpress-admin-options.php:851
     957#: admin/partials/chordpress-admin-options.php:854
    958958msgid "Suspended 2 Chords"
    959959msgstr ""
    960960
    961 #: admin/partials/chordpress-admin-options.php:854
     961#: admin/partials/chordpress-admin-options.php:857
    962962msgid "Imports a common version of the suspended 2 chords for the base notes A, B, C, D, E, F and G."
    963963msgstr ""
    964964
    965 #: admin/partials/chordpress-admin-options.php:858
     965#: admin/partials/chordpress-admin-options.php:861
    966966msgid "Suspended 4 Chords"
    967967msgstr ""
    968968
    969 #: admin/partials/chordpress-admin-options.php:861
     969#: admin/partials/chordpress-admin-options.php:864
    970970msgid "Imports a common version of the suspended 4 chords for the base notes A, B, C, D, E, F and G."
    971971msgstr ""
    972972
    973 #: admin/partials/chordpress-admin-options.php:865
     973#: admin/partials/chordpress-admin-options.php:868
    974974msgid "Suspended 7_4 Chords"
    975975msgstr ""
    976976
    977 #: admin/partials/chordpress-admin-options.php:868
     977#: admin/partials/chordpress-admin-options.php:871
    978978msgid "Imports a common version of the suspended 7_4 chords for the base notes A, B, C, D, E, F and G."
    979979msgstr ""
    980980
    981 #: admin/partials/chordpress-admin-options.php:872
     981#: admin/partials/chordpress-admin-options.php:875
    982982msgid "Maj 7 Chords"
    983983msgstr ""
    984984
    985 #: admin/partials/chordpress-admin-options.php:875
     985#: admin/partials/chordpress-admin-options.php:878
    986986msgid "Imports a common version of the Maj 7 chords for the base notes A, B, C, D, E, F and G."
    987987msgstr ""
    988988
    989 #: admin/partials/chordpress-admin-options.php:892
     989#: admin/partials/chordpress-admin-options.php:895
    990990msgid "Select general options for this plugin."
    991991msgstr ""
    992992
    993 #: admin/partials/chordpress-admin-options.php:897
    994 msgid "Remove data on uninstall"
    995 msgstr ""
    996 
    997 #: admin/partials/chordpress-admin-options.php:899
     993#: admin/partials/chordpress-admin-options.php:900
     994msgid "Remove options on delete"
     995msgstr ""
     996
     997#: admin/partials/chordpress-admin-options.php:902
     998#: admin/partials/chordpress-admin-options.php:909
    998999msgid "Yes"
    9991000msgstr ""
    10001001
    1001 #: admin/partials/chordpress-admin-options.php:900
    1002 msgid "Remove plugin options from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
    1003 msgstr ""
    1004 
    1005 #: admin/partials/chordpress-admin-options.php:931
     1002#: admin/partials/chordpress-admin-options.php:903
     1003msgid "Remove plugin options and settings from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
     1004msgstr ""
     1005
     1006#: admin/partials/chordpress-admin-options.php:907
     1007msgid "Remove guitar chord posts on delete"
     1008msgstr ""
     1009
     1010#: admin/partials/chordpress-admin-options.php:910
     1011msgid "Remove all guitar chord posts from the database when the plugin is deleted (does not apply when the plugin is just deactivated)."
     1012msgstr ""
     1013
     1014#: admin/partials/chordpress-admin-options.php:941
    10061015msgid "Version"
    10071016msgstr ""
    10081017
    1009 #: admin/partials/chordpress-admin-options.php:937
     1018#: admin/partials/chordpress-admin-options.php:947
    10101019msgid "Author"
    10111020msgstr ""
    10121021
    1013 #: admin/partials/chordpress-admin-options.php:955
     1022#: admin/partials/chordpress-admin-options.php:965
    10141023msgid "Credits"
    10151024msgstr ""
     
    11801189msgstr ""
    11811190
    1182 #: includes/class-chordpress-renderer.php:579
     1191#: includes/class-chordpress-renderer.php:583
    11831192msgid "Transpose up"
    11841193msgstr ""
    11851194
    1186 #: includes/class-chordpress-renderer.php:593
     1195#: includes/class-chordpress-renderer.php:597
    11871196msgid "No chords"
    11881197msgstr ""
    11891198
    1190 #: includes/class-chordpress-renderer.php:598
     1199#: includes/class-chordpress-renderer.php:602
    11911200msgid "Print"
    11921201msgstr ""
    11931202
    1194 #: includes/class-chordpress-renderer.php:630
     1203#: includes/class-chordpress-renderer.php:635
    11951204msgid "Composer"
    11961205msgstr ""
    11971206
    1198 #: includes/class-chordpress-renderer.php:631
     1207#: includes/class-chordpress-renderer.php:636
    11991208msgid "Artist"
    12001209msgstr ""
    12011210
    1202 #: includes/class-chordpress-renderer.php:632
     1211#: includes/class-chordpress-renderer.php:637
    12031212msgid "Year"
    12041213msgstr ""
    12051214
    1206 #: includes/class-chordpress-renderer.php:633
     1215#: includes/class-chordpress-renderer.php:638
    12071216msgid "Album"
    12081217msgstr ""
    12091218
    1210 #: includes/class-chordpress-renderer.php:636
     1219#: includes/class-chordpress-renderer.php:641
    12111220msgid "Key (original)"
    12121221msgstr ""
    12131222
    1214 #: includes/class-chordpress-renderer.php:637
     1223#: includes/class-chordpress-renderer.php:642
    12151224msgid "Key (transposed)"
    12161225msgstr ""
    12171226
    1218 #: includes/class-chordpress-renderer.php:644
     1227#: includes/class-chordpress-renderer.php:649
    12191228msgid "Time"
    12201229msgstr ""
    12211230
    1222 #: includes/class-chordpress-renderer.php:645
     1231#: includes/class-chordpress-renderer.php:650
    12231232msgid "Tempo"
    12241233msgstr ""
    12251234
    1226 #: includes/class-chordpress-renderer.php:646
     1235#: includes/class-chordpress-renderer.php:651
    12271236msgid "Capo"
    12281237msgstr ""
    12291238
    1230 #: includes/class-chordpress-renderer.php:668
     1239#: includes/class-chordpress-renderer.php:674
    12311240msgid "These known chords are used in this song"
    12321241msgstr ""
    12331242
    1234 #: includes/class-chordpress-renderer.php:761
     1243#: includes/class-chordpress-renderer.php:767
    12351244msgid "Missing square bracket in line"
    12361245msgstr ""
  • chordpress/trunk/makepot.cmd

    r2754156 r2877462  
    1 D:\xampp8.1.6\php\php.exe D:/wp-cli.phar i18n make-pot . languages/chordpress.pot --slug=chordpress --include="*.php,admin/*.php,admin/partials/*.php,includes/*.php,public/*.php,public/partials/*.php"
     1D:\xampp8.1.12\php\php.exe D:/wp-cli.phar i18n make-pot . languages/chordpress.pot --slug=chordpress --include="*.php,admin/*.php,admin/partials/*.php,includes/*.php,public/*.php,public/partials/*.php"
  • chordpress/trunk/readme.txt

    r2874790 r2877462  
    55Requires at least: 4.0
    66Tested up to: 6.1
    7 Stable tag: 3.3.3
     7Stable tag: 3.4.0
    88Requires PHP: 5.2.4
    99License: GPLv3
     
    130130
    131131== Changelog ==
     132= 3.4.0 =
     133* 2023-03-09
     134* Allow "yes", "1" and "true" for shortcode parameters
     135* Updated delete function (option to delete settings and chord posts)
     136
    132137= 3.3.3 =
    133138* 2023-03-04
  • chordpress/trunk/uninstall.php

    r2624179 r2877462  
    11<?php
    2 
    3 /**
    4  * Fired when the plugin is uninstalled.
     2/** ===========================================================================
     3 *  Fired when the plugin is uninstalled.
    54 *
    65 * @link       https://www.lewe.com
     
    1312/**
    1413 * If uninstall not called from WordPress, then exit.
    15  *
    16  * @since    2.0.0
    1714 */
    18 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    19     exit;
     15if (!defined('WP_UNINSTALL_PLUGIN')) {
     16    exit;
    2017}
    2118
    2219/**
    23  * The unique name (slug) of this plugin.
    24  *
    25  * @since    2.0.0
    26  * @var      string    $pname    The ID of this plugin.
     20 * @var string $pname The unique name of this plugin.
    2721 */
    2822$pname = 'chordpress';
     
    3024/**
    3125 * Exit if admin did not select to delete the plugin data upon uninstall/delete.
    32  *
    33  * @since    2.0.0
    3426 */
    35 if (!get_option($pname.'_checkbox_uninstall_delete')) return false;
     27if (!get_option($pname . '_checkbox_uninstall_delete_options') && !get_option($pname . '_checkbox_uninstall_delete_chordposts')) return false;
    3628
     29// ----------------------------------------------------------------------------
    3730/**
    3831 * Delete plugin options.
    39  *
    40  * @since    2.0.0
    4132 */
    42 $options = array (
     33if (get_option($pname . '_checkbox_uninstall_delete_options')) {
     34    $options = array(
     35        $pname . '_checkbox_hide_album',
     36        $pname . '_checkbox_hide_artist',
     37        $pname . '_checkbox_hide_chords',
     38        $pname . '_checkbox_hide_comments',
     39        $pname . '_checkbox_hide_composer',
     40        $pname . '_checkbox_hide_print',
     41        $pname . '_checkbox_hide_subtitle',
     42        $pname . '_checkbox_hide_title',
     43        $pname . '_checkbox_hide_transpose',
     44        $pname . '_checkbox_hide_year',
     45        $pname . '_checkbox_hb_notation',
     46        $pname . '_checkbox_show_chord_sheet',
     47        $pname . '_checkbox_show_jtab_sheet',
     48        $pname . '_checkbox_show_chord_sheet_on_top',
     49        $pname . '_select_title_level',
     50        $pname . '_select_subtitle_level',
     51        $pname . '_text_meta_style',
     52        $pname . '_text_chord_style',
     53        $pname . '_text_lyrics_style',
     54        $pname . '_text_comment_style',
     55        $pname . '_text_chorus_style',
     56        $pname . '_text_verse_style',
     57        $pname . '_text_line_style',
     58        $pname . '_text_chord_backgroundColor',
     59        $pname . '_number_chord_barreChordRadius',
     60        $pname . '_text_chord_barreChordStrokeColor',
     61        $pname . '_number_chord_barreChordStrokeWidth',
     62        $pname . '_number_chord_canvasWidth',
     63        $pname . '_text_chord_color',
     64        $pname . '_number_chord_emptyStringIndicatorSize',
     65        $pname . '_checkbox_chord_fixedDiagramPosition',
     66        $pname . '_text_chord_fontFamily',
     67        $pname . '_text_chord_fretColor',
     68        $pname . '_text_chord_fretLabelColor',
     69        $pname . '_text_chord_fretLabelColor',
     70        $pname . '_select_chord_fretLabelPosition',
     71        $pname . '_number_chord_fretLabelFontSize',
     72        $pname . '_number_chord_frets',
     73        $pname . '_number_chord_fretSize',
     74        $pname . '_number_chord_nutSize',
     75        $pname . '_text_chord_nutColor',
     76        $pname . '_text_chord_nutStrokeColor',
     77        $pname . '_number_chord_nutStrokeWidth',
     78        $pname . '_text_chord_nutTextColor',
     79        $pname . '_number_chord_nutTextSize',
     80        $pname . '_number_chord_position',
     81        $pname . '_number_chord_sidePadding',
     82        $pname . '_text_chord_stringColor',
     83        $pname . '_select_chord_strings',
     84        $pname . '_number_chord_strokeWidth',
     85        $pname . '_select_chord_style',
     86        $pname . '_number_chord_titleBottomMargin',
     87        $pname . '_text_chord_titleColor',
     88        $pname . '_number_chord_titleFontSize',
     89        $pname . '_number_chord_topFretWidth',
     90        $pname . '_text_chord_tuning',
     91        $pname . '_text_chord_tuningsColor',
     92        $pname . '_number_chord_tuningsFontSize',
     93    );
    4394
    44    $pname.'_checkbox_uninstall_delete',
    45    $pname.'_checkbox_hide_album',
    46    $pname.'_checkbox_hide_artist',
    47    $pname.'_checkbox_hide_chords',
    48    $pname.'_checkbox_hide_comments',
    49    $pname.'_checkbox_hide_composer',
    50    $pname.'_checkbox_hide_print',
    51    $pname.'_checkbox_hide_subtitle',
    52    $pname.'_checkbox_hide_title',
    53    $pname.'_checkbox_hide_transpose',
    54    $pname.'_checkbox_hide_year',
    55    $pname.'_checkbox_hb_notation',
    56    $pname.'_select_title_level',
    57    $pname.'_select_subtitle_level',
    58    $pname.'_text_meta_style',
    59    $pname.'_text_chord_style',
    60    $pname.'_text_lyrics_style',
    61    $pname.'_text_comment_style',
    62    $pname.'_text_chorus_style',
    63    $pname.'_text_verse_style'
     95    foreach ($options as $option) {
     96        delete_option($option);
     97    }
     98}
    6499
    65 );
     100// ----------------------------------------------------------------------------
     101/**
     102 * Delete guitar chord posts and post type.
     103 */
     104if (get_option($pname . '_checkbox_uninstall_delete_chordposts')) {
     105    $args = array(
     106        'post_type' => 'guitar_chord',
     107        'posts_per_page' => -1
     108    );
     109    $query = new WP_Query ($args);
     110    while ($query->have_posts()) {
     111        $query->the_post();
     112        $id = get_the_ID();
     113        wp_delete_post($id, true);
     114    }
     115    wp_reset_postdata();
    66116
    67 foreach ($options as $option) {
    68 
    69    delete_option($option);
    70    
     117    global $wp_post_types;
     118    if (isset($wp_post_types['guitar_chord'])) {
     119        unset($wp_post_types['guitar_chord']);
     120    }
    71121}
Note: See TracChangeset for help on using the changeset viewer.