Esempio n. 1
0
 function glades_display_postmeta()
 {
     // Get Theme Options from Database
     $theme_options = glades_theme_options();
     // Display Date unless user has deactivated it via settings
     if (true == $theme_options['meta_date']) {
         glades_meta_date();
     }
     // Display Author unless user has deactivated it via settings
     if (true == $theme_options['meta_author']) {
         glades_meta_author();
     }
     // Display Author unless user has deactivated it via settings
     if (true == $theme_options['meta_category']) {
         glades_meta_categories();
     }
     // Display Comments
     if (comments_open()) {
         glades_meta_comments();
     }
 }
 function display_postmeta($instance)
 {
     // Get Widget Settings
     $defaults = $this->default_settings();
     extract(wp_parse_args($instance, $defaults));
     // Start Output Buffering
     ob_start();
     // Display Date unless deactivated
     if ($postmeta > 0) {
         glades_meta_date();
     }
     // Display Author unless deactivated
     if ($postmeta == 2) {
         glades_meta_author();
     }
     // Display Comments
     if ($postmeta == 3 and comments_open()) {
         glades_meta_comments();
     }
     // Save Output Buffer
     $meta_output = ob_get_contents();
     // Delete Buffer
     ob_end_clean();
     // Only display output if there is postmeta
     if ($meta_output != false) {
         echo '<div class="postmeta">' . $meta_output . '</div>';
     }
 }