LBuilderWhiteLabel::get_branding();
}
return __( 'Page Builder', 'fl-builder' );
}
/**
* Returns the custom branding icon URL.
*
* @since 1.3.7
* @return string
*/
static public function get_branding_icon()
{
if ( class_exists( 'FLBuilderWhiteLabel' ) ) {
return FLBuilderWhiteLabel::get_branding_icon();
}
return FL_BUILDER_URL . 'img/beaver.png';
}
/**
* Returns an array of slugs for all enabled icon sets.
*
* @since 1.4.6
* @return array
*/
static public function get_enabled_icons()
{
$value = self::get_admin_settings_option( '_fl_builder_enabled_icons', true );
return ! $value ? array( 'font-awesome', 'foundation-icons', 'dashicons' ) : $value;
}
/**
* Returns the capability necessary for a user to access all
* editing features in the builder interface.
*
* @since 1.3.9
* @return string
*/
static public function get_editing_capability()
{
$value = self::get_admin_settings_option( '_fl_builder_editing_capability', true );
return ! $value ? 'edit_posts' : $value;
}
/**
* Checks to see if the current user has the capability necessary
* to use the builders advanced editing features.
*
* @since 1.7
* @return bool
*/
static public function current_user_has_editing_capability()
{
$cap = self::get_editing_capability();
return self::current_user_has_capability($cap);
}
/**
* Check if the current user has the specific capabilities
*
* @param string $cap The capability to evaluate if it's single or multiple (comma separated) value
* @return bool
*/
static public function current_user_has_capability($cap)
{
if ( strstr( $cap, ',' ) ) {
$parts = explode( ',', $cap );
foreach( $parts as $part ) {
if ( current_user_can( trim( $part ) ) ) {
return true;
}
}
return false;
}
else {
return current_user_can( $cap );
}
}
/**
* Returns the capability necessary for a user to edit global templates.
*
* @since 1.6.3
* @return string
*/
static public function get_global_templates_editing_capability()
{
$value = self::get_admin_settings_option( '_fl_builder_global_templates_editing_capability', true );
return ! $value ? 'edit_posts' : $value;
}
/**
* Returns the default settings for the builder's help button.
*
* @since 1.4.9
* @return array
*/
static public function get_help_button_defaults()
{
$defaults = array(
'enabled' => true,
'tour' => true,
'video' => true,
'video_embed' => '',
'knowledge_base' => true,
'knowledge_base_url' => self::get_store_url( 'knowledge-base', array( 'utm_medium' => ( true === FL_BUILDER_LITE ? 'bb-lite' : 'bb-pro' ), 'utm_source' => 'builder-ui', 'utm_campaign' => 'kb-help-button' ) ),
'forums' => true,
'forums_url' => self::get_store_url( 'knowledge-base', array( 'utm_medium' => ( true === FL_BUILDER_LITE ? 'bb-lite' : 'bb-pro' ), 'utm_source' => 'builder-ui', 'utm_campaign' => 'forums-help-button' ) )
);
return $defaults;
}
/**
* Returns the settings for the builder's help button.
*
* @since 1.4.9
* @return array
*/
static public function get_help_button_settings()
{
if ( class_exists( 'FLBuilderWhiteLabel' ) ) {
return FLBuilderWhiteLabel::get_help_button_settings();
}
return self::get_help_button_defaults();
}
/**
* Returns an array of account data for all integrated services.
*
* @since 1.5.4
* @return array
*/
static public function get_services()
{
return get_option( '_fl_builder_services', array() );
}
/**
* Updates the account data for an integrated service.
*
* @since 1.5.4
* @param string $service The service id.
* @param string $account The account name.
* @param array $data The account data.
* @return void
*/
static public function update_services( $service, $account, $data )
{
$services = self::get_services();
$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();
ถพบคีย์ API ของคุณในบัญชี GetResponse ภายใต้บัญชีของฉัน > GetResponse API สามารถพบคีย์ API ของคุณในบัญชี Hatchbuck ภายใต้การตั้งค่าบัญชี > Web API สามารถพบคีย์ API ของคุณในบัญชี Campayn ของคุณภายใต้ผู้ดูแลระบบ > แอพพลิเคชัน > คีย์เข้ารหัส สามารถพบคีย์ API ของคุณในบัญชี Mad Mimi ภายใต้บัญชี > การตั้งค่า & การเรียกเก็บเงิน > API สามารถพบคีย์ API ของคุณในบัญชี MailChimp ของคุณภายใต้บัญชี > เพิ่มเติมพิเศษ > คีย์ API สามารถพบคีย์ API ของคุณในบัญชี Mailrelay ของคุณภายใต้เมนู > การตั้งค่า > การเข้าถึง API คุณสามารถหาคีย์การเข้าถึงของคุณได้ในบัญชี SendinBlue ของคุณภายใต้ API & การผสานการทำงาน > ผู้จ้ัดการคีย์ของคุณ > เวอร์ชัน 2.0 > คีย์การเข้าถึง สามารถพบ ID บัญชีของคุณในบัญชี Drip ภายใต้การตั้งค่า > การกำหนดค่าเว็บไซต์ คุณสามารถหา ID แอพได้ใน URL สำหรับบัญชีของคุณ ตัวอย่างเช่น หาก URL สำหรับบัญชีของคุณคือ myaccount.infusionsoft.com ดังนั้น ID แอพของคุณคือ myaccount