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/align.php

    r49226 r49580  
    1616    $has_align_support = false;
    1717    if ( property_exists( $block_type, 'supports' ) ) {
    18         $has_align_support = wp_array_get( $block_type->supports, array( 'align' ), false );
     18        $has_align_support = _wp_array_get( $block_type->supports, array( 'align' ), false );
    1919    }
    2020    if ( $has_align_support ) {
     
    4747    $has_align_support = false;
    4848    if ( property_exists( $block_type, 'supports' ) ) {
    49         $has_align_support = wp_array_get( $block_type->supports, array( 'align' ), false );
     49        $has_align_support = _wp_array_get( $block_type->supports, array( 'align' ), false );
    5050    }
    5151    if ( $has_align_support ) {
Note: See TracChangeset for help on using the changeset viewer.