Development

Users in general like features, in the same way kids like candies, the more features there is the happier they are. The best way to make a user happy is to tell him,

“Oh, you need this feature?” “No problem, we will implement it in the next release.”

Filter- and actions hooks

We support this filters for public use.

cpwp_post_url
All links to the post: The thumbnail link, the excerpt more, the Post Details option ‘everything is a link’ or the Style > positioning option thumbnail at ‘background’ is selected.
Parameters: the_permaink (string), this (object), settings (array)
cpwp_excerpt
Set after the widget excerpt code.
Parameters: excerpt (string)
widget_title
Will be apply if the widget is placed in a widget-area and not as shortcode. If the widget is placed as shortcode disable the widget title and set the title in the content text with the editor.
Parameters: title (string)
cpwp_possible_sorts
Dropdown control in the back-end UI and set the internal query.
Parameters: possible sorts (array)
cpwp_query_args
The array that can be fed to wp_Query to get the relevant posts
Parameters: args (array), this (object), settings (array)

Examples

Here is an easy example where we use to expand the query filter.

Widget Extensions

We also use the filters for our extension widgets.

Excerpt Extension


To have new UI controls in the admin panel, we give filters to override the hole panel HTML.

cpwp_details_panel
Override the UI for theDetails panel
Parameters: this (object), settings (array), name (string), headline (string), “” (optional)
cpwp_alt_details_panel
Override the UI for theDetails panel
Parameters: this (object), settings (array), name (string), headline (string), “alt_” (optional)