| 1 |
<?php |
| 2 |
/** |
| 3 |
* ConvertKit Impeka Theme Integration. |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Adds compatibility with the Impeka theme by adding a CSS class |
| 11 |
* to the Restrict Content container if the Impeka theme is active. |
| 12 |
* |
| 13 |
* @since 3.1.4 |
| 14 |
*/ |
| 15 |
class ConvertKit_Impeka { |
| 16 |
|
| 17 |
/** |
| 18 |
* Constructor. |
| 19 |
* |
| 20 |
* @since 3.1.4 |
| 21 |
*/ |
| 22 |
public function __construct() { |
| 23 |
|
| 24 |
add_filter( 'convertkit_output_restrict_content_container_css_classes', array( $this, 'maybe_add_restrict_content_container_css_classes' ) ); |
| 25 |
|
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* Adds a CSS class to the Restrict Content container if the Impeka theme is active. |
| 30 |
* |
| 31 |
* @since 3.1.4 |
| 32 |
* |
| 33 |
* @param array $css_classes CSS classes for Restrict Content container. |
| 34 |
* @return array |
| 35 |
*/ |
| 36 |
public function maybe_add_restrict_content_container_css_classes( $css_classes ) { |
| 37 |
|
| 38 |
// Don't add a CSS class if the Impeka theme is not active. |
| 39 |
if ( ! convertkit_is_theme_active( 'Impeka' ) ) { |
| 40 |
return $css_classes; |
| 41 |
} |
| 42 |
|
| 43 |
$css_classes[] = 'grve-container'; |
| 44 |
return $css_classes; |
| 45 |
|
| 46 |
} |
| 47 |
|
| 48 |
} |
| 49 |
|
| 50 |
new ConvertKit_Impeka(); |
| 51 |
|