Uname: Linux p3plzcpnl499967.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software: Apache
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 208.109.40.231
Your Ip: 216.73.216.26
User: nayff91c5tsx (10005085) | Group: nayff91c5tsx (10005085)
Safe Mode: OFF
Disable Function:
NONE

name : divi.php
<?php
/**
 * Divi Builder integration.
 *
 * @package Page Builder Framework Premium Add-On
 * @subpackage Integration
 */

defined( 'ABSPATH' ) || die( "Can't access directly" );

/**
 * Auto add custom sections to Divi cpt support.
 *
 * Caused issues with Beaver Builder, let's revert this just in case.
 */
function wpbf_divi_cpt_support() {
	// Divi uses 2 option meta.
	$divi_integrations = array(
		'et_divi_builder_plugin' => 'et_pb_post_type_integration',
		'et_pb_builder_options'  => 'post_type_integration_main_et_pb_post_type_integration',
	);

	foreach ( $divi_integrations as $option_name => $integration_key ) {
		$options    = get_option( $option_name, array() );
		$post_types = isset( $options[ $integration_key ] ) ? $options[ $integration_key ] : array();

		if ( ! isset( $post_types['wpbf_hooks'] ) || 'on' !== $post_types['wpbf_hooks'] ) {
			$options[ $integration_key ]['wpbf_hooks'] = 'on';

			update_option( $option_name, $options, true );
		}
	}
}
// add_action( 'admin_init', 'wpbf_divi_cpt_support' );

/**
 * Global color palette.
 *
 * @param array $palette The palette.
 *
 * @return array The updated palette.
 */
function wpbf_divi_color_palette( $palette ) {

	$color_palette = wpbf_color_palette();

	if ( ! empty( $color_palette ) ) {
		$palette = $color_palette;
	}

	return $palette;

}
add_filter( 'et_pb_get_default_color_palette', 'wpbf_divi_color_palette' );
© 2026 GrazzMean