Callback
This is how “Reactor” hooks the callback
add_action( 'reactor_post_header', 'reactor_do_standard_thumbnail', 4 );
Backtrace
The function itself is hooked from where you linked
~/theme_root/library/inc/content/content-post.php
but this file is called by the class Reactor
. This class/file is not included during the main callback hooked to after_setup_theme
in the functions.php
file on priority 10, but before that without a callback. And it gets instantiated right afterwards:
require locate_template('library/reactor.php');
new Reactor();
When the class gets instantiated and the __construct()
or gets called, it hooks the callback that registers the callback for the default thumb on priority 14 on the after_setup_theme
hook … (FYI: in lame PHP 4 style).
add_action('after_setup_theme', array( &$this, 'content' ), 14);
Then the content()
method does nothing else than including another file:
require_once locate_template('/library/inc/content/content-pages.php');
And this file is the one that actually attaches the default thumbnail here.
add_action('reactor_post_header', 'reactor_do_standard_thumbnail', 4);
Exchange
Now simply add the following in your CHILD THEME functions.php
file.
/**
* Remove the original callback, add in a new one
*/
add_action( 'after_setup_theme', 'wpse119843RemoveStandardThumbs', 20 );
function wpse119843RemoveStandardThumbs()
{
// Removes it for posts AND pages. If you only want posts, use is_single()
if ( is_singular() )
remove_action( 'reactor_post_header', 'reactor_do_standard_thumbnail', 4 );
add_action( 'reactor_post_header', 'wpse119843AddCustomThumbs' );
}
/**
* The callback that formats the new output
*/
function wpse119843AddCustomThumbs()
{
$link_titles = reactor_option( 'frontpage_link_titles', 0 );
if ( has_post_thumbnail() )
{
?>
// REFACTOR REACTOR
<?php
}
}
NOTE
To preserve your changes, use a Child Theme. When you take a closer look at the site, then you’ll see that there already exists one.