This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function add_featured_image_in_rss() { | |
| if ( function_exists( 'get_the_image' ) && ( $featured_image = get_the_image('format=array&echo=0') ) ) { | |
| $featured_image[0] = $featured_image['url']; | |
| } elseif ( function_exists( 'has_post_thumbnail' ) and has_post_thumbnail() ) { | |
| $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'post-thumbnail' ); | |
| } elseif ( function_exists( 'get_post_thumbnail_src' ) ) { | |
| $featured_image = get_post_thumbnail_src(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Simple way | |
| add_filter( 'show_admin_bar', '__return_false' ); | |
| // Standard way | |
| add_filter( 'show_admin_bar', 'show_admin_bar_cb' ); | |
| function show_admin_bar_cb() { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function do_something() { | |
| // Here we are doing something | |
| } | |
| function do_another_thing() { | |
| $some_variable = do_something(); | |
| // Here we are doing another thing | |
| } |
NewerOlder