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

    r39188 r39600  
    384384    if ( 'edit' == $context ) {
    385385        /** This filter is documented in wp-includes/post.php */
    386         $value = apply_filters( "edit_$field", $value, $bookmark_id );
     386        $value = apply_filters( "edit_{$field}", $value, $bookmark_id );
    387387
    388388        if ( 'link_notes' == $field ) {
     
    393393    } elseif ( 'db' == $context ) {
    394394        /** This filter is documented in wp-includes/post.php */
    395         $value = apply_filters( "pre_$field", $value );
     395        $value = apply_filters( "pre_{$field}", $value );
    396396    } else {
    397397        /** This filter is documented in wp-includes/post.php */
    398         $value = apply_filters( $field, $value, $bookmark_id, $context );
     398        $value = apply_filters( "{$field}", $value, $bookmark_id, $context );
    399399
    400400        if ( 'attribute' == $context ) {
Note: See TracChangeset for help on using the changeset viewer.