• Resolved Harm10

    (@harm10)


    I am using filter grfwp_print_review_obj and in that code I do some actions when $grfwp_controller->args[‘excerpt’] == 1.
    I notice that the short code value is there when reviews are processed that should be displayed right away. But for those that are hidden due to the setting of reviews per page the value set in the short code is not set.
    Can this please be corrected?

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter Harm10

    (@harm10)

    I looked at your code and that is of no use to me! I want to discern whether an admin is on the admin pages doing something or looking at the web pages. A lot of times hooks are also fired when you are on the admin pages.
    If you can confirm that this hook is NEVER fired on the admin side then I can remove this protection (although I still think you should not interfere with the value of a STANDARD function of WordPress).

    Thread Starter Harm10

    (@harm10)

    I just found that is_admin() is set to true by WP itself when doing AJAX. This seems to be a (undesired) side effect of the AJAX part in WP.
    See Is admin and AJAX.
    I changed the code to if ( is_admin() && ! wp_doing_ajax() ) { return $meta; } and then it works OK even when I click the AJAX action button.

    Thread Starter Harm10

    (@harm10)

    I assume this report can be closed?

    Plugin Support jaysupport

    (@jaysupport)

    If you’ve modified your code to do what you require, then, yes, I’ll mark it as resolved.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Hidden reviews do not have correct value for excerpt value’ is closed to new replies.