Support

Account

Home Forums General Issues ACF warning messages appear in frontend Reply To: ACF warning messages appear in frontend

  • OK – I commented out the shortcodes and that didn’t change anything.

    When you say
    “Without seeing the code of the other two files there isn’t any way for me to know. You could try commenting out the code in these files and see if that eliminates the error.”

    do you mean the other two files that do exactly the same thing, or the one that shows the Purchse button and the Elementor admin_functions.php? The other two that do the same thing just refer to different field_ids, and the Purchase button refers to yet another field_id.

    The admin_functions.php contains the following code:

    
    function hello_elementor_fail_load_admin_notice() {
    	// Leave to Elementor Pro to manage this.
    	if ( function_exists( 'elementor_pro_load_plugin' ) ) {
    		return;
    	}
    
    	$screen = get_current_screen();
    	if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
    		return;
    	}
    
    	if ( 'true' === get_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true ) ) {
    		return;
    	}
    
    	$plugin = 'elementor/elementor.php';
    
    	$installed_plugins = get_plugins();
    
    	$is_elementor_installed = isset( $installed_plugins[ $plugin ] );
    
    	if ( $is_elementor_installed ) {
    		if ( ! current_user_can( 'activate_plugins' ) ) {
    			return;
    		}
    
    		$message = __( 'Hello theme is a lightweight starter theme designed to work perfectly with Elementor Page Builder plugin.', 'hello-elementor' );
    
    		$button_text = __( 'Activate Elementor', 'hello-elementor' );
    		$button_link = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
    	} else {
    		if ( ! current_user_can( 'install_plugins' ) ) {
    			return;
    		}
    
    		$message = __( 'Hello theme is a lightweight starter theme. We recommend you use it together with Elementor Page Builder plugin, they work perfectly together!', 'hello-elementor' );
    
    		$button_text = __( 'Install Elementor', 'hello-elementor' );
    		$button_link = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
    	}
    
    	?>

    plus some styling and some html containing various button links.