Created
June 28, 2013 10:39
-
-
Save marcogrueter/5883844 to your computer and use it in GitHub Desktop.
plugin example for https://forum.pyrocms.com/discussion/24488/disabling-streams-after-reaching-specific-count-of-entries#latest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Plugin_registration { | |
public function is_open() | |
{ | |
$limit = $this->attribute('limit', 150); | |
return ! ($limit >= $this->db->count_all('your_stream_table')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment