PluginProbe ʕ •ᴥ•ʔ
Timeline Blocks for Gutenberg / trunk
Timeline Blocks for Gutenberg vtrunk
timeline-blocks / timeline-blocks.php
timeline-blocks Last commit date
dist 2 months ago src 2 months ago readme.txt 2 months ago timeline-blocks.php 2 months ago
timeline-blocks.php
69 lines
1 <?php
2 /**
3 * Plugin Name: Timeline Blocks for Gutenberg
4 * Plugin URI: https://wordpress.org/plugins/timeline-blocks/
5 * Description: A beautiful timeline block to showcase your posts in timeline presentation with multiple templates availability.
6 * Author: Techeshta
7 * Author URI: https://www.techeshta.com
8 * Version: 1.1.11
9 * License: GPL2+
10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11 * Text Domain: timeline-blocks
12 */
13 /**
14 * Exit if accessed directly
15 */
16
17 if (!defined('ABSPATH')) {
18 exit;
19 }
20
21 define('TB_DOMAIN', 'timeline-blocks');
22 define('TB_DIR', plugin_dir_path(__FILE__));
23
24 /**
25 * Initialize the blocks
26 */
27 function tb_timeline_loader() {
28 /**
29 * Load the blocks functionality
30 */
31 require_once plugin_dir_path(__FILE__) . 'dist/init.php';
32
33 /**
34 * Load Post Grid PHP
35 */
36 require_once plugin_dir_path(__FILE__) . 'src/blocks/index.php';
37 }
38
39 add_action('plugins_loaded', 'tb_timeline_loader');
40
41 /**
42 * Load the plugin text-domain
43 */
44 function tb_timeline_init() {
45 load_plugin_textdomain('timeline-blocks', false, basename(dirname(__FILE__)) . '/src/languages');
46 }
47
48 add_action('init', 'tb_timeline_init');
49
50 /**
51 * Add a check for our plugin before redirecting
52 */
53 function tb_timeline_activate() {
54 add_option('tb_timeline_gutenberg_do_activation_redirect', true);
55 }
56
57 register_activation_hook(__FILE__, 'tb_timeline_activate');
58
59 /**
60 * Add image sizes
61 */
62 function tb_timeline_image_sizes() {
63 // Post Grid Block
64 add_image_size('tb-timeline-landscape', 600, 400, true);
65 add_image_size('tb-timeline-square', 600, 600, true);
66 }
67
68 add_action('after_setup_theme', 'tb_timeline_image_sizes');
69