pmpro_news

Box with latest news from PaidMembershipsPro.com for sidebar.

Description

pmpro_news(); 

Usage

  1. if ( !function_exists( 'pmpro_news' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/adminpages/dashboard.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pmpro_news(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/adminpages/dashboard.php  
  1. function pmpro_news() 
  2. $rss_items = pmpro_fetch_rss_items( 5 ); 
  3.  
  4. $content = '<ul>'; 
  5. if ( !$rss_items ) { 
  6. $content .= '<li class="pmpro_news">no news items, feed might be broken...</li>'; 
  7. } else { 
  8. foreach ( $rss_items as $item ) { 
  9. $content .= '<li class="pmpro_news">'; 
  10. $content .= '<a class="rsswidget" href="'.esc_url( $item->get_permalink(), $protocolls=null, 'display' ).'">'. esc_html( $item->get_title() ) .'</a> '; 
  11. $content .= '</li>'; 
  12. $content .= '</ul>'; 
  13. $pmpro_postbox('pmprolatest', 'Recent Updates from PaidMembershipsPro.com', $content);