Changeset 587957
- Timestamp:
- 08/20/2012 08:19:34 PM (13 years ago)
- Location:
- ivycat-announcements/trunk
- Files:
-
- 3 edited
-
Read.ME (modified) (1 diff)
-
classes/ivycat_announcements.php (modified) (7 diffs)
-
ivycat_announce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ivycat-announcements/trunk/Read.ME
r377057 r587957 4 4 Tags: announcements, bulletins, role based 5 5 Requires at least: 3.1 6 Tested up to: 3. 17 Stable tag: 1.0. 16 Tested up to: 3.4.1 7 Stable tag: 1.0.2 8 8 9 9 ==Short Description == -
ivycat-announcements/trunk/classes/ivycat_announcements.php
r377036 r587957 7 7 8 8 var $today; 9 protected $output; 9 10 static $instance; 10 11 … … 14 15 function __construct(){ 15 16 self::$instance = $this; 17 $this->output = ''; 16 18 $this->today = current_time( 'timestamp' ); 17 19 self::set_shortcodes(); … … 34 36 if( !$atts ): 35 37 self::display_announcements(); 38 return $this->output; 36 39 else: 37 40 if( array_key_exists( 'id', $atts ) ): 38 self::get_announcement( $atts['id'] );41 return self::get_announcement( $atts['id'] ); 39 42 elseif( array_key_exists( 'group', $atts ) ): 40 self::get_announcements_by_group( $atts['group'] );43 return self::get_announcements_by_group( $atts['group'] ); 41 44 endif; 42 45 endif; … … 47 50 */ 48 51 function get_announcement($id){ 49 52 $output = ''; 50 53 $postdata = get_post( $id, ARRAY_A ); 51 54 if( is_array( $postdata ) ): 52 55 $data[0] = (object) $postdata; 53 echo '<div class="ivycat_annc_container">'; 54 self::output_posts( $data ); 55 echo '</div>'; 56 $output .= '<div class="ivycat_annc_container">'. self::output_posts( $data ) . '</div>'; 56 57 endif; 58 return $output; 57 59 } 58 60 … … 181 183 */ 182 184 function output_posts( $data, $grp=false ){ 183 184 185 if( is_object( $data[0] ) ): 185 186 foreach( $data as $row ){ … … 200 201 update_post_meta( $row->ID, 'active', 'n' ); 201 202 }else{ // otherwise print content. 202 echo "<p>".$row->post_content."</p>";203 $this->output .= '<div class="ic-announcement">'.$row->post_content.'</div>'; 203 204 } 204 205 } … … 208 209 209 210 endif; 211 return $this->output; 210 212 } 211 213 -
ivycat-announcements/trunk/ivycat_announce.php
r394758 r587957 5 5 Description: A plugin that displays announcements on pages and posts. They can be scheduled so that they are only displayed between 6 6 specified dates/times. Utilizes custom post types. Requires WordPress 3.1 for use of multiple taxonomy querying. 7 Author: dgilfoy, ivycat 8 Version: 1.0. 17 Author: dgilfoy, ivycat, sewmyheadon 8 Version: 1.0.2 9 9 Author URI: http://www.ivycat.com 10 10 **/
Note: See TracChangeset
for help on using the changeset viewer.