• Resolved Roman52

    (@roman52)


    Hello!

    Why is it not working?

    How To use PNG images instead of GIF images?
    The default image extension if ‘gif’, if you want to change it to ‘png’, you need to make use of the wp_postratings_image_extension filter as shown in the sample code below:

    function custom_rating_image_extension() {
        return 'png';
    }
    add_filter( 'wp_postratings_image_extension', 'custom_rating_image_extension' );

    How can I install the picture in the PNG format?
    In order to update the plugin did not clobber

    https://www.ads-software.com/plugins/wp-postratings/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Copy and paste the code in your functions.php of your theme?

    Thread Starter Roman52

    (@roman52)

    Yes, but in the Post Ratings Options still displays only gif image

    Plugin Author Lester Chan

    (@gamerz)

    Try the dev version https://github.com/lesterchan/wp-postratings/archive/master.zip, it should be fixed.

    Thread Starter Roman52

    (@roman52)

    It does not work, an error 404 when you go to the menu item Ratings

    Plugin Author Lester Chan

    (@gamerz)

    You have to extract out the files and replace it in wp-content/plugins/wp-postratings.

    There is no way if will give you a 404 error.

    Thread Starter Roman52

    (@roman52)

    It turned out, thank you!
    And the next time you update the plugin – the problem is not repeated?
    And another question, can I do to make images that I download in the / wp-content / plugins / wp-postratings / images / .. (new folder) are not removed during the upgrade?

    Plugin Author Lester Chan

    (@gamerz)

    Will not, the version you get will be the actual one if nothing major comes up

    There is no way to make it not remove it, that is how WP works.

    Thread Starter Roman52

    (@roman52)

    Ok, thank you very much for your help)

    Lester, your plug-in (and thus the define('RATINGS_IMG_EXT', ...) line) gets loaded before any theme’s functions.php.

    Is there a load-order I can influence somewhere (w/o modifying core code and breaking my update path)?

    Btw: thanks for adding that filter support! It’s a big improvement on always making sure to un-comment the define line in previous updates!

    Now I just need to be able to set it before your plug-in loads…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How To use PNG images instead of GIF images?’ is closed to new replies.