Plugin Directory

Changeset 3157155


Ignore:
Timestamp:
09/24/2024 09:27:14 PM (17 months ago)
Author:
senff
Message:

Update to 1.1.4

Location:
bordered-blocks
Files:
20 added
8 edited

Legend:

Unmodified
Added
Removed
  • bordered-blocks/trunk/README.md

    r3147754 r3157155  
    55* Plugin URI: https://wordpress.org/plugins/bordered-blocks/
    66* Requires at least: 5.9
    7 * Tested up to: 6.6.1
    8 * Stable tag: 1.1.3
     7* Tested up to: 6.6.2
     8* Stable tag: 1.1.4
    99* License: GPLv3 or later
    1010* License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5353Although you can leave the "bordered" view on when you create/edit pages, it is not recommended, as it will indeed add a lot more information to the editor which may be distracting. It will also have some impact on the performance (although I'm working on that). The recommended use is to keep using the default editor view, and only sparingly flip the switch to show the borders and labels of the Blocks on the page.
    5454
    55 ### So wait, can borders be turned on and off instantly?
     55### Can borders be turned on and off instantly?
    5656
    57 Pretty much, yes. In the plugin's settings, you can choose to have the editor show the standard view by default, or the bordered view. If you have the standard view, then flipping the switch at the top of the page will quickly show all borders/labels. If you have the bordered view, flipping the switch will quickly remove all borders/labels and go back to the standard view.
     57While that used to be the case until version 1.1.3, this option has been removed for now as it did not appear to be working anymore with WordPress 6.6.2. I will look into adding this again, but for now, the borders are always showing in the editor as long as the plugin is active.
    5858
    5959### Some of my blocks don't have a label, look weird, etc.
     
    9494## Changelog
    9595
     96### 1.1.4
     97* Removed the ON/OFF toggle in the editor since it was not working with WordPress 6.6.2
     98
    9699### 1.1.3
    97100* Fixed JS issue that appeared when saving settings
     
    114117## Upgrade Notice
    115118
     119### 1.1.4
     120* Emergency fix
     121
    116122### 1.1.3
    117123* Bug fixes
  • bordered-blocks/trunk/assets/css/bordered-blocks.css

    r3147754 r3157155  
    2222}
    2323
    24 .borderedblocks .editor-styles-wrapper .wp-block {
     24.editor-styles-wrapper .wp-block {
    2525    margin-top: 0 !important;
    2626}
    2727
    28 .borderedblocks .editor-styles-wrapper .wp-block[data-empty="true"] {
     28.editor-styles-wrapper .wp-block[data-empty="true"] {
    2929    padding-top: 10px !important;
    3030}
    3131
    32 .borderedblocks .editor-styles-wrapper *[data-title]:hover {
     32.editor-styles-wrapper *[data-title]:hover {
    3333    border-color: #00000 !important;
    3434}
     
    4343}
    4444
    45 .borderedblocks .editor-styles-wrapper .wp-block.block-list-appender {
     45.editor-styles-wrapper .wp-block.block-list-appender {
    4646    border: 0;
    4747    padding: 0;
    4848}
    4949
    50 .borderedblocks .editor-styles-wrapper .block-editor-inserter {
     50.editor-styles-wrapper .block-editor-inserter {
    5151    z-index: 25;
    5252}
    5353
    54 .borderedblocks .editor-styles-wrapper .wp-block::before,
    55 .borderedblocks .editor-styles-wrapper .wp-block *[data-title]::before  {
     54.editor-styles-wrapper .wp-block::before,
     55.editor-styles-wrapper .wp-block *[data-title]::before  {
    5656    transition: all 0.2s;
    5757    position: absolute;
     
    7474}
    7575
    76 .borderedblocks .editor-styles-wrapper .wp-block img,
    77 .borderedblocks .editor-styles-wrapper .wp-block video {
     76.editor-styles-wrapper .wp-block img,
     77.editor-styles-wrapper .wp-block video {
    7878    opacity: 0.75;
    7979}
    8080
    81 .borderedblocks .editor-styles-wrapper .wp-block[data-empty="true"]:before {
     81.editor-styles-wrapper .wp-block[data-empty="true"]:before {
    8282    display: none;
    8383}
    8484
    85 .borderedblocks .editor-styles-wrapper .contains-blocks[data-title] *[data-title]{
     85.editor-styles-wrapper .contains-blocks[data-title] *[data-title]{
    8686    margin-top: 0
    8787}
     
    9191/* ------------------------------------------------------------------ */
    9292
    93 .borderedblocks .editor-styles-wrapper h1 {position: relative;}
    94 .borderedblocks .editor-styles-wrapper h1:before {content:"H1 Title";}
     93.editor-styles-wrapper h1 {position: relative;}
     94.editor-styles-wrapper h1:before {content:"H1 Title";}
    9595
    9696
  • bordered-blocks/trunk/assets/faq.php

    r2703437 r3157155  
    3737<p>
    3838    <strong>
    39         <?php _e('So wait, can borders be turned on and off instantly?','Bordered Blocks'); ?>
     39        <?php _e('Can borders be turned on and off instantly in the editor?','Bordered Blocks'); ?>
    4040    </strong>
    4141</p>
    4242
    4343<p>
    44     <?php _e('Pretty much, yes. In the plugin\'s settings, you can choose to have the editor show the standard view by default, -OR- the bordered view. If you have the standard view, then flipping the switch at the top of the page will quickly show all borders/labels. If you have the bordered view, flipping the switch will quickly remove all borders/labels and go back to the standard view.','Bordered Blocks'); ?>
     44    <?php _e('While that used to be the case until version 1.1.3, this option has been removed for now as it did not appear to be working anymore with WordPress 6.6.2. I will look into adding this again, but for now, the borders are always showing in the editor as long as the plugin is active.','Bordered Blocks'); ?>
    4545</p>
    4646
     
    5252
    5353<p>
    54     <?php _e('Bordered Blocks currently only supports the default Blocks that come with WordPress (support for WooCommerce and Jetpack is planned). If you have additional blocks added with plugins (or custom code), and they are not coded exactly following WordPress standards, they may not look as intended with borders and/or labels. If that\'s the case, please reach out to the plugin developer and have them check if all their Blocks have the proper naming with "data-title" attributes.','Bordered Blocks'); ?>
     54    <?php _e('Bordered Blocks currently only supports the default Blocks that come with WordPress and WooCommerce. If you have additional blocks added with plugins (or custom code), and they are not coded exactly following WordPress standards, they may not look as intended with borders and/or labels. If that\'s the case, please reach out to the plugin developer and have them check if all their Blocks have the proper naming with "data-title" attributes.','Bordered Blocks'); ?>
    5555</p>
    5656
     
    8181    <?php _e('but -are- on the roadmap:','Bordered Blocks'); ?></p>
    8282<ul>
     83    <li>
     84        <?php _e('Re-introcing the toggle to show/hide borders instantly in the editor','Bordered Blocks'); ?>
     85    </li>   
    8386    <li>
    8487        <?php _e('Support for Jetpack Blocks','Bordered Blocks'); ?>
  • bordered-blocks/trunk/assets/js/bordered-blocks.js

    r3147754 r3157155  
    2121
    2222    // Apply CSS styles for borders
    23     let cssVar = '.borderedblocks .editor-styles-wrapper .wp-block, .borderedblocks .editor-styles-wrapper *[data-title], .borderedblocks .editor-styles-wrapper .contains-blocks[data-title] *[data-title]{';
     23    let cssVar = '.editor-styles-wrapper .wp-block, .editor-styles-wrapper *[data-title], .editor-styles-wrapper .contains-blocks[data-title] *[data-title]{';
    2424    cssVar += 'border: '+borderstyle+' '+borderwidth+'px '+bordercolor+' !important;';
    2525    cssVar += 'padding: '+paddingtop+'px '+paddingright+'px '+paddingbottom+'px '+paddingleft+'px !important; margin-bottom: 20px !important;}';
    2626    // Apply CSS styles for labels
    2727    if (labelsize < 1) {
    28         cssVar += '.borderedblocks .editor-styles-wrapper .wp-block:before  {display: none;}';
     28        cssVar += '.editor-styles-wrapper .wp-block:before  {display: none;}';
    2929    } else {
    30         cssVar += '.borderedblocks .editor-styles-wrapper .wp-block::before, .borderedblocks .editor-styles-wrapper .wp-block *[data-title]::before {';
     30        cssVar += '.editor-styles-wrapper .wp-block::before, .editor-styles-wrapper .wp-block *[data-title]::before {';
    3131        cssVar += 'font-size:'+labelsize+'px;height:'+(labelsize*1.5)+'px;line-height:'+(labelsize*1.5)+'px;background:'+labelbackground+';color:'+labelcolor+';opacity:'+(labelopacity/10)+';';
    3232        cssVar += '}';
    3333    }
    34         cssVar += '.borderedblocks .editor-styles-wrapper .wp-block.contains-blocks[data-title] {position: relative; padding: 0 !important; border: none;}';
    35         cssVar += '.borderedblocks .editor-styles-wrapper .wp-block.contains-blocks::before {display: none;}';   
    36         cssVar += '.borderedblocks .editor-styles-wrapper hr.wp-block-separator[data-title], .borderedblocks .editor-styles-wrapper .contains-blocks[data-title] hr[data-title] {padding: 0 !important;} .borderedblocks .editor-styles-wrapper hr.wp-block-separator:after {display: none;}';
    37         cssVar += '.borderedblocks .editor-styles-wrapper .wp-block[data-title="Social Icon"] {border: none; padding: 0 !important; margin-bottom: 0 !important;} .borderedblocks .editor-styles-wrapper .wp-block.contains-blocks[data-title="Social Icons"] *[data-title="Social Icon"] {border: none; padding: 0 !important; margin-bottom: 0 !important;} .borderedblocks .editor-styles-wrapper .wp-block[data-title="Social Icon"]:before {display: none;}';
     34        cssVar += '.editor-styles-wrapper .wp-block.contains-blocks[data-title] {position: relative; padding: 0 !important; border: none;}';
     35        cssVar += '.editor-styles-wrapper .wp-block.contains-blocks::before {display: none;}';   
     36        cssVar += '.editor-styles-wrapper hr.wp-block-separator[data-title], .editor-styles-wrapper .contains-blocks[data-title] hr[data-title] {padding: 0 !important;} .editor-styles-wrapper hr.wp-block-separator:after {display: none;}';
     37        cssVar += '.editor-styles-wrapper .wp-block[data-title="Social Icon"] {border: none; padding: 0 !important; margin-bottom: 0 !important;} .editor-styles-wrapper .wp-block.contains-blocks[data-title="Social Icons"] *[data-title="Social Icon"] {border: none; padding: 0 !important; margin-bottom: 0 !important;} .editor-styles-wrapper .wp-block[data-title="Social Icon"]:before {display: none;}';
    3838
    3939        $('#borderedBlocks-css-variable').html(cssVar);       
    4040
    4141    // Whether the toggle button (and the borders) should be ON of OFF by default
    42     let checkedornot;
    43     if (bordershow) {
    44         $('body').addClass('borderedblocks');
    45         checkedornot = 'checked';
    46     }
     42//    let checkedornot;
     43//    if (bordershow) {
     44//        $('body').addClass('borderedblocks');
     45//        checkedornot = 'checked';
     46//    }
    4747
    48     function addToggle() {
     48//    function addToggle() {
    4949        // Adding the toggle button
    5050        // First line is updated - we can remove the second line a few versions down the road.
    51         $('.editor-document-tools__left').append('<div class="borderedblocks-header"><span class="borderedblocks-toggle components-form-toggle is-'+checkedornot+'"><input class="components-form-toggle__input" id="borderedblocks-toggle" type="checkbox" aria-describedby="inspector-toggle-contr-0__help" '+checkedornot+'><span class="components-form-toggle__track"></span><span class="components-form-toggle__thumb"></span><label for="borderedblocks-toggle">Show borders/labels</label></span></div>').addClass('hasToggle');
    52         $('.edit-post-header-toolbar__left').append('<div class="borderedblocks-header"><span class="borderedblocks-toggle components-form-toggle is-'+checkedornot+'"><input class="components-form-toggle__input" id="borderedblocks-toggle" type="checkbox" aria-describedby="inspector-toggle-contr-0__help" '+checkedornot+'><span class="components-form-toggle__track"></span><span class="components-form-toggle__thumb"></span><label for="borderedblocks-toggle">Show borders/labels</label></span></div>').addClass('hasToggle');
    53     }
     51//        $('.editor-document-tools__left').append('<div class="borderedblocks-header"><span class="borderedblocks-toggle components-form-toggle is-'+checkedornot+'"><input class="components-form-toggle__input" id="borderedblocks-toggle" type="checkbox" aria-describedby="inspector-toggle-contr-0__help" '+checkedornot+'><span class="components-form-toggle__track"></span><span class="components-form-toggle__thumb"></span><label for="borderedblocks-toggle">Show borders/labels</label></span></div>').addClass('hasToggle');
     52//       $('.edit-post-header-toolbar__left').append('<div class="borderedblocks-header"><span class="borderedblocks-toggle components-form-toggle is-'+checkedornot+'"><input class="components-form-toggle__input" id="borderedblocks-toggle" type="checkbox" aria-describedby="inspector-toggle-contr-0__help" '+checkedornot+'><span class="components-form-toggle__track"></span><span class="components-form-toggle__thumb"></span><label for="borderedblocks-toggle">Show borders/labels</label></span></div>').addClass('hasToggle');
     53//    }
    5454
    55     $('#editor').on('click','.borderedblocks-toggle',function(){
    56        $(this).toggleClass('is-checked');
    57        $('body').toggleClass('borderedblocks');
    58     }); 
     55//    $('#editor').on('click','.borderedblocks-toggle',function(){
     56//       $(this).toggleClass('is-checked');
     57//       $('body').toggleClass('borderedblocks');
     58//    }); 
    5959
    6060    // This function SHOULD run every time a new block is added, or when an existing block is changed.
     
    9999        let cssCode = '';
    100100        blocksOnPage.forEach(function(blockType) {
    101             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block[data-title="'+blockType+'"]:before {content: "'+blockType+'";} .borderedblocks .editor-styles-wrapper .wp-block[data-title="'+blockType+'"] *[data-title="'+blockType+'"]:before {content: "'+blockType+'";} ';
     101            cssCode += '.editor-styles-wrapper .wp-block[data-title="'+blockType+'"]:before {content: "'+blockType+'";} .editor-styles-wrapper .wp-block[data-title="'+blockType+'"] *[data-title="'+blockType+'"]:before {content: "'+blockType+'";} ';
    102102        }); 
    103103
    104104        embedsOnPage.forEach(function(embedType) {
    105             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block[borderedblocks-label="'+embedType+'"]:before {content: "'+embedType+'";} .borderedblocks .editor-styles-wrapper .wp-block[borderedblocks-label="'+embedType+'"] *[data-title="Embed"]:before {content: "'+embedType+'";} ';
     105            cssCode += '.editor-styles-wrapper .wp-block[borderedblocks-label="'+embedType+'"]:before {content: "'+embedType+'";} .editor-styles-wrapper .wp-block[borderedblocks-label="'+embedType+'"] *[data-title="Embed"]:before {content: "'+embedType+'";} ';
    106106        }); 
    107107
    108108        // There's a few exceptions (thanks to the WordPress editor inconsistencies), so we'll need to add those.
    109             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block.taxonomy-category:before {content: "Post Categories";}';
    110             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block.taxonomy-post_tag:before {content: "Post Tags";}';
    111             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block[borderedblocks-label="Next post"]:before {content: "Next Post";}';
    112             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block[borderedblocks-label="Previous post"]:before {content: "Previous Post";}';
    113             cssCode += '.borderedblocks .editor-styles-wrapper .wp-block.wp-block-query-title:before {content: "Archive Title";}';
     109            cssCode += '.editor-styles-wrapper .wp-block.taxonomy-category:before {content: "Post Categories";}';
     110            cssCode += '.editor-styles-wrapper .wp-block.taxonomy-post_tag:before {content: "Post Tags";}';
     111            cssCode += '.editor-styles-wrapper .wp-block[borderedblocks-label="Next post"]:before {content: "Next Post";}';
     112            cssCode += '.editor-styles-wrapper .wp-block[borderedblocks-label="Previous post"]:before {content: "Previous Post";}';
     113            cssCode += '.editor-styles-wrapper .wp-block.wp-block-query-title:before {content: "Archive Title";}';
    114114
    115115        //
  • bordered-blocks/trunk/assets/plugin-info.php

    r3147761 r3157155  
    1414            <?php _e('Version:','Bordered Blocks'); ?>
    1515            </strong>
    16             1.1.3
     16            1.1.4
    1717        </li>
    1818        <li><strong>
  • bordered-blocks/trunk/assets/supported-blocks.php

    r2703437 r3157155  
    117117    </ul>   
    118118
    119     <p><?php _e('Support for Jetpack Blocks will be included in the next version.','Bordered Blocks'); ?></p>
     119    <p><?php _e('Support for Jetpack Blocks will be included in a future version.','Bordered Blocks'); ?></p>
    120120
    121121
  • bordered-blocks/trunk/bordered-blocks.php

    r3147754 r3157155  
    66Author: Senff
    77Author URI: http://www.senff.com
    8 Version: 1.1.3
     8Version: 1.1.4
    99*/
    1010
     
    2121
    2222    function borderedblocks_default_options() {
    23         $versionNum = '1.1.3';
     23        $versionNum = '1.1.4';
    2424        if (get_option('borderedblocks_options') === false) {
    2525            $new_options['gb_bordershow'] = '';
     
    5252       
    5353        $script_vars = array(
    54             'version'       => '1.1.1',
     54            'version'       => '1.1.4',
    5555            'bordershow'    => $options['gb_bordershow'],
    5656            'bordercolor'   => $options['gb_bordercolor'],
     
    6868
    6969        $gb_version = get_option('borderedblocks_version');
    70         $versionNum = '1.1.3';         
     70        $versionNum = '1.1.4';         
    7171
    7272        wp_enqueue_script('borderedblocksLoader', plugins_url('/assets/js/bordered-blocks.js', __FILE__), array( 'jquery' ), $versionNum, true);
     
    7474
    7575        wp_register_style('borderedblocksAdminStyle', plugins_url('/assets/css/bordered-blocks.css', __FILE__) );
    76         wp_enqueue_style('borderedblocksAdminStyle');       
     76       wp_enqueue_style('borderedblocksAdminStyle');       
    7777    }
    7878
     
    204204
    205205                                    <table class="form-table">
    206                                         <tr>
     206                                        <tr style="display: none;">
    207207                                            <th scope="row"><?php _e('Default State','Bordered Blocks'); ?> </th>
    208208                                            <td>
     
    644644
    645645    register_activation_hook( __FILE__, 'borderedblocks_default_options' );
    646     add_action('enqueue_block_editor_assets', 'borderedblocks_styles' );
     646    add_action('enqueue_block_assets', 'borderedblocks_styles' );
    647647    add_action('admin_menu', 'borderedblocks_menu');
    648648    add_action('admin_init', 'borderedblocks_admin_init' );
  • bordered-blocks/trunk/readme.txt

    r3147754 r3157155  
    55Plugin URI: https://wordpress.org/plugins/bordered-blocks/
    66Requires at least: 5.9
    7 Tested up to: 6.6.1
    8 Stable tag: 1.1.3
     7Tested up to: 6.6.2
     8Stable tag: 1.1.4
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5353Although you can leave the "bordered" view on when you create/edit pages, it is not recommended, as it will indeed add a lot more information to the editor which may be distracting. It will also have some impact on the performance (although I'm working on that). The recommended use is to keep using the default editor view, and only sparingly flip the switch to show the borders and labels of the Blocks on the page.
    5454
    55 = So wait, can borders be turned on and off instantly?
     55= Can borders be turned on and off instantly?
    5656
    57 Pretty much, yes. In the plugin's settings, you can choose to have the editor show the standard view by default, or the bordered view. If you have the standard view, then flipping the switch at the top of the page will quickly show all borders/labels. If you have the bordered view, flipping the switch will quickly remove all borders/labels and go back to the standard view.
     57While that used to be the case until version 1.1.3, this option has been removed for now as it did not appear to be working anymore with WordPress 6.6.2. I will look into adding this again, but for now, the borders are always showing in the editor as long as the plugin is active.
    5858
    5959= Some of my blocks don't have a label, look weird, etc.
     
    9393== Changelog ==
    9494
     95= 1.1.4 =
     96* Removed the ON/OFF toggle in the editor since it was not working with WordPress 6.6.2
     97
    9598= 1.1.3 =
    9699* Fixed JS issue that appeared when saving settings
     
    113116== Upgrade Notice ==
    114117
     118= 1.1.4 =
     119* Emergency fix
     120
    115121= 1.1.3 =
    116122* Bug fixes
Note: See TracChangeset for help on using the changeset viewer.