GD Simple Widgets

integration functions

  gdws_widget_results ($widget, $instance=array())
  Get results for any of the supported widgets.
  gdws_widget_render ($widget, $instance=array(), $echo=true)
  Render results for any of the supported widgets.
  gdws_related_posts_results ($instance=array())
  Get results for Related Posts widget.
  gdws_related_posts_render ($instance=array(), $echo=true)
  Render results for Related Posts widget.
  gdws_future_posts_results ($instance=array())
  Get results for Future Posts widget.
  gdws_future_posts_render ($instance=array(), $echo=true)
  Render results for Future Posts widget.
  gdws_most_commented_results ($instance=array())
  Get results for Most Commented widget.
  gdws_most_commented_render ($instance=array(), $echo=true)
  Render results for Most Commented widget.
  gdws_popular_posts_results ($instance=array())
  Get results for Popular Posts widget.
  gdws_popular_posts_render ($instance=array(), $echo=true)
  Render results for Popular Posts widget.
  gdws_post_authors_results ($instance=array())
  Get results for Post Authors widget.
  gdws_post_authors_render ($instance=array(), $echo=true)
  Render results for Post Authors widget.
  gdws_random_posts_results ($instance=array())
  Get results for Random Posts widget.
  gdws_random_posts_render ($instance=array(), $echo=true)
  Render results for Random Posts widget.
  gdws_recent_comments_results ($instance=array())
  Get results for Recent Comments widget.
  gdws_recent_comments_render ($instance=array(), $echo=true)
  Render results for Recent Comments widget.
  gdws_recent_posts_results ($instance=array())
  Get results for Recent Posts widget.
  gdws_recent_posts_render ($instance=array(), $echo=true)
  Render results for Recent Posts widget.
gdws_future_posts_render ( instance = array(),
echo = true  
)

Render results for Future Posts widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_future_posts_results ( instance = array()  ) 

Get results for Future Posts widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_category: category id to filter with
  • display_css: additional css class(es) to be added to widget
  • display_excerpt: 1 will show post excerpt
  • display_excerpt_length: number of words to display from excerpt
  • display_post_date: 1 will show post date
  • display_post_date_format: php format for post date
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_most_commented_render ( instance = array(),
echo = true  
)

Render results for Most Commented widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_most_commented_results ( instance = array()  ) 

Get results for Most Commented widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_published: when post is published. lwek: last week, tmnt: last month, tyea: last year.
  • filter_category: category id to filter with
  • display_css: additional css class(es) to be added to widget
  • display_comments_count: show number of comments
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_popular_posts_render ( instance = array(),
echo = true  
)

Render results for Popular Posts widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_popular_posts_results ( instance = array()  ) 

Get results for Popular Posts widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_category: category id to filter with
  • filter_recency: what date range to use. tday: today, lday: last 24 hours, lwek: last week, tmnt: last month, tyea: last year.
  • filter_type: what to use: postpage, post, page
  • filter_views: all, users, visitors
  • display_css: additional css class(es) to be added to widget
  • display_views: show number of post/page views count
  • display_excerpt: 1 will show post excerpt
  • display_excerpt_length: number of words to display from excerpt
  • display_post_date: 1 will show post date
  • display_post_date_format: php format for post date
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_post_authors_render ( instance = array(),
echo = true  
)

Render results for Post Authors widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_post_authors_results ( instance = array()  ) 

Get results for Post Authors widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_category: category id to filter with
  • filter_min_posts: minimal number of posts
  • display_css: additional css class(es) to be added to widget
  • display_gravatar: post author gravatar
  • display_gravatar_size: gravatar size in pixels
  • display_posts_count: display number of posts
  • display_full_name: display authorts full name
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_random_posts_render ( instance = array(),
echo = true  
)

Render results for Random Posts widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_random_posts_results ( instance = array()  ) 

Get results for Random Posts widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_category: category id to filter with
  • filter_recency: what date range to use. tday: today, lday: last 24 hours, lwek: last week, tmnt: last month, tyea: last year.
  • filter_type: what to use: postpage, post, page
  • display_css: additional css class(es) to be added to widget
  • display_excerpt: 1 will show post excerpt
  • display_excerpt_length: number of words to display from excerpt
  • display_post_date: 1 will show post date
  • display_post_date_format: php format for post date
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_recent_comments_render ( instance = array(),
echo = true  
)

Render results for Recent Comments widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_recent_comments_results ( instance = array()  ) 

Get results for Recent Comments widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_type: what types of comments to use. comm, ping, both.
  • filter_category: category id to filter with
  • display_css: additional css class(es) to be added to widget
  • display_gravatar: 1 will show comment author gravatar
  • display_gravatar_size: gravatar size in pixels
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_recent_posts_render ( instance = array(),
echo = true  
)

Render results for Recent Posts widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_recent_posts_results ( instance = array()  ) 

Get results for Recent Posts widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • filter_category: category id to filter with
  • display_css: additional css class(es) to be added to widget
  • display_excerpt: 1 will show post excerpt
  • display_excerpt_length: number of words to display from excerpt
  • display_post_date: 1 will show post date
  • display_post_date_format: php format for post date
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_related_posts_render ( instance = array(),
echo = true  
)

Render results for Related Posts widget.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_related_posts_results ( instance = array()  ) 

Get results for Related Posts widget.

Array with widget settings contains several parameters:

  • count: number of posts to show
  • hide_empty: 1 will not render widget with no results found
  • show_only_single: 1 will show widget only on single post pages
  • filter_related: what to use for related calculations: tagcat, tag, cat.
  • display_css: additional css class(es) to be added to widget
  • display_excerpt: 1 will show post excerpt
  • display_excerpt_length: number of words to display from excerpt
  • display_post_date: 1 will show post date
  • display_post_date_format: php format for post date
Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results

gdws_widget_render ( widget,
instance = array(),
echo = true  
)

Render results for any of the supported widgets.

Parameters:
string  $widget widget code name
array  $instance widget settings
bool  $echo echo results if true return if false
Returns:
array results

gdws_widget_results ( widget,
instance = array()  
)

Get results for any of the supported widgets.

Parameters:
string  $widget widget code name
array  $instance widget settings
Returns:
array results