/** * Count the number of tables from either just the list, or by also counting the posts in the database. * * @since 1.0.0 * * @param bool $single_value Optional. Whether to return just the number of tables from the list, or also count in the database. * @return bool int|array Number of Tables (if $single_value), or array of Numbers from list/DB (if ! $single_value). */ public function count_tables($single_value = true) { $count_list = count($this->tables->get('table_post')); if ($single_value) { return $count_list; } $count_db = $this->model_post->count_posts(); return array('list' => $count_list, 'db' => $count_db); }