-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathdev-example.php
More file actions
executable file
·40 lines (35 loc) · 1.54 KB
/
dev-example.php
File metadata and controls
executable file
·40 lines (35 loc) · 1.54 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
35
36
37
38
39
40
<?php
/**
* Plugin Name: WPBakery: Kitchen sink custom elements
* Plugin URI: https://github.com/wpbakery/dev-example
* Description: Study code to see how you can achieve interesting things in WPBakery with your own custom content elements
* Author: WPBakery.com
* Author URI: http://wpbakery.com
* Text Domain: dev-example
* Domain Path: /languages
* Version: 1.0
*
* Requires at least: 4.9
* Requires PHP: 5.6
*/
defined( 'ABSPATH' ) || exit;
const WPB_DEV_EXAMPLE_VERSION = '1.0';
add_action( 'admin_notices', 'wpb_test_map_dependencies' );
if ( ! function_exists( 'wpb_test_map_dependencies' ) ) :
/**
* Test if WPBakery Page Builder is installed and activated.
*/
function wpb_test_map_dependencies() {
if ( ! defined( 'WPB_VC_VERSION' ) ) {
echo '
<div class="updated">
<p><strong>' . esc_html__( 'WPBakery: Kitchen sink custom elements', 'dev-example' ) . '</strong> ' . esc_html__( 'requires', 'dev-example' ) . ' <strong><a href="https://wpbakery.com/wpbakery-page-builder-license" target="_blank">WPBakery</a></strong> ' . esc_html__( 'plugin to be installed and activated on your site.', 'dev-example' ) . '</p>
</div>';
}
}
endif;
require_once __DIR__ . '/elements/basic/index.php';
require_once __DIR__ . '/elements/with-custom-class/index.php';
require_once __DIR__ . '/elements/html-template-base/index.php';
require_once __DIR__ . '/elements/with-custom-param/index.php';
require_once __DIR__ . '/elements/container/index.php';