• Resolved pixels76

    (@pixels76)


    Bjr,

    “Saviez-vous que Autoptimize embarque l’optimisation des images à la volée (avec le support de WebP) et leur gestion par un CDN via ShortPixel?? Jetez un œil sur les réglages d’image d’Autoptimize pour activer cette option.”
    …….

    J’ai plus qu’assez de cette bannière ….. Insupportable !!
    S’il n’est pas possible de supprimer ce rappel superflu pour moi, je finirais par supprimer cette extension “Autoptimize”, même si j’en suis satisfait.

    I have more than enough of this banner ….. Unbearable !!
    If it is not possible to delete this superfluous reminder for me, I would end up deleting this extension “Autoptimize”, even if I am satisfied with it.

    best regards

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    If clicking the close button does not make the notice disappear, then there likely is a JavaScript conflict with another plugin pixels76.

    As an alternative you can use this code snippet to never see it again;

    add_filter(‘autoptimize_filter_main_imgopt_plug_notice’,’__return_empty_string’);

    Hope this helps,
    frank

    Thread Starter pixels76

    (@pixels76)

    clicking the close button make the notice disappear, but ….. this notice pop up immediately on the next screen, again and again, every screen, every page, every day … STOP !
    And i cannot or i don’t know how and where i have to put your “snippet”.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, as I wrote;

    If clicking the close button does not make the notice disappear, then there likely is a JavaScript conflict with another plugin pixels76

    So this is not something I can simply make disappear on my end without at least knowing more about what is conflicting. If you have time & want to help out, you can always try disabling (and re-enabling) plugins one at a time and see which one helps getting the JS call through to AO to indeed dismiss the notice.

    And i cannot or i don’t know how and where i have to put your “snippet”.

    the easiest/ safest way is to use the code snippets plugin, but alternatively you could simply add it to your (child) theme’s functions.php.

    bien à toi,
    frank

    Thread Starter pixels76

    (@pixels76)

    Hi,
    I installed the Code Snippets plugin and created an extract with the line:
    add_filter (‘autoptimize_filter_main_imgopt_plug_notice’, ‘__ return_empty_string’);
    but nothing happens.
    I still have that cursed message …

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    just to make sure;

    do you have

    add_filter (‘autoptimize_filter_main_imgopt_plug_notice’, ‘__ return_empty_string’);

    or

    add_filter('autoptimize_filter_main_imgopt_plug_notice', '__ return_empty_string');

    (no space after add_filter + ' instead of )

    Thread Starter pixels76

    (@pixels76)

    Hmmm .. It seems that there is a subtlety which escapes me …
    For spaces, no problem. But on the other side, how do you enter the sign ‘ on the keyboard?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so to be clear; you need the 2nd one from my previous post. re. quatation marks; you want to use the normal single quote, beneath the 4 on my azerty keyboard.

    Thread Starter pixels76

    (@pixels76)

    Yes, i made that. Now, there is no more sentence but the frame which was around this sentence remains displayed.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that’s weird … let me check the code …

    Thread Starter pixels76

    (@pixels76)

    Ok, I can wait, since all this time …
    In any case, thank you for advising me on this Code Snippets plugin. I had put CSS code directly in the options of my theme. I transferred this code to a snippet, everything works fine.
    This procedure also seems more logical, right?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    weird indeed; the code reads something like “if imgopt_plug_notice string is empty then don’t show the notice”, see https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeMain.php#L669

    if all else fails (for reasons i can’t understand) you could change the condition from
    if ( current_user_can( 'manage_options' ) && '' !== $_ao_imgopt_plug_notice && ! $_ao_imgopt_active && $_ao_imgopt_launch_ok && PAnD::is_admin_notice_active( $_ao_imgopt_plug_dismissible ) ) {

    into

    if ( false && current_user_can( 'manage_options' ) && '' !== $_ao_imgopt_plug_notice && ! $_ao_imgopt_active && $_ao_imgopt_launch_ok && PAnD::is_admin_notice_active( $_ao_imgopt_plug_dismissible ) ) {

    Thread Starter pixels76

    (@pixels76)

    Hello,
    back on this problem …
    I see today that the frame always appears, but, furthermore, I have a warning:

    Warning: call_user_func_array () expects parameter 1 to be a valid callback, function ‘__ return_empty_string’ not found or invalid function name in /htdocs/wp-includes/class-wp-hook.php on line 287

    I checked that it was the attempt to delete the notice that is at issue, and moreover, I had not changed anything in the code of the snippet.

    After modifying the code in autoptimizeMain.php, the warning has not disappeared.
    In the meantime, I will revert to the original version of autoptimizeMain.php.

    Thank you for your attention.

    • This reply was modified 6 years, 1 month ago by pixels76.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    arrggggghhhh, now I see; '__ return_empty_string' should be '__return_empty_string' (so no space between __ and return ) …

    Thread Starter pixels76

    (@pixels76)

    OK, I change this, and IT WORKS !
    Thank you very much.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    De rien pixels76 🙂

    greetings from Belgium!
    frank

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Insupportable !! Unbearable !!’ is closed to new replies.