# bricksable/1.3.0/includes/class-bricksable-helper.php

Bricksable for Bricks Builder, version 1.3.0. 45 lines.

- Page: https://pluginprobe.com/plugins/bricksable/1.3.0/code/includes/class-bricksable-helper.php
- Raw: https://pluginprobe.com/plugins/bricksable/1.3.0/raw/includes/class-bricksable-helper.php
- Modified: 2021-09-12T09:49:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bricksable/1.3.0/code/includes/class-bricksable-helper.php#L10-L20`.

```php
<?php
namespace Bricksable\Classes;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Bricksable_Helpers {

	/**
	 * Get Bricks Templates
	 *
	 * @param string $exclude_template_id Bricks Template ID.
	 * @return array
	 * @since 1.2.5
	 */
	public static function get_templates_list( $exclude_template_id = '' ) {
		$templates = get_posts(
			array(
				'post_type'      => BRICKS_DB_TEMPLATE_SLUG,
				'posts_per_page' => -1,
				'meta_query'     => array(
					array(
						'key'   => BRICKS_DB_TEMPLATE_TYPE,
						'value' => array( 'section', 'content' ),
					),
				),
				'post_status'    => 'publish',
			)
		);

		$list = array();

		foreach ( $templates as $template ) {
			if ( $exclude_template_id === $template->ID ) {
				continue;
			}

			$list[ $template->ID ] = $template->post_title;
		}

		return $list;
	}
}

```
