Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions & Updates (http://forum.bytesforall.com/forumdisplay.php?f=54)
-   -   PATCH 113-06: the_author and other 'Limited PHP code' don't all work (http://forum.bytesforall.com/showthread.php?t=19883)

juggledad Mar 13, 2013 03:49 PM

PATCH 113-06: the_author and other 'Limited PHP code' don't all work
 
1 Attachment(s)
Note: this patch includes the changes in PATCH 113-03.

Several of 'Limited PHP code' - like the_author() and the_author_meta() - do not work in all places in the 'single.php, page.php and even the postformat.php. Thanks to 'goater' for finding the issue.

The following patch corrects this issue.

edit the file 'montezuma/includes/parse_php.php' and change line 28-30 from
HTML Code:

        $need_loop = array( 'the_content' );
        // the_content needs loop
        if( in_array( $function_name, $need_loop ) ) {

to
HTML Code:

        $need_loop = array( 'the_author',
                                                'the_author_meta',
                                                'the_author_post_links',
                                                'the_content',
                                                'the_date',
                                                'the_excerpt'
                                                );
        // functions that needs the loop
        if( !in_the_loop() && in_array( $function_name, $need_loop ) ) {

or download the attached file (which has the fix applied) and using FTP, replace the existing 'parse_php.php' file in the 'includes' sub-folder in the theme


All times are GMT -6. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.