Make WordPress Core


Ignore:
Timestamp:
11/12/2020 08:18:08 PM (4 years ago)
Author:
johnbillion
Message:

General: Convert wp_array_get() to a "private" function and add tests.

This function may be promoted in the future if it's deemed useful enough.

Props dd32, jorgefilipecosta, Hareesh Pillai

Fixes #51720

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/custom-classname.php

    r49226 r49580  
    1616    $has_custom_classname_support = true;
    1717    if ( property_exists( $block_type, 'supports' ) ) {
    18         $has_custom_classname_support = wp_array_get( $block_type->supports, array( 'customClassName' ), true );
     18        $has_custom_classname_support = _wp_array_get( $block_type->supports, array( 'customClassName' ), true );
    1919    }
    2020    if ( $has_custom_classname_support ) {
     
    4545    $attributes                   = array();
    4646    if ( property_exists( $block_type, 'supports' ) ) {
    47         $has_custom_classname_support = wp_array_get( $block_type->supports, array( 'customClassName' ), true );
     47        $has_custom_classname_support = _wp_array_get( $block_type->supports, array( 'customClassName' ), true );
    4848    }
    4949    if ( $has_custom_classname_support ) {
Note: See TracChangeset for help on using the changeset viewer.