1 <?php
2 /**
3 * Theme Compatibility
4 *
5 * Functions for compatibility with specific themes.
6 *
7 * @package EDD
8 * @subpackage Functions/Compatibility
9 * @copyright Copyright (c) 2013, Pippin Williamson
10 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11 * @since 1.4.3
12 */
13
14 // Exit if accessed directly
15 if ( ! defined( 'ABSPATH' ) ) exit;
16
17 /**
18 * Remove the "download" post class from single Download pages
19 *
20 * The Responsive theme applies special styling the .download class resulting in really terrible display.
21 *
22 * @since 1.4.3
23 * @param array $classes Post classes
24 * @param string $class
25 * @param int $post_id Post ID
26 * @return array
27 */
28 function edd_responsive_download_post_class( $classes, $class, $post_id ) {
29 if ( ! is_singular( 'download' ) )
30 return $classes;
31
32 if ( ( $key = array_search( 'download', $classes ) ) )
33 unset( $classes[ $key ] );
34
35 return $classes;
36 }
37 add_filter( 'post_class', 'edd_responsive_download_post_class', 999, 3 );