Closed domsammut closed 8 years ago
I thought this might be a useful addition for development and allows for checking of the keyword against any business logic that someone might have.
Example of how this filter could be used:
add_filter('better_yourls_keyword', 'testFilter', 10, 2); function testFilter ($keyword, $post_id) { if (empty($keyword)) { if (get_post_type($post_id) == 'post') { $keyword = $post_id; } } return $keyword; }
This looks good. Thank you!
I thought this might be a useful addition for development and allows for checking of the keyword against any business logic that someone might have.
Example of how this filter could be used: