-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbb-livepreview.php
50 lines (36 loc) · 1.35 KB
/
bb-livepreview.php
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
41
42
43
44
45
46
47
48
<?php
/**
* Plugin Name: Beaver Builder Live Preview and Quicksave
* Plugin URI: http://www.badabing.nl
* Description: By the press of a button view your layout as if you were on the frontend, not on the backend. Add a Quicksave button that allows you to stay on the same page and Provide easy access to CSS/Layout Settings by moving it to the top bar.
* Version: 1.2.4
* Author: Badabing
* Author URI: http://www.badabing.nl
* Text Domain: bb-livepreview
* Domain Path: /languages
*/
define( 'BBLIVEPREVIEW_VERSION' , '1.2.4' );
define( 'BBLIVEPREVIEW_DIR', plugin_dir_path( __FILE__ ) );
define( 'BBLIVEPREVIEW_URL', plugins_url( '/', __FILE__ ) );
//textdomain
load_plugin_textdomain( 'bb-livepreview', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
add_action( 'init', 'BBLIVEPREVIEW_plugin_start' );
function BBLIVEPREVIEW_plugin_start() {
global $post;
if ( ! is_user_logged_in() ) {
return;
}
if ( class_exists( 'FLBuilder' ) && current_user_can( 'edit_post', $post->ID ) ) {
require_once ( 'livepreview/livepreview.php' );
}
}
/**
* UPDATER
*/
if( ! class_exists( 'Smashing_Updater' ) ){
include_once( plugin_dir_path( __FILE__ ) . 'updater.php' );
}
$updater = new Smashing_Updater( __FILE__ );
$updater->set_username( 'badabingbreda' );
$updater->set_repository( 'bb-livepreview' );
$updater->initialize();