# ultimate-post/2.2.5/addons/templates/init.php

Post Grid Gutenberg Blocks – PostX, version 2.2.5. 25 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post/2.2.5/code/addons/templates/init.php
- Raw: https://pluginprobe.com/plugins/ultimate-post/2.2.5/raw/addons/templates/init.php
- Modified: 2021-03-02T11:28:10+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/ultimate-post/2.2.5/code/addons/templates/init.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) || exit;

add_filter('ultp_addons_config', 'ultp_templates_config');
function ultp_templates_config( $config ) {
	$configuration = array(
		'name' => __( 'Saved Templates', 'ultimate-post' ),
		'desc' => __( 'Create Short-codes and use them inside your page or page builder.', 'ultimate-post' ),
		'img' => ULTP_URL.'/assets/img/addons/saved-template.svg',
		'is_pro' => false
	);
	$config['ultp_templates'] = $configuration;
	return $config;
}

add_action('init', 'ultp_templates_init');
function ultp_templates_init(){
	$settings = ultimate_post()->get_setting('ultp_templates');
	if ($settings == 'true') {
		require_once ULTP_PATH.'/addons/templates/Saved_Templates.php';
		require_once ULTP_PATH.'/addons/templates/Shortcode.php';
		new \ULTP\Saved_Templates();
		new \ULTP\Shortcode();
	}
}
```
