Description
The “pop_get_children_args” filter is used to modify the arguments used to retrieve the post attachment (image).
A plugin (or theme) can modify the object with the code:
<?php add_filter( 'pop_get_children_args', 'filter_function_name'); ?>
The hook is located in the popular-widget/_inc/functions.php file.
Example
// Apply filter function modify_pop_get_children_args( $args, $post_id, $size ) { $args['order'] = 'DESC'; return $args; } add_filter('pop_get_children_args', 'modify_pop_get_children_args');
Note: $args is an associate array that must match the values used by get_children(), $post_id is a integer, $size is a string.
Leave a Reply