Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( function_exists('oxygen_vsb_register_condition') ) {
- oxygen_vsb_register_condition('User more than X posts', array('options'=>array(), 'custom'=>true), array('==', '!=', '>=', '<=', '>', '<'), 'sec_user_post_count_callback', 'Post');
- function sec_user_post_count_callback($value, $operator) {
- $counted_posts = count_user_posts(get_current_user_id(),'post');
- $value = intval($value);
- global $OxygenConditions;
- return $OxygenConditions->eval_int($counted_posts, $value, $operator);
- }
- }
Add Comment
Please, Sign In to add comment