Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter lop_cz

    (@lop_cz)

    Yes, it is similar to the save post hook, but not exactly the same.

    For example clearing the cache for parent post is not necessary. But forcing to clear the cache of page on which the post was rated (home or index pages or archives) is necessary so the user can see his rating was already counted after going back. That’s the reason why I’m using the Referer header.

    It’s not a perfect solution but currently the only available since the author of WP-PostRatings plugin is not willing to fully ajaxify the display method of current ratings data.

    Use this code in your functions.php:

    /**
     * Disable the WPSEO v3.1+ Primary Category feature.
     */
    add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' );

    The correct code to disable the functionality:

    /**
     * Disable the WPSEO v3.1+ Primary Category feature.
     */
    add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' );

    It expects an Array not a Boolean.

    If you want to disable the functionality of Primary category put this in your functions.php file:

    /**
     * Disable the WPSEO v3.1+ Primary Category feature.
     */
    add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' );

    You have to use image_size_names_choose filter in your functions.php file like this:

    function my_image_size_names( $sizes ) {
    	return array_merge( $sizes, array(
    		'custom-size' => __( 'Custom Size' ),
    	) );
    }
    add_filter( 'image_size_names_choose', 'my_image_size_names' );

    As a side-effect the custom size will be selectable in Media Library admin.

    Maybe I haven’t said it clearly.

    You have to comment out or delete the line 157 and uncomment the line 156 by deleting just the //FIXED part and not the whole line.
    Then you have to update every Zone in Zone editor so the correct values are saved once again.
    You may have to look at the table wp_sam_zone in DB and check if “z_cats” and “z_archive_ct” fields contain serialized array and not a ‘0’ string.

    I don’t know about WP Spam Free plugin, but I don’t think it has anything to do with this issue.

    I hope this bug will be corrected soon by the developer.

    These errors are caused by wrongly saved values in Zone editor.
    It’s fine if you create new Zone, but once you update anything in it, values for DB fields “z_cats” and “z_archive_ct” are saved in wrong format.

    The solution is pretty simple:
    In zone.editor.admin.class.php just uncomment the line 156 that starts with //FIXED $formatRow = … and comment out the next line 157.

    This is probably just an overlooked bug because the correct format for DB fields is actually the first one and not the second.

    And you don’t have to modify ad.class.php in any way.

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