WordPress.org

Ready to get started?Download WordPress

Forums

WP Greet Box
Put posts (or other processed content) in GreetBox (1 post)

  1. David Szego
    Member
    Posted 1 year ago #

    In includes/wp-greet-box.class.php, around line 149, wrap a do_shortcode around the text being returned. This will allow a shortcode to be processed.

    You can alter the code at the same place to basically do what you want (process PHP, texturize, etc.)

    function get_message_html($message, $close) {
          $html = '';
          if ( strlen ( $message['icon'] ) > 0 ) {
            // do not show icon if there is no icon url
            $html .= $this->o['before_icon'].$this->get_icon_html($message['icon'], $message['icon_link']).$this->o['after_icon'];
          }
          if($close && $this->o['can_close']) {
            $html .= '<div class="greet_block_close"><a id="greet_block_close" href="#">X</a></div>';
          }
          //DS: Wrapped text in do_shortcode to include posts as greet blocks
          $html .= do_shortcode($message['text']);
    
          return $html;
        }

    I'm using it in http://www.talmud-wiki.org to put posts in a greet box via the WordPress-custom-post-widget plugin.... Basically, my greet box consists of:

    [content_block="702"]

    and post #702 (a custom type from that plugin) shows up in the Greet Box, fully rendered.

    Thaya - Please include this in the next version, perhaps with a checkbox for each greetbox saying "Process content of GreetBox" to turn the feature on/off per box.

    Thanks,
    David Szego

    http://wordpress.org/extend/plugins/wp-greet-box/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic