Support

Account

Home Forums ACF PRO ACF Pro 5.5.0 Reply To: ACF Pro 5.5.0

  • Hi @james

    This code fix it:

    if(!function_exists('acf_add_admin_notice')) {
        function acf_add_admin_notice( $text, $class = '', $wrap = 'p' ) {
            // vars
            $admin_notices = acf_get_admin_notices();
            // add to array
            $admin_notices[] = array(
                'text'	=> $text,
                'class'	=> "updated {$class}",
                'wrap'	=> $wrap
            );
            // update
            acf_update_setting( 'admin_notices', $admin_notices );
            // return
            return ( count( $admin_notices ) - 1 );
        }
    }
    
    if(!function_exists('acf_get_admin_notices')) {
        function acf_get_admin_notices() {
            // vars
            $admin_notices = acf_get_setting( 'admin_notices' );
            // validate
            if( !$admin_notices )
            {
                $admin_notices = array();
            }
            // return
            return $admin_notices;
        }
    }

    But it isn’t a solution 🙁