Completed
Push — master ( bd5e10...9a0bd7 )
by Warwick
03:14
created

extras.php ➔ lsx_remove_hentry()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * LSX functions and definitions - Integrations - Extras
4
 *
5
 * @package    lsx
6
 * @subpackage extras
7
 */
8
9
if ( ! defined( 'ABSPATH' ) ) {
10
	exit;
11
}
12
13
/**
14
 * Enable shortcode for text widget.
15
 *
16
 * @package    lsx
17
 * @subpackage extras
18
 */
19
add_filter( 'widget_text', 'shortcode_unautop' );
20
add_filter( 'widget_text', 'do_shortcode' );
21
22
if ( ! function_exists( 'lsx_kses_allowed_html' ) ) :
23
24
	/**
25
	 * Enable extra attributes (srcset, sizes) in img tag.
26
	 *
27
	 * @package    lsx
28
	 * @subpackage extras
29
	 */
30
	function lsx_kses_allowed_html( $allowedtags, $context ) {
0 ignored issues
show
Unused Code introduced by
The parameter $context is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
		$allowedtags['img']['srcset'] = true;
32
		$allowedtags['img']['sizes']  = true;
33
		return $allowedtags;
34
	}
35
36
endif;
37
38
add_filter( 'wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2 );
39
40
if ( ! function_exists( 'lsx_body_class' ) ) :
41
42
	/**
43
	 * Add and remove body_class() classes.
44
	 *
45
	 * @package    lsx
46
	 * @subpackage extras
47
	 */
48
	function lsx_body_class( $classes ) {
49
		global $post;
50
51
		$header_layout = get_theme_mod( 'lsx_header_layout', 'inline' );
52
		$classes[]     = 'header-' . $header_layout;
53
54
		if ( isset( $post ) ) {
55
			$classes[] = $post->post_name;
56
		}
57
58
		if ( ! class_exists( 'LSX_Banners' ) || ! empty( apply_filters( 'lsx_banner_plugin_disable', false ) ) ) {
59
			$post_types = array( 'page', 'post' );
60
			$post_types = apply_filters( 'lsx_allowed_post_type_banners', $post_types );
61
62
			if ( is_singular( $post_types ) && has_post_thumbnail() ) {
63
				$classes[] = 'page-has-banner';
64
			}
65
		}
66
67
		if ( has_nav_menu( 'top-menu' ) || has_nav_menu( 'top-menu-left' ) ) {
68
			$classes[] = 'has-top-menu';
69
		}
70
71
		$fixed_header = get_theme_mod( 'lsx_header_fixed', false );
72
73
		if ( false !== $fixed_header ) {
74
			$classes[] = 'top-menu-fixed';
75
		}
76
77
		$search_form  = get_theme_mod( 'lsx_header_search', false );
78
79
		if ( false !== $search_form ) {
80
			$classes[] = 'has-header-search';
81
		}
82
83
		$preloader_content  = get_theme_mod( 'lsx_preloader_content_status', false );
84
85
		if ( false !== $preloader_content ) {
86
			$classes[] = 'preloader-content-enable';
87
		}
88
89
		return $classes;
90
	}
91
92
endif;
93
94
add_filter( 'body_class', 'lsx_body_class' );
95
96
if ( ! function_exists( 'lsx_embed_wrap' ) ) :
97
98
	/**
99
	 * Wrap embedded media as suggested by Readability.
100
	 *
101
	 * @package    lsx
102
	 * @subpackage extras
103
	 *
104
	 * @link https://gist.github.com/965956
105
	 * @link http://www.readability.com/publishers/guidelines#publisher
106
	 */
107
	function lsx_embed_wrap( $cache, $url, $attr = '', $post_id = '' ) {
0 ignored issues
show
Unused Code introduced by
The parameter $url is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $attr is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $post_id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
108
		if ( false !== strpos( $cache, '<iframe' ) ) {
109
			return '<div class="entry-content-asset">' . $cache . '</div>';
110
		}
111
112
		return $cache;
113
	}
114
115
endif;
116
117
add_filter( 'embed_oembed_html', 'lsx_embed_wrap', 10, 4 );
118
119
if ( ! function_exists( 'lsx_remove_self_closing_tags' ) ) :
120
121
	/**
122
	 * Remove unnecessary self-closing tags.
123
	 *
124
	 * @package    lsx
125
	 * @subpackage extras
126
	 */
127
	function lsx_remove_self_closing_tags( $input ) {
128
		return str_replace( ' />', '>', $input );
129
	}
130
131
endif;
132
133
add_filter( 'get_avatar',          'lsx_remove_self_closing_tags' ); // <img />
134
add_filter( 'comment_id_fields',   'lsx_remove_self_closing_tags' ); // <input />
135
add_filter( 'post_thumbnail_html', 'lsx_remove_self_closing_tags' ); // <img />
136
137
if ( ! function_exists( 'lsx_is_element_empty' ) ) :
138
139
	/**
140
	 * Checks if a Nav $element is empty or not.
141
	 *
142
	 * @package    lsx
143
	 * @subpackage extras
144
	 */
145
	function lsx_is_element_empty( $element ) {
146
		$element = trim( $element );
147
		return empty( $element ) ? false : true;
148
	}
149
150
endif;
151
152
if ( ! function_exists( 'lsx_get_thumbnail' ) ) :
153
154
	/**
155
	 * return the responsive images.
156
	 *
157
	 * @package    lsx
158
	 * @subpackage extras
159
	 */
160
	function lsx_get_thumbnail( $size, $image_src = false ) {
161
		if ( false === $image_src ) {
162
			$post_id           = get_the_ID();
163
			$post_thumbnail_id = get_post_thumbnail_id( $post_id );
164
		} elseif ( false !== $image_src ) {
165
			if ( is_numeric( $image_src ) ) {
166
				$post_thumbnail_id = $image_src;
167
			} else {
168
				$post_thumbnail_id = lsx_get_attachment_id_from_src( $image_src );
169
			}
170
		}
171
172
		$size = apply_filters( 'lsx_thumbnail_size', $size );
173
		$img = false;
0 ignored issues
show
Unused Code introduced by
$img is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
174
175
		if ( 'lsx-thumbnail-single' === $size || 'lsx-thumbnail-wide' === $size || 'lsx-thumbnail-square' === $size || 'thumbnail' === $size ) {
176
			$srcset = false;
177
			$img    = wp_get_attachment_image_src( $post_thumbnail_id, $size );
0 ignored issues
show
Bug introduced by
The variable $post_thumbnail_id does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
178
			$img    = $img[0];
179
		} else {
180
			$srcset = true;
181
			$img = wp_get_attachment_image_srcset( $post_thumbnail_id, $size );
182
183
			if ( empty( $img ) ) {
184
				$srcset = false;
185
				$img = wp_get_attachment_image_src( $post_thumbnail_id, $size );
186
				$img = $img[0];
187
			}
188
		}
189
190
		if ( ! empty( $img ) ) {
191
			if ( $srcset ) {
192
				$img = '<img alt="' . the_title_attribute( 'echo=0' ) . '" class="attachment-responsive wp-post-image lsx-responsive" srcset="' . esc_attr( $img ) . '" />';
193
			} else {
194
				$img = '<img alt="' . the_title_attribute( 'echo=0' ) . '" class="attachment-responsive wp-post-image lsx-responsive" src="' . esc_url( $img ) . '" />';
195
			}
196
197
			$img = apply_filters( 'lsx_lazyload_filter_images', $img );
198
		}
199
200
		return $img;
201
	}
202
203
endif;
204
205
if ( ! function_exists( 'lsx_thumbnail' ) ) :
206
207
	/**
208
	 * Output the Resonsive Images.
209
	 *
210
	 * @package    lsx
211
	 * @subpackage extras
212
	 */
213
	function lsx_thumbnail( $size = 'thumbnail', $image_src = false ) {
214
		echo wp_kses_post( lsx_get_thumbnail( $size, $image_src ) );
215
	}
216
217
endif;
218
219
if ( ! function_exists( 'lsx_get_attachment_id_from_src' ) ) :
220
221
	/**
222
	 * Gets the attachments ID from the src.
223
	 *
224
	 * @package    lsx
225
	 * @subpackage extras
226
	 */
227
	function lsx_get_attachment_id_from_src( $image_src ) {
228
		$post_id = wp_cache_get( $image_src, 'lsx_get_attachment_id_from_src' );
229
230
		if ( false === $post_id ) {
231
			global $wpdb;
232
			$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src ) );
233
			wp_cache_set( $image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600 );
234
		}
235
236
		return $post_id;
237
	}
238
239
endif;
240
241
if ( ! function_exists( 'lsx_page_banner' ) ) :
242
243
	/**
244
	 * Add Featured Image as Banner on Single Pages.
245
	 *
246
	 * @package    lsx
247
	 * @subpackage extras
248
	 */
249
	function lsx_page_banner() {
250
		if ( true === apply_filters( 'lsx_page_banner_disable', false ) ) {
251
			return;
252
		}
253
254
		$post_types = array( 'page', 'post' );
255
		$post_types = apply_filters( 'lsx_allowed_post_type_banners', $post_types );
256
257
		if ( is_singular( $post_types ) && has_post_thumbnail() ) :
258
			$bg_image = '';
259
260
			if ( has_post_thumbnail() ) {
261
				$bg_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
262
				$bg_image = $bg_image[0];
263
			}
264
265
			if ( ! empty( $bg_image ) ) :
266
				?>
267
					<div class="page-banner-wrap">
268
						<div class="page-banner">
269
							<div class="page-banner-image" style="background-image:url(<?php echo esc_attr( $bg_image ); ?>);"></div>
270
271
							<div class="container">
272
								<header class="page-header">
273
									<h1 class="page-title"><?php the_title(); ?></h1>
274
									<?php lsx_banner_content(); ?>
275
								</header>
276
							</div>
277
278
							<?php lsx_banner_inner_bottom(); ?>
279
						</div>
280
					</div>
281
				<?php
282
			endif;
283
		endif;
284
	}
285
286
endif;
287
288
add_action( 'lsx_header_after', 'lsx_page_banner' );
289
290
if ( ! function_exists( 'lsx_form_submit_button' ) ) :
291
292
	/**
293
	 * filter the Gravity Forms button type.
294
	 *
295
	 * @package    lsx
296
	 * @subpackage extras
297
	 *
298
	 * @param  $button String
299
	 * @param  $form   Object
300
	 * @return String
301
	 */
302
	function lsx_form_submit_button( $button, $form ) {
0 ignored issues
show
Unused Code introduced by
The parameter $button is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
303
		return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Submit</span></button>";
304
	}
305
306
endif;
307
308
add_filter( 'gform_submit_button', 'lsx_form_submit_button', 10, 2 );
309
310
if ( ! function_exists( 'lsx_excerpt_more' ) ) :
311
312
	/**
313
	 * Replaces the excerpt "more" text by a link.
314
	 *
315
	 * @package    lsx
316
	 * @subpackage extras
317
	 */
318
	function lsx_excerpt_more( $more ) {
0 ignored issues
show
Unused Code introduced by
The parameter $more is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
319
		return '...';
320
	}
321
322
endif;
323
324
add_filter( 'excerpt_more', 'lsx_excerpt_more' );
325
326
if ( ! function_exists( 'lsx_the_excerpt_filter' ) ) :
327
328
	/**
329
	 * Add a continue reading link to the excerpt.
330
	 *
331
	 * @package    lsx
332
	 * @subpackage extras
333
	 */
334
	function lsx_the_excerpt_filter( $excerpt ) {
335
336
		$post_formats = array(
337
			'aside' => 'aside',
338
			'gallery' => 'gallery',
339
			'link' => 'link',
340
			'image' => 'image',
341
			'quote' => 'quote',
342
			'status' => 'status',
343
			'video' => 'video',
344
			'audio' => 'audio'
345
		);
346
347
		$show_full_content = has_post_format( apply_filters( 'lsx_the_excerpt_filter_post_types', $post_formats ) );
348
349
		if ( ! $show_full_content ) {
350
			if ( '' !== $excerpt && ! stristr( $excerpt, 'moretag' ) ) {
351
				$pagination = wp_link_pages( array(
352
					'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
353
					'after'       => '</div></div>',
354
					'link_before' => '<span>',
355
					'link_after'  => '</span>',
356
					'echo'        => 0,
357
				) );
358
359
				if ( ! empty( $pagination ) ) {
360
					$excerpt .= $pagination;
361
				} else {
362
					$excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Continue reading', 'lsx' ) . '</a></p>';
363
					$excerpt .= apply_filters( 'excerpt_more_p', $excerpt_more );
364
				}
365
			}
366
		}
367
368
		return $excerpt;
369
	}
370
371
endif;
372
373
add_filter( 'the_excerpt', 'lsx_the_excerpt_filter' , 1 , 20 );
374
375
if ( ! function_exists( 'lsx_custom_wp_trim_excerpt' ) ) :
376
377
	/**
378
	 * Allow HTML tags in excerpt.
379
	 *
380
	 * @package    lsx
381
	 * @subpackage extras
382
	 */
383
	function lsx_custom_wp_trim_excerpt( $wpse_excerpt ) {
384
		global $post;
385
		$raw_excerpt = $wpse_excerpt;
386
387
		if ( empty( $wpse_excerpt ) ) {
388
			$wpse_excerpt      = get_the_content( '' );
389
390
			$post_formats = array(
391
				'aside' => 'aside',
392
				'gallery' => 'gallery',
393
				'link' => 'link',
394
				'image' => 'image',
395
				'quote' => 'quote',
396
				'status' => 'status',
397
				'video' => 'video',
398
				'audio' => 'audio'
399
			);
400
401
			$show_full_content = has_post_format( apply_filters( 'lsx_excerpt_read_more_post_formats', $post_formats )  );
402
403
			if ( ! $show_full_content ) {
404
				$wpse_excerpt = strip_shortcodes( $wpse_excerpt );
405
				$wpse_excerpt = apply_filters( 'the_content', $wpse_excerpt );
406
				$wpse_excerpt = str_replace( ']]>', ']]>', $wpse_excerpt );
407
				$wpse_excerpt = strip_tags( $wpse_excerpt, apply_filters( 'excerpt_strip_tags', '<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<a>,<button>,<blockquote>,<p>,<br>,<b>,<strong>,<i>,<u>,<ul>,<ol>,<li>,<span>,<div>' ) );
408
409
				$excerpt_word_count = 50;
410
				$excerpt_word_count = apply_filters( 'excerpt_length', $excerpt_word_count );
411
412
				$tokens         = array();
413
				$excerpt_output = '';
414
				$has_more       = false;
415
				$count          = 0;
416
417
				preg_match_all( '/(<[^>]+>|[^<>\s]+)\s*/u', $wpse_excerpt, $tokens );
418
419
				foreach ( $tokens[0] as $token ) {
420
					if ( $count >= $excerpt_word_count ) {
421
						$excerpt_output .= trim( $token );
422
						$has_more = true;
423
						break;
424
					}
425
426
					$count++;
427
					$excerpt_output .= $token;
428
				}
429
430
				$wpse_excerpt = trim( force_balance_tags( $excerpt_output ) );
431
432
				if ( $has_more ) {
433
					$excerpt_end = '<a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'More', 'lsx' ) . '</a>';
434
					$excerpt_end = apply_filters( 'excerpt_more', ' ' . $excerpt_end );
435
436
					$pos = strrpos( $wpse_excerpt, '</' );
437
438
					if ( false !== $pos ) {
439
						// Inside last HTML tag
440
						$wpse_excerpt = substr_replace( $wpse_excerpt, $excerpt_end, $pos, 0 ); /* Add read more next to last word */
441
					} else {
442
						// After the content
443
						$wpse_excerpt .= $excerpt_end; /*Add read more in new paragraph */
444
					}
445
				}
446
			} else {
447
				$wpse_excerpt = apply_filters( 'the_content', $wpse_excerpt );
448
				$wpse_excerpt = str_replace( ']]>', ']]>', $wpse_excerpt );
449
				//$wpse_excerpt = strip_tags( $wpse_excerpt, '<blockquote>,<p>' );
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
450
				$wpse_excerpt = trim( force_balance_tags( $wpse_excerpt ) );
451
			}
452
453
			return $wpse_excerpt;
454
		}
455
456
		return apply_filters( 'lsx_custom_wp_trim_excerpt', $wpse_excerpt, $raw_excerpt );
457
	}
458
459
endif;
460
461
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
462
add_filter( 'get_the_excerpt', 'lsx_custom_wp_trim_excerpt' );
463
464
if ( ! function_exists( 'lsx_full_width_widget_classes' ) ) :
465
466
	/**
467
	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
468
	 *
469
	 * @package    lsx
470
	 * @subpackage extras
471
	 */
472
	function lsx_full_width_widget_classes( $params ) {
473
		if ( is_admin() ) {
474
			return $params;
475
		}
476
477
		global $wp_registered_widgets;
478
479
		$widget_id   = $params[0]['widget_id'];
480
		$widget_name = $params[0]['widget_name'];
481
482
		if ( 'Text' === $widget_name ) {
483
			$wp_registered_widgets[ $widget_id ]['original_callback'] = $wp_registered_widgets[ $widget_id ]['callback'];
484
			$wp_registered_widgets[ $widget_id ]['callback'] = 'lsx_full_width_widget_custom_callback';
485
		}
486
487
		return $params;
488
	}
489
490
endif;
491
492
add_filter( 'dynamic_sidebar_params', 'lsx_full_width_widget_classes' );
493
494
if ( ! function_exists( 'lsx_full_width_widget_custom_callback' ) ) :
495
496
	/**
497
	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
498
	 *
499
	 * @package    lsx
500
	 * @subpackage extras
501
	 */
502
	function lsx_full_width_widget_custom_callback() {
503
		global $wp_registered_widgets;
504
505
		$original_callback_params = func_get_args();
506
		$widget_id = $original_callback_params[0]['widget_id'];
507
508
		$original_callback = $wp_registered_widgets[ $widget_id ]['original_callback'];
509
		$wp_registered_widgets[ $widget_id ]['callback'] = $original_callback;
510
511
		$widget_id_base = $wp_registered_widgets[ $widget_id ]['callback'][0]->id_base;
512
513
		$widget_classname = '';
514
515
		if ( is_callable( $original_callback ) ) {
516
			ob_start();
517
			call_user_func_array( $original_callback, $original_callback_params );
518
			$widget_output = ob_get_clean();
519
520
			echo wp_kses_post( apply_filters( 'lsx_widget_output', $widget_output, $widget_id_base, $widget_classname, $widget_id ) );
521
		}
522
	}
523
524
endif;
525
526
if ( ! function_exists( 'lsx_full_width_widget_output' ) ) :
527
528
	/**
529
	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
530
	 *
531
	 * @package    lsx
532
	 * @subpackage extras
533
	 */
534
	function lsx_full_width_widget_output( $widget_output, $widget_id_base, $widget_id ) {
0 ignored issues
show
Unused Code introduced by
The parameter $widget_id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
535
		if ( 'text' === $widget_id_base ) {
536
			if ( false !== strpos( $widget_output, '<div class="lsx-full-width-alt">' ) ) {
537
				$widget_output = str_replace( 'class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width_alt"', $widget_output );
538
			} elseif ( false !== strpos( $widget_output, '<div class="lsx-full-width">' ) ) {
539
				$widget_output = str_replace( 'class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width"', $widget_output );
540
			}
541
		}
542
543
		return $widget_output;
544
	}
545
546
endif;
547
548
add_filter( 'lsx_widget_output', 'lsx_full_width_widget_output', 10, 3 );
549
550
/**
551
 * Check if the content has a restricted post format that needs to show a full excerpt.
552
 */
553
function lsx_post_format_force_content_on_list() {
554
	$post_formats = apply_filters( 'lsx_post_format_force_content_on_list', array('video' => 'video', 'audio' => 'audio', 'quote' => 'quote', 'link' => 'link') );
555
	$return = false;
556
	if ( ! has_post_format( $post_formats ) ) {
557
		$return = true;
558
	}
559
	return $return;
560
}
561
562
/**
563
 * Remove the Hentry Class Every
564
 */
565
function lsx_remove_hentry( $classes ) {
566
	if ( 'post' !== get_post_type() ) {
567
		$classes = array_diff( $classes, array( 'hentry' ) );
568
	}
569
	return $classes;
570
}
571
add_filter( 'post_class','lsx_remove_hentry' );
572