$account = sanitize_text_field( $account );
if ( ! isset( $services[ $service ] ) ) {
$services[ $service ] = array();
}
$services[ $service ][ $account ] = $data;
update_option( '_fl_builder_services', $services );
}
/**
* Deletes an account for an integrated service.
*
* @since 1.5.4
* @param string $service The service id.
* @param string $account The account name.
* @return void
*/
static public function delete_service_account( $service, $account )
{
$services = self::get_services();
if ( isset( $services[ $service ][ $account ] ) ) {
unset( $services[ $service ][ $account ] );
}
if ( 0 === count( $services[ $service ] ) ) {
unset( $services[ $service ] );
}
update_option( '_fl_builder_services', $services );
}
/**
* Returns an option from the database for
* the admin settings page.
*
* @since 1.5.7
* @param string $key The option key.
* @param bool $network_override Whether to allow the network admin setting to be overridden on subsites.
* @return mixed
*/
static public function get_admin_settings_option( $key, $network_override = true )
{
// Get the site-wide option if we're in the network admin.
if ( is_network_admin() ) {
$value = get_site_option( $key );
}
// Get the site-wide option if network overrides aren't allowed.
else if ( ! $network_override && class_exists( 'FLBuilderMultisiteSettings' ) ) {
$value = get_site_option( $key );
}
// Network overrides are allowed. Return the subsite option if it exists.
else if ( class_exists( 'FLBuilderMultisiteSettings' ) ) {
$value = get_option( $key );
$value = false === $value ? get_site_option( $key ) : $value;
}
// This must be a single site install. Get the single site option.
else {
$value = get_option( $key );
}
return $value;
}
/**
* Updates an option from the admin settings page.
*
* @since 1.5.7
* @param string $key The option key.
* @param mixed $value The value to update.
* @param bool $network_override Whether to allow the network admin setting to be overridden on subsites.
* @return mixed
*/
static public function update_admin_settings_option( $key, $value, $network_override = true )
{
// Update the site-wide option since we're in the network admin.
if ( is_network_admin() ) {
update_site_option( $key, $value );
}
// Delete the option if network overrides are allowed and the override checkbox isn't checked.
else if ( $network_override && FLBuilderAdminSettings::multisite_support() && ! isset( $_POST['fl-override-ms'] ) ) {
delete_option( $key );
}
// Update the option for single install or subsite.
else {
update_option( $key, $value );
}
}
/**
* Returns the plugin basename for Beaver Builder.
*
* @since 1.0
* @return string
*/
static public function plugin_basename()
{
return plugin_basename( FL_BUILDER_DIR . 'fl-builder.php' );
}
/**
* Deletes almost all database data and asset cache for the builder.
* We don't delete _fl_builder_enabled, _fl_builder_data and _fl_builder_draft
* so layouts can be recovered should the plugin be installed again.
*
* @since 1.0
* @return void
*/
static public function uninstall_database()
{
if(current_user_can('delete_plugins')) {
// Delete builder options.
delete_option('_fl_builder_settings');
delete_option('_fl_builder_enabled_modules');
delete_option('_fl_builder_enabled_templates');
delete_option('_fl_builder_user_templates_admin');
delete_option('_fl_builder_template_data_exporter');
delete_option('_fl_builder_templates_override');
delete_option('_fl_builder_templates_override_rows');
delete_option('_fl_builder_templates_override_modules');
delete_option('_fl_builder_post_types');
delete_option('_fl_builder_enabled_icons');
delete_option('_fl_builder_branding');
delete_option('_fl_builder_branding_icon');
delete_option('_fl_builder_theme_branding');
delete_option('_fl_builder_editing_capability');
delete_option('_fl_builder_global_templates_editing_capability');
delete_option('_fl_builder_help_button');
delete_option('_fl_builder_color_presets');
// Delete builder user meta.
delete_metadata('user', 0, '_fl_builder_launched', 1, true);
// Delete uploaded files and folders.
$upload_dir = self::get_upload_dir();
$filesystem = FLBuilderUtils::get_filesystem();
$filesystem->rmdir( $upload_dir['path'], true );
// Deactivate and delete the plugin.
if (!function_exists('deactivate_plugins')) {
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
deactivate_plugins(array(self::plugin_basename()), false, is_network_admin());
delete_plugins(array(self::plugin_basename()));
// Redirect to the plugins page.
wp_redirect(admin_url('plugins.php?deleted=true&plugin_status=all&paged=1&s='));
exit;
}
}
/**
* @since 1.6.4.3
* @deprecated 1.8
*/
static public function get_theme_branding()
{
_deprecated_function( __METHOD__, '1.8', 'FLBuilderWhiteLabel::get_theme_branding()' );
if ( class_exists( 'FLBuilderWhiteLabel' ) ) {
return FLBuilderWhiteLabel::get_theme_branding();
}
}
/**
* @since 1.0
* @deprecated 1.8
*/
static public function save_templates( $templates = array() )
{
_deprecated_function( __METHOD__, '1.8', 'FLBuilderCoreTemplatesAdmin::save_templates()' );
if ( class_exists( 'FLBuilderCoreTemplatesAdmin' ) ) {
FLBuilderCoreTemplatesAdmin::save_templates( $templates );
}
}
/**
* @since 1.0
* @deprecated 1.8
*/
static public function save_template( $settings )
{
_deprecated_function( __METHOD__, '1.8', 'FLBuilderCoreTemplatesAdmin::save_template()' );
if ( class_exists( 'FLBuilderCoreTemplatesAdmin' ) ) {
FLBuilderCoreTemplatesAdmin::save_template( $settings );
}
}
/**
* @since 1.0
* @deprecated 1.8
*/
static public function update_template( $old_index, $settings )
{
_deprecated_function( __METHOD__, '1.8', 'FLBuilderCoreTemplatesAdmin::update_template()' );
if ( class_exists( 'FLBuilderCoreTemplatesAdmin' ) ) {
FLBuilderCoreTemplatesAdmin::update_template( $old_index, $settings );
}
}
/**
* @since 1.0
* @deprecated 1.8
*/
static public function delete_template( $index )
{
_deprecated_function( __METHOD__, '1.8', 'FLBuilderCoreTemplatesAdmin::delete_template()' );
if ( class_exists( 'FLBuilderCoreTemplatesAdmin' ) ) {
FLBuilderCoreTemplatesAdmin::delete_template( $index );
}
}
}
FLBuilderModel::init();
index files are now added the cache directories to prevent browsing.
Added a button for resizing settings lightboxes so they fill the screen.
Added support for oEmbeds in the Text Editor module.
Changed row and module templates to saved rows and modules.
Tweaked templates admin settings terminology.
Tweaked draft and discard button terminology.
Added CSS/JavaScript to layout settings button and panel.
Increased size of the publish button.
Added a setting to collapse inactive items in accordion mode for the Menu module.
Updated Font Awesome.
Sticky posts are no longer included when using the fl_builder_insert_layout shortcode.
Added an above title option for image position in the Posts module.
Bug Fixes
- Fixed issues with exporting and importing new templates.
- Fixed issues with layout CSS/JS not exporting and importing.
- Fixed incorrect module paths on Windows servers.
- Fixed the alignment setting preview for the Heading module.
- Fixed the incorrect load order of FLBuilder::render_query CSS in IE.
- Fixed RTL issues with the Content Slider and Post Slider modules.
- Fixed an IE11 bug with images that have height:auto in equal height columns.
- Fixed a PHP notice when adding Post Slider and Post Carousel modules to the page.
- Fixed a PHP error when the time field is used inside a nested form.
- Fixed a bug with duplicate rows adding backslashes to text.
- Fixed a bug with nested Tab modules via the fl_builder_insert_layout shortcode.
- Fixed an issue with sticky posts being included when using the fl_builder_insert_layout shortcode.
- Fixed a PHP notice when using the fl_builder_insert_layout shortcode on a 404 page.
- Fixed TinyMCE link editor not closing since WordPress 4.5.
- Fixed a fatal error with the new Template Data Exporter caused by unsupported syntax in certain PHP versions.
- Fixed a PHP warning caused by plugin activation.
- Fixed the display of SVG files in the Photo module.
- Fixed CSS specificity issues in IE when using the fl_builder_render_layout shortcode.
1.7.8 - 04/20/2016
Bug Fixes
- Fixed a bug in the Post Carousel and Post Slider modules caused in 1.7.7 that broke the offset setting.
1.7.7 - 04/19/2016
Enhancements
- Added support for HTML in the Number Counter module.
- Added a loop setting to the Content Slider module to toggle looping so sliders with a single slide can't be swiped on mobile.
- Added fl_builder_loop_taxonomies filter.
- Upgrade links in the lite version now open in a new window.
Bug Fixes
- Fixed a bug with Japanese characters breaking nested forms.
- Fixed a PHP warning caused by font fields.
- Fixed a backwards compatibility issue with the Tesseract theme caused in the 1.7.6 update.
- Fixed a fatal error when uninstalling via Settings > Page Builder > Uninstall.
- Fixed a bug in the Post Carousel and Post Slider modules preventing slides from showing when pagination parameters are present.
- Fixed a bug in the Menu module causing the page to scroll horizontally.
- Fixed a bug with images in templates disappearing in nested forms when no image is selected.
- Fixed a bug with the media library not working in certain themes in WordPress 4.5.
1.7.6 - 03/29/2016
Enhancements
- Optimized database calls for global rows and modules.
- URLs in the builder's CSS cache are now saved as HTTPS if the site has SSL enabled.
- Font Awesome and Foundation icon files are now loaded via CDN.
- The "Publish Changes" button in the builder now says "Submit for Review" for drafts when a user doesn't have the capability to publish.
- Changed the error message in the Subscribe Form module to mention tags instead of lists for Drip and Hatchbuck.
- Added responsive alignment settings to the Icon module. Props to Ben on his first Beaver Builder commit! :)
- Added the option to have uncropped photos in the Posts Carousel and Posts Slider modules.
- Added the fl_builder_loop_query_args filter for filtering query args in the FLBuilderLoop class.
- Added the fl_builder_posts_module_layout_path filter for filtering the path of layout files in the Posts module.
- Added the fl_builder_color_presets filter for adding color presets to the builder's color picker.
- Added the fl_builder_after_render_css and fl_builder_after_render_js actions for hooking into after assets are rendered.
- Added the "remove" method for modules that is only called when they are removed from the page.
- Exposed bxSlider object in the Posts Carousel and Posts Slider modules so it can be accessed by third party code.
- Updated bxSlider.
- Updated translations.
Bug Fixes
- Fixed styling issues with the column settings dropdown in certain themes.
- Fixed styling issues with column resize handles and global rows and modules.
- Fixed styling issues with IE11 and full-height rows.
- Fixed styling issues with the Heading module.
- Fixed styling issues with the Callout module.
- Fixed styling issues with the Content Slider module.
- Fixed a bug with icon fields in nested forms throwing warnings.
- Fixed a bug with the color picker breaking when the core WordPress color picker scripts are loaded.
- Fixed a bug with modules set to animate below a slideshow would animate immediately.
- Fixed a bug with smooth scrolling links having the same ID on two different pages.
- Fixed a bug with sub-menus going off the right side of the page in the Menu module.
- Fixed a bug with module classes being serialized in saved layout data when a row is copied.
- Fixed a bug with mixed double quotes breaking the JS for the FLBuilder::render_query method.
- Fixed a bug caused by the WPide plugin.
- Fixed a select field bug where the value of the 'selected' function was being echoed instead of returned.
- Fixed a bug with the Google Plus button not working in the Slideshow module.
- Fixed a bug with wbr tags breaking nested forms.
1.7.5 - 02/24/2016
Bug Fixes
- Fixed a CSS bug with row background color overlays preventing module access in 1.7.4.
- Fixed a bug where setting a blank default page heading selector in the global settings would hide the entire page.
- Fixed an IE11 bug with full height rows that have fixed width content.
- Fixed a bug with the read more link not showing in the Posts Carousel module when the content is hidden.
1.7.4 - 02/22/2016
Enhancements
- Added a welcome page to the admin settings.
- Added updater enhancements to support the new domain manager.
- Pagination in the Gallery module's lightbox is now sequential instead of top to bottom.
- Changed the column settings icon from a wrench icon to columns icon for consistency with the module overlay.
- The Content Slider module now adds the srcset attribute to images when it can.
- The URL is now updated when a smooth scroll link has finished scrolling.
- Args can now be passed to auto suggest fields for modifying any of the auto suggest settings.
- Misc translation updates.
Bug Fixes
Gyári olcsó Hot 2024 fülzsír eltávolító WiFi fültisztító otoszkóp, integrált vezeték nélküli orvosi biztonságos fülpiszkáló eszköz kamera elektromos fülzsír eltávolító