Plugin Directory

Changeset 3409786


Ignore:
Timestamp:
12/03/2025 03:56:23 PM (6 weeks ago)
Author:
nahuai
Message:

Tested up to 6.9 + disable native block visibility support

Location:
osom-block-visibility
Files:
26 added
2 edited

Legend:

Unmodified
Added
Removed
  • osom-block-visibility/trunk/osom-block-visibility.php

    r3046463 r3409786  
    44 * Plugin URI:          https://osompress.com/plugins/osom-block-visibility/
    55 * Description:         Adds a toggle to blocks that allows you to hide the content on mobile or desktop devices.
    6  * Version:             1.0.1
     6 * Version:             1.0.2
    77 * Requires at least:   6.3
    88 * Requires PHP:        7.4
     
    122122    return $result;
    123123}
     124
     125
     126add_filter( 'block_type_metadata', 'osom_disable_block_visibility_support' );
     127/**
     128 * Disable native WordPress visibility support for all blocks.
     129 */
     130function osom_disable_block_visibility_support( $metadata ) {
     131    if ( ! isset( $metadata['supports'] ) ) {
     132        $metadata['supports'] = array();
     133    }
     134    $metadata['supports']['visibility'] = false;
     135    return $metadata;
     136}
  • osom-block-visibility/trunk/readme.txt

    r3288508 r3409786  
    44Tags:  hide block, hide content, visibility, conditional blocks, hide on mobile
    55Requires at least: 6.3
    6 Tested up to: 6.8
    7 Stable tag: 1.0.1
     6Tested up to: 6.9
     7Stable tag: 1.0.2
    88Requires PHP: 7.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111 
    12 Osom Block Visibility lets you easily control block visibility from WordPress Block Editor.
    1312
    1413== Description ==
     
    2423
    2524The new Visibility Settings in the block editor will let you:
    26 
    27251. Hide the block on desktop.
    28262. Hide the block on mobile and tablet.
     
    3129
    3230You can use it for:
    33 
    3431* Hide any block on mobile and tablets to improve performance.
    3532* Display/hide some menu items dependending if the user it's loggedin or not (on block themes).
     
    9996== Changelog ==
    10097
     98= 1.0.2 =
     99* Disable native WordPress block visibility support for all blocks to prevent conflicts with plugin functionality.
     100
    101101= 1.0.1 =
    102102* Fix issues with server-side registered blocks.
Note: See TracChangeset for help on using the changeset viewer.