-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlablab_builder_text_module.php
More file actions
34 lines (27 loc) · 1.24 KB
/
lablab_builder_text_module.php
File metadata and controls
34 lines (27 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/*
* Plugin Name: Lablab Builder Text Editor Module
* Plugin URI: https://github.com/team-ok/lablab-builder-text-editor
* Description: Adds a text editor module to lablab builder.
* Version: 1.0.0
* Author: Timo Klemm
* Author URI: https://github.com/team-ok
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: lablab-text
* Domain Path: /languages
*/
// load the plugin textdomain
add_action( 'plugins_loaded', 'load_lablab_text_editor_module_textdomain' );
function load_lablab_text_editor_module_textdomain(){
// Relative path to WP_PLUGIN_DIR where the .mo file resides
$domain_path = dirname( plugin_basename( __FILE__ ) ) . '/languages';
load_plugin_textdomain( 'lablab-text', false, $domain_path );
}
// load the module class
add_action( 'plugins_loaded', 'load_lablab_text_editor_module_class' );
function load_lablab_text_editor_module_class(){
require_once( plugin_dir_path( __FILE__ ) . 'classes/class-lablab-builder-text-editor-module.php' );
}
// register this module with lablab builder
add_filter( 'lablab_builder_modules', array( 'Lablab_Builder_Text_Module', 'register' ) );