Skip to content

Instantly share code, notes, and snippets.

@johnbillion
Last active May 23, 2022 15:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbillion/a5113d0362fb5238742bf773d3da9c4f to your computer and use it in GitHub Desktop.
Save johnbillion/a5113d0362fb5238742bf773d3da9c4f to your computer and use it in GitHub Desktop.
<?php
class value {
protected $value = null;
function __construct( $value ) {
$this->value = $value;
}
function __invoke() {
return $this->value;
}
}
add_filter( 'the_title', new value( 'Hello there' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment