isImagePhoto

Roland Member, Translator
edited December 2022 in Themes

Hello !
two years ago, Acrylian help me by using this function.

After updating to 1.6 and using the Deprecated function on Zenphoto dashboard, it says it's now time to change :-)
I've been looking to https://docs.zenphoto.org/1.5.x/annotation-group-deprecated.html and https://docs.zenphoto.org/1.5.x/function-isImagePhoto.html without success.

Maybe someone have a clue to update my theme ?
thanks for your help and thanks for making Zenphoto alive !

Edit : I've been looking to debug, the solution seems to be using isPhoto() instead.
I 'll try :)

USER DEPRECATED NOTICE: isImagePhoto (called from album.php line 52) is deprecated. Use Image object method isPhoto() instead in /Users/roland/Sites/collections/zp-core/functions/functions-basic.php on line 2106
trigger_error called from deprecationNotice (functions-basic.php [2106])

Edit 2 : Nope, it's blank now.

Tags:

Comments

  • acrylian Administrator, Developer

    isImagePhoto() is a new deprecation in 1.6.

    Look at the line mentined. You find something like isImagePhoto($_zp_current_image). Change that to $_zp_current_image->isPhoto().

    using the Deprecated function on Zenphoto dashboard,

    Just to note that this does not cover all deprecations anymore and is deprecated itself. See the release post about that.

  • Roland Member, Translator

    Hello acrylian, thanks for your help. I'm gonna to take some time soon for this big release post :-)

  • maymar Member

    Hi acrylian, i try to swap deprecated function by new one but when i try to change isImagePhoto() to isPhoto() i get blank page.
    Here is code:
    function checkForImages() {
    global $_zp_current_image, $_zp_current_album, $_zp_current_search, $_zp_gallery;
    $c = 0;
    while (next_image()):
    if (isImagePhoto()) $c++;
    endwhile;
    if ($c > 0) {
    return true;
    } else {
    return false;
    }
    }
    how i should replace it correctly?
    Above example that you post, when you have variable works. Sry but i'm not programmer.
    its form zpbase theme.

  • acrylian Administrator, Developer

    It is an image class method. You have to use $_zp_current_image->isPhoto() instead.

  • maymar Member

    thx :-)

Sign In or Register to comment.