Category Filter Hooks

post_grid_layout_element_author_link_permalink

add_filter(‘post_grid_layout_element_author_link_permalink’, ‘post_grid_layout_element_author_link_permalink_20200614’, 10, 2); function post_grid_layout_element_author_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_author_permalink

add_filter(‘post_grid_layout_element_author_permalink’, ‘post_grid_layout_element_author_permalink_20200614’, 10, 2); function post_grid_layout_element_author_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_post_date_permalink

add_filter(‘post_grid_layout_element_post_date_permalink’, ‘post_grid_layout_element_post_date_permalink_20200614’, 10, 2); function post_grid_layout_element_post_date_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_thumb_link_permalink

add_filter(‘post_grid_layout_element_thumb_link_permalink’, ‘post_grid_layout_element_thumb_link_permalink_20200614’, 10, 2); function post_grid_layout_element_thumb_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_thumb_permalink

add_filter(‘post_grid_layout_element_thumb_permalink’, ‘post_grid_layout_element_thumb_permalink_20200614’, 10, 2); function post_grid_layout_element_thumb_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_excerpt_read_more_permalink

add_filter(‘post_grid_layout_element_excerpt_read_more_permalink’, ‘post_grid_layout_element_excerpt_read_more_permalink_20200614’, 10, 2); function post_grid_layout_element_excerpt_read_more_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_excerpt_permalink

add_filter(‘post_grid_layout_element_excerpt_permalink’, ‘post_grid_layout_element_excerpt_permalink_20200614’, 10, 2); function post_grid_layout_element_excerpt_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_title_link_permalink

add_filter(‘post_grid_layout_element_title_link_permalink’, ‘post_grid_layout_element_title_link_permalink_20200614’, 10, 2); function post_grid_layout_element_title_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_title_permalink

add_filter(‘post_grid_layout_element_title_permalink’, ‘post_grid_layout_element_title_permalink_20200614’, 10, 2); function post_grid_layout_element_title_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_atts

add_filter(‘post_grid_atts’, ‘post_grid_atts_20200614’, 10); function post_grid_atts_20200614( $args){ $args[‘custom’] = ‘Custom value’; return $args; }  

post_grid_view_types

add_filter(‘post_grid_view_types’, ‘post_grid_view_types_20200614’, 10); function post_grid_view_types_20200614( $args){ $args[‘custom’] = __(‘Custom’,’post-grid’); return $args; } View post on imgur.com  

post_grid_post_status

add_filter(‘post_grid_post_status’, ‘post_grid_post_status_20200614’, 10); function post_grid_post_status_20200614( $args){ $args[‘custom’] = __(‘Custom’,’post-grid’); return $args; } View post on imgur.com