Skip to content

Conversation

@cojennin
Copy link

Added filter 'zoninator_post_count_limit' to limit the number of posts that can be added to a zone. Pass the zone_id to determine which zone you want to limit the number of posts for. A filter could look something like this:
add_filter('zoninator_post_count_limit', 'limit_number_of_posts', 10, 1);

function limit_number_of_posts($zone_id) {
    switch($zone_id) {
        case '2':
            return 1;
        break;
    }
}

0 allows any number of posts to be added to a zone. Greater than 0 means that that many posts can be added to a zone. Didn't add the capability to not add posts to a zone, but that could be implemented.

@mjangda mjangda mentioned this pull request May 1, 2013
@mjangda
Copy link
Member

mjangda commented May 1, 2013

Thanks @cojennin! The patch looks good; I'll do some tests + merge.

@GaryJones GaryJones added type: enhancement New feature or request status: needs investigation Needs further investigation labels Aug 8, 2024
@GaryJones
Copy link
Contributor

The theory looks good but needs an investigation to resolve the conflicts.

@GaryJones GaryJones changed the base branch from main to develop August 8, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs investigation Needs further investigation type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants