Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'cherry_current_object_context', 'foo', 11, 2 );
- function foo( $context, $id ) {
- if ( is_search() ) {
- return 'search';
- }
- return $context;
- }
- add_filter( 'cherry_current_object_has_meta', 'bar', 11, 4 );
- function bar( $meta, $context, $id, $key ) {
- if ( 'search' !== $context ) {
- return $meta;
- }
- if ( 'cherry_grid_type' === $key ) {
- return array(
- 'header' => 'default-grid-type',
- 'content' => 'wide',
- 'footer' => 'default-grid-type',
- );
- }
- if ( 'cherry_layout' === $key ) {
- return 'sidebar-sidebar-content';
- }
- return $meta;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement