Q&A About PHP And FUNCTION.PHP Modification Interest....

Discussion in 'Programming' started by MartyBoi, Jan 6, 2013.

to remove all ads.
  1. MartyBoi

    MartyBoi New Member

    Messages:
    18
    I had downloaded the HTML5-Blank-WordPress-Theme, the starter theme from Todd Motto. And within that theme there are many references with the PHP Call Backs and within the FUNCTION.PHP.

    Example:
    Code:
    [COLOR="Red"]<?php html5blank_nav(); ?>[/COLOR]
    
    , and an array of other Call Back Codes.

    My interest is to remove all references to html5blank throughout this theme.

    So with that being said, let me show a few more examples:

    And let me say, this example is driving me crazy, as follows --->

    Code:
    [COLOR="Red"]<?php html5wp_excerpt('html5wp_index'); // Build your custom callback length in functions.php ?>[/COLOR]
    
    So here is the first Q&A to help solve this issue.

    I see the html5wp_excerpt('html5wp_index'), both the ' html5wp_excerpt ' and ('html5wp_index') refer to html5, in much respect although missing the blank within at the end of the text.
    So, this is what I would like to remove and replace with my domain abbreviation ' mySite '.

    Okay, so now I go to the FUNCTIONS.PHP and see the following --->

    Code:
    // Custom Excerpts
    [COLOR="Red"]function html5wp_index($length) // Create 20 Word Callback for Index page Excerpts, call using html5wp_excerpt('html5wp_index');
    {
        return 20;
    }[/COLOR]
    
    // Create 40 Word Callback for Custom Post Excerpts, call using [COLOR="Red"]html5wp_excerpt('html5wp_custom_post');
    function html5wp_custom_post($length)
    {
        return 40;
    }[/COLOR]
    
    // Create the Custom Excerpts callback
    [COLOR="Red"]function html5wp_excerpt($length_callback = '', $more_callback = '')
    {
        global $post;
        if (function_exists($length_callback)) {
            add_filter('excerpt_length', $length_callback);
        }
        if (function_exists($more_callback)) {
            add_filter('excerpt_more', $more_callback);
        }
        $output = get_the_excerpt();
        $output = apply_filters('wptexturize', $output);
        $output = apply_filters('convert_chars', $output);
        $output = '<p>' . $output . '</p>';
        echo $output;
    }[/COLOR]
    
    So, with this being said what can I do to change this, all the above to achieve my goal?

    I hope I am not confusing anyone.

    Thank you....
     
    Last edited: Jan 6, 2013
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,639
    I have one question. ....




    .... WHY??????????
     

Share This Page