Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58157, comment 7


Ignore:
Timestamp:
05/10/2023 12:29:08 PM (3 years ago)
Author:
Soean
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58157, comment 7

    initial v1  
    22
    33- Create a post via cli: `wp post create --post_title='A post'`
     4
     5
     6The filter [[https://developer.wordpress.org/reference/hooks/the_author/|the_author]] has the parameter `$display_name` which is a `string` or `null`.
     7
     8The filter is used with `ent2ncr`:
     9
     10{{{#!php
     11<?php
     12add_filter( 'the_author', 'ent2ncr', 8 );
     13}}}
     14
     15
     16But [[https://developer.wordpress.org/reference/functions/ent2ncr/|ent2ncr( string $text )]]  only accepts a string and is doing a `str_replace` which fails with `null`.