Falcon_Connector_bbPress::settings_field_topic_notification PHP Метод

settings_field_topic_notification() публичный статический Метод

Print field for new topic notification
См. также: self::init()
    public static function settings_field_topic_notification()
    {
        global $wp_roles;
        if (!$wp_roles) {
            $wp_roles = new WP_Roles();
        }
        $options = Falcon::get_option('bbsub_topic_notification', array());
        foreach ($wp_roles->get_names() as $key => $role_name) {
            $current = in_array($key, $options) ? $key : '0';
            ?>
			<label>
				<input type="checkbox" value="<?php 
            echo esc_attr($key);
            ?>
" name="bbsub_topic_notification[]" <?php 
            checked($current, $key);
            ?>
 />
				<?php 
            echo $role_name;
            ?>
			</label>
			<br />
			<?php 
        }
        echo '<span class="description">' . __('Sends new topic email and auto subscribe the users from these role to the new topic', 'bbsub') . '</span>';
    }