Plugin Directory

Changeset 3452163


Ignore:
Timestamp:
02/02/2026 02:11:00 PM (8 weeks ago)
Author:
khr2003
Message:

Make plugin compatible with WordPress 6.9

Location:
editor-block-outline/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • editor-block-outline/trunk/controls/block-class-option.js

    r3069703 r3452163  
    2424
    2525            // update editor ui
    26             jQuery('body').attr('show-class-name', value);
     26            const body = getDocumentBody();
     27            body.attr('show-class-name', value);
    2728
    28             // Update editor UI for WP6.2+ (Iframe Editor)
    29             jQuery('iframe.editor-canvas__iframe').contents().find('body').attr('show-class-name', value);
    30            
    3129            // update meta
    3230            this.debounce(() => {
  • editor-block-outline/trunk/controls/block-data-position.js

    r3069703 r3452163  
    3838
    3939                    // update editor ui
    40                     jQuery('body').attr('block-data-position', key);
    41 
    42                     // Update editor UI for WP6.2+ (Iframe Editor)
    43                     jQuery('iframe.editor-canvas__iframe').contents().find('body').attr('block-data-position', key);
     40                    const body = getDocumentBody();
     41                    body.attr('block-data-position', key);
    4442
    4543                    // update meta
  • editor-block-outline/trunk/controls/block-name-option.js

    r3069703 r3452163  
    2323            });
    2424
    25             // update editor ui
    26             jQuery('body').attr('show-block-name', value);
    27 
    28             // Update editor UI for WP6.2+ (Iframe Editor)
    29             jQuery('iframe.editor-canvas__iframe').contents().find('body').attr('show-block-name', value);
     25            // Update Editor UI
     26            const body = getDocumentBody();
     27            body.attr('show-block-name', value);
    3028
    3129            // update meta
  • editor-block-outline/trunk/controls/enable-block-padding-option.js

    r3069703 r3452163  
    2424
    2525            // update editor ui
    26             jQuery('body').attr('enable-outline-padding', value);
    27 
    28             // Update editor UI for WP6.2+ (Iframe Editor)
    29             jQuery('iframe.editor-canvas__iframe').contents().find('body').attr('enable-outline-padding', value);
     26            const body = getDocumentBody();
     27            body.attr('enable-outline-padding', value);
    3028
    3129            // update meta
  • editor-block-outline/trunk/outline.php

    r3153389 r3452163  
    33Plugin Name: Editor Block Outline
    44Description: Add outline around Gutenberg blocks while editing
    5 Version: 1.4.2
     5Version: 1.4.3
    66Author: Kalimah Apps
    77Author URI: https://github.com/kalimahapps
     
    2525    public function __construct() {
    2626        add_action( 'init', array( $this, 'register_user_meta' ) );
    27         add_action( 'enqueue_block_editor_assets', array( $this, 'add_editor_assets' ) );
    28         add_action( 'enqueue_block_editor_assets', array( $this, 'add_init_scripts' ) );
     27        add_action( 'enqueue_block_assets', array( $this, 'add_editor_assets' ) );
     28        add_action( 'enqueue_block_assets', array( $this, 'add_init_scripts' ) );
    2929    }
    3030
  • editor-block-outline/trunk/readme.txt

    r3153389 r3452163  
    33Tags: gutenberg,outline,editor,blocks,layout
    44Requires at least: 5.0
    5 Tested up to: 6.5
    6 Stable tag: 1.4.2
     5Tested up to: 6.9
     6Stable tag: 1.4.3
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    3939
    4040== Changelog ==
     41= 1.4.3 =
     42- Update to make it compatible with WordPress 6.9
    4143
    4244= 1.4.1 =
  • editor-block-outline/trunk/utils.js

    r3069703 r3452163  
    66 */
    77const getDocumentRoot = () => {
    8     const iframeRoot = document.querySelector('iframe.editor-canvas__iframe')?.contentDocument.documentElement;
     8    const iframeRoot = document.querySelector('iframe[name="editor-canvas"]')?.contentDocument.documentElement;
    99    return iframeRoot ?? document.documentElement;
    1010}
    1111
    1212const getDocumentBody = () => {
    13     const iframeBody = jQuery('iframe.editor-canvas__iframe').contents().find('body');
     13    const iframeBody = jQuery('iframe[name="editor-canvas"]').contents().find('body');
    1414    return iframeBody.length ? iframeBody : jQuery('body');
    1515}
Note: See TracChangeset for help on using the changeset viewer.