Make WordPress Core


Ignore:
Timestamp:
12/14/2016 04:17:38 AM (8 years ago)
Author:
johnbillion
Message:

General: Use interpolation instead of concatenation for all dynamic hook names.

This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r39564 r39600  
    103103
    104104                    /** This filter is documented in wp-includes/option.php */
    105                     return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
     105                    return apply_filters( "default_option_{$option}", $default, $option, $passed_default );
    106106                }
    107107            }
     
    115115        } else {
    116116            /** This filter is documented in wp-includes/option.php */
    117             return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
     117            return apply_filters( "default_option_{$option}", $default, $option, $passed_default );
    118118        }
    119119    }
     
    310310
    311311    /** This filter is documented in wp-includes/option.php */
    312     if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {
     312    if ( apply_filters( "default_option_{$option}", false, $option, false ) === $old_value ) {
    313313        // Default setting for new options is 'yes'.
    314314        if ( null === $autoload ) {
     
    431431    if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
    432432        /** This filter is documented in wp-includes/option.php */
    433         if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) )
     433        if ( apply_filters( "default_option_{$option}", false, $option, false ) !== get_option( $option ) )
    434434            return false;
    435435
Note: See TracChangeset for help on using the changeset viewer.