• Hey guys… I’ve been reading and i’m unsure from what i’m reading if i should be using the filter technique or add action technique, etc…

    Basically the parent theme has a simple function called get_the_author…

    In my child theme I want to override it and have it return blank.

    It’s not registered via addAction, or addFilter, etc… it’s just a simple function. Example:

    /**
    * Retrieve the author of the current post.
    * @uses $authordata The current author’s DB object.
    * @uses apply_filters() Calls ‘the_author’ hook on the author display name.
    *
    * @param string $deprecated Deprecated.
    * @return string The author’s display name.
    */
    function get_the_author($deprecated = ”) {
    global $authordata;

    if ( !empty( $deprecated ) )
    _deprecated_argument( __FUNCTION__, ‘2.1’ );
    return apply_filters(‘the_author’, is_object($authordata) ? $authordata->display_name : null);
    }

    If a function is not registered… added via addAction, etc… can I still removeAction and addAction on it?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Over ride function in parent – can't find info…’ is closed to new replies.