beaver-builder-lite-version
Last commit date
classes
11 years ago
css
11 years ago
data
11 years ago
fonts
11 years ago
img
11 years ago
includes
11 years ago
js
11 years ago
json
11 years ago
lang
11 years ago
modules
11 years ago
changelog.txt
11 years ago
fl-builder.php
11 years ago
index.php
11 years ago
license.txt
11 years ago
readme.txt
11 years ago
fl-builder.php
111 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Beaver Builder Plugin (Lite Version) |
| 4 | * Plugin URI: http://www.wpbeaverbuilder.com |
| 5 | * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme! |
| 6 | * Version: 1.4.3 |
| 7 | * Author: The Beaver Builder Team |
| 8 | * Author URI: http://www.wpbeaverbuilder.com |
| 9 | * Copyright: (c) 2014 Beaver Builder |
| 10 | * License: GNU General Public License v2.0 |
| 11 | * License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 12 | * Text Domain: fl-builder |
| 13 | */ |
| 14 | define('FL_BUILDER_VERSION', '1.4.3'); |
| 15 | define('FL_BUILDER_DIR', plugin_dir_path(__FILE__)); |
| 16 | define('FL_BUILDER_URL', plugins_url('/', __FILE__)); |
| 17 | define('FL_BUILDER_LITE', true); |
| 18 | define('FL_BUILDER_SUPPORT_URL', 'http://www.wpbeaverbuilder.com/support'); |
| 19 | define('FL_BUILDER_UPGRADE_URL', 'http://www.wpbeaverbuilder.com/pricing/?upgrade'); |
| 20 | define('FL_BUILDER_DEMO_URL', 'http://demos.wpbeaverbuilder.com'); |
| 21 | define('FL_BUILDER_OLD_DEMO_URL', 'http://demos.fastlinemedia.com'); |
| 22 | define('FL_BUILDER_DEMO_CACHE_URL', 'http://demos.wpbeaverbuilder.com/wp-content/uploads/fl-builder/'); |
| 23 | |
| 24 | /* Classes */ |
| 25 | require_once 'classes/FLBuilder.php'; |
| 26 | require_once 'classes/FLBuilderAdmin.php'; |
| 27 | require_once 'classes/FLBuilderAdminPosts.php'; |
| 28 | require_once 'classes/FLBuilderAutoSuggest.php'; |
| 29 | require_once 'classes/FLBuilderColor.php'; |
| 30 | require_once 'classes/FLBuilderIcons.php'; |
| 31 | require_once 'classes/FLBuilderLoop.php'; |
| 32 | require_once 'classes/FLBuilderModel.php'; |
| 33 | require_once 'classes/FLBuilderModule.php'; |
| 34 | require_once 'classes/FLBuilderPhoto.php'; |
| 35 | require_once 'classes/FLBuilderUpdate.php'; |
| 36 | require_once 'classes/FLBuilderUtils.php'; |
| 37 | |
| 38 | /* Includes */ |
| 39 | require_once 'includes/compatibility.php'; |
| 40 | require_once 'includes/updater/updater.php'; |
| 41 | |
| 42 | /* Plugin Activation */ |
| 43 | register_activation_hook(__FILE__, 'FLBuilderAdmin::activate'); |
| 44 | |
| 45 | /* Localization */ |
| 46 | add_action('plugins_loaded', 'FLBuilder::load_plugin_textdomain'); |
| 47 | |
| 48 | /* Updates */ |
| 49 | add_action('init', 'FLBuilderUpdate::init'); |
| 50 | |
| 51 | /* Load Settings and Modules */ |
| 52 | add_action('init', 'FLBuilderModel::load_settings', 10); |
| 53 | add_action('init', 'FLBuilderModel::load_modules', 11); |
| 54 | |
| 55 | /* Admin AJAX Actions */ |
| 56 | add_action('wp_ajax_fl_builder_save', 'FLBuilderModel::update'); |
| 57 | |
| 58 | /* Admin AJAX Filters */ |
| 59 | add_filter('heartbeat_received', 'FLBuilderModel::lock_post', 10, 2); |
| 60 | |
| 61 | /* Admin Actions */ |
| 62 | add_action('init', 'FLBuilderAdmin::init'); |
| 63 | add_action('current_screen', 'FLBuilderAdminPosts::init'); |
| 64 | add_action('before_delete_post', 'FLBuilderModel::delete_post'); |
| 65 | add_action('save_post', 'FLBuilderModel::save_revision'); |
| 66 | add_action('wp_restore_post_revision', 'FLBuilderModel::restore_revision', 10, 2); |
| 67 | |
| 68 | /* Admin Filters */ |
| 69 | add_filter('redirect_post_location', 'FLBuilderAdminPosts::redirect_post_location'); |
| 70 | add_filter('page_row_actions', 'FLBuilderAdminPosts::render_row_actions_link'); |
| 71 | add_filter('post_row_actions', 'FLBuilderAdminPosts::render_row_actions_link'); |
| 72 | add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'FLBuilderAdmin::render_plugin_action_links'); |
| 73 | add_filter('all_plugins', 'FLBuilderAdmin::white_label_plugins_page'); |
| 74 | |
| 75 | /* AJAX Actions */ |
| 76 | add_action('fl_ajax_fl_builder_save', 'FLBuilderModel::update'); |
| 77 | add_action('fl_ajax_fl_builder_autosuggest', 'FLBuilderAutoSuggest::init'); |
| 78 | add_action('fl_ajax_fl_builder_render_layout', 'FLBuilder::render_layout'); |
| 79 | add_action('fl_ajax_fl_builder_render_preview', 'FLBuilder::render_preview'); |
| 80 | add_action('fl_ajax_fl_builder_render_settings_form', 'FLBuilder::render_settings_form'); |
| 81 | add_action('fl_ajax_fl_builder_render_global_settings', 'FLBuilder::render_global_settings'); |
| 82 | add_action('fl_ajax_fl_builder_render_template_selector', 'FLBuilder::render_template_selector'); |
| 83 | add_action('fl_ajax_fl_builder_render_user_template_settings', 'FLBuilder::render_user_template_settings'); |
| 84 | add_action('fl_ajax_fl_builder_render_icon_selector', 'FLBuilder::render_icon_selector'); |
| 85 | add_action('fl_ajax_fl_builder_render_new_row', 'FLBuilder::render_new_row'); |
| 86 | add_action('fl_ajax_fl_builder_render_row_settings', 'FLBuilder::render_row_settings'); |
| 87 | add_action('fl_ajax_fl_builder_render_new_column_group', 'FLBuilder::render_new_column_group'); |
| 88 | add_action('fl_ajax_fl_builder_render_column_settings', 'FLBuilder::render_column_settings'); |
| 89 | add_action('fl_ajax_fl_builder_render_new_module_settings', 'FLBuilder::render_new_module_settings'); |
| 90 | add_action('fl_ajax_fl_builder_render_module_settings', 'FLBuilder::render_module_settings'); |
| 91 | |
| 92 | /* Actions */ |
| 93 | add_action('init', 'FLBuilder::register_templates_post_type'); |
| 94 | add_action('send_headers', 'FLBuilder::no_cache_headers'); |
| 95 | add_action('wp', 'FLBuilder::ajax'); |
| 96 | add_action('wp', 'FLBuilder::init'); |
| 97 | add_action('wp_enqueue_scripts', 'FLBuilder::layout_styles_scripts'); |
| 98 | add_action('wp_enqueue_scripts', 'FLBuilder::styles_scripts'); |
| 99 | add_action('admin_bar_menu', 'FLBuilder::admin_bar_menu', 999); |
| 100 | add_filter('template_include', 'FLBuilder::render_template', 999); |
| 101 | add_action('wp_footer', 'FLBuilder::include_jquery'); |
| 102 | add_action('wp_footer', 'FLBuilder::render_ui'); |
| 103 | |
| 104 | /* Filters */ |
| 105 | add_filter('body_class', 'FLBuilder::body_class'); |
| 106 | add_filter('wp_default_editor', 'FLBuilder::default_editor'); |
| 107 | add_filter('mce_css', 'FLBuilder::add_editor_css'); |
| 108 | add_filter('mce_buttons_2', 'FLBuilder::editor_buttons_2'); |
| 109 | add_filter('mce_external_plugins', 'FLBuilder::editor_external_plugins', 9999); |
| 110 | add_filter('the_content', 'FLBuilder::render_content'); |
| 111 |