Skip to content

Conversation

@zamans78
Copy link
Contributor

Fix for WordPress-5.7.1

Fix for jQuery deprecated function

Changed function .change() to .on('change', function(){})

$("input:radio[name=wpsite_limit_posts_settings_all_users]").on("change", function () {

Changed Hook settings(see comment):

/**
     * Hooks to 'init' and resgisters new post status type
     *
     * @since 1.0.0
     */
    public function register_post_status()
    {
        register_post_status('limited', array(
            'label' => esc_html__('Limited', 'wpsite-limit-posts'),
            'public' => false,  // Changed from true to false.
            'exclude_from_search' => false,
            'show_in_admin_all_list' => true,
            'show_in_admin_status_list' => true,
            'label_count' => _n_noop('Limited <span class="count">(%s)</span>', 'Limited <span class="count">(%s)</span>', 'wpsite-limit-posts'),
        ));
    }


register_post_status('limited', array(
'label' => esc_html__('Limited', 'wpsite-limit-posts'),
'public' => false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this value to false from true??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What actually happened is that in old version its true that limited post would get pushed to (Limited section of Posts) showing that it didn't post although its publicly visible without the preview of the Admin but in new version what happened is that it does get pushed to (Limited section of Posts) and also not publicly visible if Admin doesn't preview it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants