=' ) ) { add_action( 'admin_notices', 'wowdevs_dt_fail_load_out_of_date' ); return; } require WOWDEVS_DT_PATH . 'plugin.php'; } add_action( 'plugins_loaded', 'wowdevs_dt_load_plugin' ); /** * Is Sky Addons running? Then it owns the dynamic tags and this plugin stands down. * * @since 1.0.1 * * @return bool */ function wowdevs_dt_is_sky_addons_active() { return defined( 'SKY_ADDONS_VERSION' ) || class_exists( '\\Sky_Addons\\Sky_Addons_Plugin' ); } /** * Show in WP Dashboard notice about the plugin is not activated. * * @since 1.0.1 * * @return void */ function wowdevs_dt_fail_load() { $screen = get_current_screen(); if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) { return; } $plugin = 'elementor/elementor.php'; if ( wowdevs_dt_is_elementor_installed() ) { if ( ! current_user_can( 'activate_plugins' ) ) { return; } $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin ); $message = '
' . esc_html__( 'Dynamic Tags is not working because you need to activate the Elementor plugin.', 'wowdevs-dynamic-tags' ) . '
'; $message .= '' . sprintf( '%s', esc_url( $activation_url ), esc_html__( 'Activate Elementor Now', 'wowdevs-dynamic-tags' ) ) . '
'; } else { if ( ! current_user_can( 'install_plugins' ) ) { return; } $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' ); $message = '' . esc_html__( 'Dynamic Tags is not working because you need to install the Elementor plugin.', 'wowdevs-dynamic-tags' ) . '
'; $message .= '' . sprintf( '%s', esc_url( $install_url ), esc_html__( 'Install Elementor Now', 'wowdevs-dynamic-tags' ) ) . '
'; } echo '' . esc_html__( 'Dynamic Tags is not working because you are using an old version of Elementor.', 'wowdevs-dynamic-tags' ) . '
'; $message .= '' . sprintf( '%s', esc_url( $upgrade_link ), esc_html__( 'Update Elementor Now', 'wowdevs-dynamic-tags' ) ) . '
'; echo '