AnsPress_Theme::remove_hentry_class( array $post_classes, array $class_name, integer $post_id )
Description #
Remove hentry class from question, answers and main pages .
Parameters #
- $post_classesarray (Required) Post classes.
- $class_namearray (Required) An array of additional classes added to the post.
- $post_idinteger (Required) Post ID.
Source #
File: includes/class-theme.php
public static function remove_hentry_class( $post_classes, $class_name, $post_id ) { $_post = ap_get_post( $post_id ); if ( $_post && ( in_array( $_post->post_type, array( 'answer', 'question' ), true ) || in_array( $_post->ID, ap_main_pages_id() ) ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict return array_diff( $post_classes, array( 'hentry' ) ); } return $post_classes; }
Expand full source code Collapse full source code View on GitHub: includes/class-theme.php:340
Add your comment