Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wp 5.7.1 fix #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Wp 5.7.1 fix #4

wants to merge 3 commits into from

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.

2 participants