Last active
January 7, 2017 23:43
-
-
Save amElnagdy/d4e72419294da18103053a4e6b948860 to your computer and use it in GitHub Desktop.
Divi Builder on custom post types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Divi Builder on custom post types | |
add_filter('et_builder_post_types', 'divicolt_post_types'); | |
add_filter('et_fb_post_types','divicolt_post_types' ); // Enable Divi Visual Builder on the custom post types | |
function divicolt_post_types($post_types) | |
{ | |
foreach (get_post_types() as $post_type) { | |
if (!in_array($post_type, $post_types) and post_type_supports($post_type, 'editor')) { | |
$post_types[] = $post_type; | |
} | |
} | |
return $post_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment