PayPal for Divi is designed for the Divi theme by Elegant Themes. Please install and activate the Divi theme prior to activating PayPal for Divi.'); ?>
parent()->Name;
if ($parent_name != 'Divi'){
/* code when divi theme is not activated. */
global $pagenow;
if ( $pagenow == 'plugins.php' ){
add_action('admin_notices', 'check_divi_available');
}
}
}
else{
if ($theme_data->Name != 'Divi') {
/* code when divi theme is not activated. */
global $pagenow;
if ( $pagenow == 'plugins.php' ){
add_action('admin_notices', 'check_divi_available');
}
}
}
function is_child( $theme_data ) {
/* Check current theme is child or not */
$parent = $theme_data->parent();
if ( ! empty( $parent ) ) {
return TRUE;
}
return FALSE;
}
// Register style sheet.
add_action( 'admin_enqueue_scripts', 'paypal_divi_styles' );
/**
* Register style sheet decalration.
*/
function paypal_divi_styles() {
wp_register_style( 'paypal_divi', plugins_url( 'assets/css/paypal_divi.css',__FILE__ ) );
wp_enqueue_style( 'paypal_divi' );
}
/*
* Added new function that will also called at the time of plugin activation.
* This will add option to indicate plugin is activated and clear local storage.
*/
register_activation_hook( __FILE__, 'my_plugin_activation' );
function my_plugin_activation() {
add_option( 'my_plugin_activation','just-activated' );
}
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'paypal_divi_action_links' );
function paypal_divi_action_links( $links ) {
$links[] = '