Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder
File: functions.php
'animation-fade' =>
[500] Fix | Delete
'<g>
[501] Fix | Delete
<circle cx="8.5" cy="19.5" r="1.5"/>
[502] Fix | Delete
<circle cx="8.5" cy="14.5" r="1.5"/>
[503] Fix | Delete
<circle cx="5" cy="12" r="1"/>
[504] Fix | Delete
<circle cx="5" cy="17" r="1"/>
[505] Fix | Delete
<circle cx="8.5" cy="9.5" r="1.5"/>
[506] Fix | Delete
<path d="M15.7 4c-.4 0-.8.1-1.2.3-.6.3-.5.7-1.5.7-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c1 0 .9.4 1.4.7.4.2.8.3 1.2.3 4.3-.4 8.3-5.3 8.3-10.5s-4-10-8.2-10.5z"/>
[507] Fix | Delete
</g>',
[508] Fix | Delete
'animation-slide' =>
[509] Fix | Delete
'<g>
[510] Fix | Delete
<path d="M22 4h-5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h5c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM10 14c0 .6.4 1 1 1h.6L10 16.6c-.4.4-.4 1 0 1.4.4.4 1 .4 1.4 0l3.3-3.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7L11.4 10c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l1.6 1.6H11c-.6 0-1 .4-1 1z"/>
[511] Fix | Delete
<circle cx="7" cy="14" r="1.5"/>
[512] Fix | Delete
<circle cx="3" cy="14" r="1"/>
[513] Fix | Delete
</g>',
[514] Fix | Delete
'animation-bounce' =>
[515] Fix | Delete
'<g>
[516] Fix | Delete
<circle cx="21.5" cy="8.5" r="3.5"/>
[517] Fix | Delete
<circle cx="16" cy="12" r="1.7"/>
[518] Fix | Delete
<circle cx="13" cy="15" r="1.2"/>
[519] Fix | Delete
<circle cx="11" cy="18" r="1"/>
[520] Fix | Delete
<circle cx="9" cy="22" r="1"/>
[521] Fix | Delete
<circle cx="7" cy="19" r="1"/>
[522] Fix | Delete
<circle cx="4" cy="17" r="1"/>
[523] Fix | Delete
</g>',
[524] Fix | Delete
'animation-zoom' =>
[525] Fix | Delete
'<g>
[526] Fix | Delete
<path d="M23.7 4.3c-.1-.1-.2-.2-.3-.2-.1-.1-.3-.1-.4-.1h-5c-.6 0-1 .4-1 1s.4 1 1 1h2.6l-3.1 3.1c-.2-.1-.3-.1-.5-.1h-6c-.2 0-.3 0-.5.1L7.4 6H10c.6 0 1-.4 1-1s-.4-1-1-1H5c-.1 0-.3 0-.4.1-.2.1-.4.3-.5.5-.1.1-.1.3-.1.4v5c0 .6.4 1 1 1s1-.4 1-1V7.4l3.1 3.1c-.1.2-.1.3-.1.5v6c0 .2 0 .3.1.5L6 20.6V18c0-.6-.4-1-1-1s-1 .4-1 1v5c0 .1 0 .3.1.4.1.2.3.4.5.5.1.1.3.1.4.1h5c.6 0 1-.4 1-1s-.4-1-1-1H7.4l3.1-3.1c.2 0 .3.1.5.1h6c.2 0 .3 0 .5-.1l3.1 3.1H18c-.6 0-1 .4-1 1s.4 1 1 1h5c.1 0 .3 0 .4-.1.2-.1.4-.3.5-.5.1-.1.1-.3.1-.4v-5c0-.6-.4-1-1-1s-1 .4-1 1v2.6l-3.1-3.1c0-.2.1-.3.1-.5v-6c0-.2 0-.3-.1-.5L22 7.4V10c0 .6.4 1 1 1s1-.4 1-1V5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3z"/>
[527] Fix | Delete
</g>',
[528] Fix | Delete
'animation-flip' =>
[529] Fix | Delete
'<g>
[530] Fix | Delete
<path d="M22 2.4l-7 2.9V7h-2v-.8L7.6 8.7c-.4.2-.6.5-.6.9v8.7c0 .4.2.7.6.9l5.4 2.5V21h2v1.7l7 2.9c.5.2 1-.2 1-.7V3.1c0-.5-.5-.9-1-.7zM15 19h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zM13 2h2v2.5h-2zM13 23.5h2V26h-2z"/>
[531] Fix | Delete
</g>',
[532] Fix | Delete
'animation-fold' =>
[533] Fix | Delete
'<g>
[534] Fix | Delete
<path d="M24 7h-4V3.4c0-.8-.6-1.4-1.3-1.4-.2 0-.5.1-.7.2l-6.5 3.9c-.9.6-1.5 1.6-1.5 2.6V23c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-6 10.5c0 .2-.1.4-.3.5L12 21.5V8.7c0-.4.2-.7.5-.9L18 4.5v13zM6 7h2v2H6zM6 23h2v2H6zM2.6 7.1c-.1 0-.1.1-.2.1v.1l-.1.1-.1.1c-.1.1-.2.3-.2.5v1h2V7H3c-.1 0-.2 0-.4.1zM2 23v1c0 .4.3.8.7.9.1.1.2.1.3.1h1v-2H2zM2 11h2v2H2zM2 19h2v2H2zM2 15h2v2H2z"/>
[535] Fix | Delete
</g>',
[536] Fix | Delete
'animation-roll' =>
[537] Fix | Delete
'<g>
[538] Fix | Delete
<path d="M18.8 5c-5.3-2.7-11.8.2-14 5.6-1.1 2.8-1 6 .2 8.8.4 1 3.9 6.5 5 3.6.5-1.2-1.3-2.2-1.9-3-.8-1.2-1.4-2.5-1.6-3.9-.4-2.7.5-5.5 2.4-7.4 4-4 11.6-2.5 12.6 3.4.4 2.7-.9 5.5-3.4 6.6-2.6 1.1-6 0-6.8-2.8-.7-2.4 1.2-5.7 4-4.8 1.1.3 2 1.5 1.5 2.7-.3.7-1.7 1.2-1.6.1 0-.3.2-.4.2-.8-.1-.4-.5-.6-.9-.6-1.1.1-1.6 1.6-1.3 2.5.3 1.2 1.5 1.9 2.7 1.9 2.9 0 4.2-3.4 3.1-5.7-1.2-2.6-4.6-3.4-7-2.2-2.6 1.3-3.8 4.4-3.1 7.2 1.6 5.9 9.3 6.8 13.1 2.5 3.8-4.2 1.9-11.1-3.2-13.7z"/>
[539] Fix | Delete
</g>',
[540] Fix | Delete
'border-link' =>
[541] Fix | Delete
'<g>
[542] Fix | Delete
<path d="M14.71 17.71a3 3 0 0 1-2.12-.88l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 0 1.41 0l5-4.95a1 1 0 0 0 0-1.41l-1.46-1.42a1 1 0 0 0-1.41 0L16.1 9.07a1 1 0 0 1-1.41-1.41l1.43-1.43a3.07 3.07 0 0 1 4.24 0l1.41 1.41a3 3 0 0 1 0 4.24l-5 4.95a3 3 0 0 1-2.06.88z"/>
[543] Fix | Delete
<path d="M9.76 22.66a3 3 0 0 1-2.12-.88l-1.42-1.42a3 3 0 0 1 0-4.24l5-4.95a3.07 3.07 0 0 1 4.24 0l.71.71a1 1 0 0 1-1.41 1.41l-.76-.7a1 1 0 0 0-1.41 0l-5 4.95a1 1 0 0 0 0 1.41L9 20.36a1 1 0 0 0 1.41 0L11.82 19a1 1 0 0 1 1.41 1.41l-1.36 1.36a3 3 0 0 1-2.11.89z"/>
[544] Fix | Delete
</g>',
[545] Fix | Delete
'border-all' =>
[546] Fix | Delete
'<g>
[547] Fix | Delete
<path d="M22 5H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zm-2 15H8V8h12z"/>
[548] Fix | Delete
</g>',
[549] Fix | Delete
'border-top' =>
[550] Fix | Delete
'<g>
[551] Fix | Delete
<path d="M17 21h2v2h-2zM5 9h2v2H5zM21 17h2v2h-2zM21 9h2v2h-2zM21 13h2v2h-2zM21 23h1a1 1 0 0 0 1-1v-1h-2zM5 17h2v2H5zM5 13h2v2H5zM13 21h2v2h-2zM9 21h2v2H9zM5 21v1a1 1 0 0 0 1 1h1v-2zM22 5H6a1 1 0 0 0-1 1v2h18V6a1 1 0 0 0-1-1z"/>
[552] Fix | Delete
</g>',
[553] Fix | Delete
'border-right' =>
[554] Fix | Delete
'<g>
[555] Fix | Delete
<path d="M13 5h2v2h-2zM5 9h2v2H5zM9 5h2v2H9zM7 5H6a1 1 0 0 0-1 1v1h2zM5 13h2v2H5zM13 21h2v2h-2zM5 17h2v2H5zM9 21h2v2H9zM17 5h2v2h-2zM5 21v1a1 1 0 0 0 1 1h1v-2zM22 5h-2v18h2a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zM17 21h2v2h-2z"/>
[556] Fix | Delete
</g>',
[557] Fix | Delete
'border-bottom' =>
[558] Fix | Delete
'<g>
[559] Fix | Delete
<path d="M9 5h2v2H9zM7 20H5v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2H7zM17 5h2v2h-2zM5 13h2v2H5zM5 9h2v2H5zM13 5h2v2h-2zM5 17h2v2H5zM21 9h2v2h-2zM21 17h2v2h-2zM22 5h-1v2h2V6a1 1 0 0 0-1-1zM21 13h2v2h-2zM7 5H6a1 1 0 0 0-1 1v1h2z"/>
[560] Fix | Delete
</g>',
[561] Fix | Delete
'border-left' =>
[562] Fix | Delete
'<g>
[563] Fix | Delete
<path d="M22 5h-1v2h2V6a1 1 0 0 0-1-1zM9 21h2v2H9zM21 17h2v2h-2zM13 21h2v2h-2zM21 13h2v2h-2zM9 5h2v2H9zM17 21h2v2h-2zM17 5h2v2h-2zM21 9h2v2h-2zM8 7V5H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h2V7zM21 23h1a1 1 0 0 0 1-1v-1h-2zM13 5h2v2h-2z"/>
[564] Fix | Delete
</g>',
[565] Fix | Delete
'lock' =>
[566] Fix | Delete
'<g>
[567] Fix | Delete
<path d="M20 12C19.9 11.7 19.3 11 19 11L18 11C18 8.1 16.2 6 14 6 11.8 6 10 8.1 10 11L9 11C8.6 11 8.1 11.6 8 12L8 13 8 19 8 20C8.1 20.3 8.7 20.9 9 21L19 21C19.4 21 19.9 20.4 20 20L20 19 20 14 20 12 20 12ZM14 8C15.1 8 16 9.4 16 11.1L12 11.1C12 9.4 12.9 8 14 8L14 8ZM18 19L10 19 10 13 18 13 18 19 18 19Z" fillRule="evenodd"/>
[568] Fix | Delete
<path d="M14 18C14.6 18 15 17.6 15 17L15 15C15 14.4 14.6 14 14 14 13.4 14 13 14.4 13 15L13 15 13 17C13 17.6 13.4 18 14 18L14 18Z" fillRule="evenodd"/>
[569] Fix | Delete
</g>',
[570] Fix | Delete
);
[571] Fix | Delete
return $all_icons;
[572] Fix | Delete
}
[573] Fix | Delete
endif;
[574] Fix | Delete
[575] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_icon_list_items' ) ) :
[576] Fix | Delete
function et_pb_get_font_icon_list_items() {
[577] Fix | Delete
$output = '';
[578] Fix | Delete
[579] Fix | Delete
$symbols = et_pb_get_font_icon_symbols();
[580] Fix | Delete
[581] Fix | Delete
foreach ( $symbols as $symbol ) {
[582] Fix | Delete
$output .= sprintf( '<li data-icon=\'%1$s\'></li>', esc_attr( $symbol ) );
[583] Fix | Delete
}
[584] Fix | Delete
[585] Fix | Delete
return $output;
[586] Fix | Delete
}
[587] Fix | Delete
endif;
[588] Fix | Delete
[589] Fix | Delete
if ( ! function_exists( 'et_pb_font_icon_list' ) ) :
[590] Fix | Delete
function et_pb_font_icon_list() {
[591] Fix | Delete
echo et_core_esc_previously( et_pb_get_font_icon_list() );
[592] Fix | Delete
}
[593] Fix | Delete
endif;
[594] Fix | Delete
[595] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_down_icon_symbols' ) ) :
[596] Fix | Delete
function et_pb_get_font_down_icon_symbols() {
[597] Fix | Delete
$symbols = array( '&amp;#x22;', '&amp;#x33;', '&amp;#x37;', '&amp;#x3b;', '&amp;#x3f;', '&amp;#x43;', '&amp;#x47;', '&amp;#xe03a;', '&amp;#xe044;', '&amp;#xe048;', '&amp;#xe04c;' );
[598] Fix | Delete
[599] Fix | Delete
return $symbols;
[600] Fix | Delete
}
[601] Fix | Delete
endif;
[602] Fix | Delete
[603] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_down_icon_list' ) ) :
[604] Fix | Delete
function et_pb_get_font_down_icon_list() {
[605] Fix | Delete
$output = is_customize_preview() ? et_pb_get_font_down_icon_list_items() : '<%= window.et_builder.font_down_icon_list_template() %>';
[606] Fix | Delete
[607] Fix | Delete
$output = sprintf( '<ul class="et_font_icon">%1$s</ul>', et_core_esc_previously( $output ) );
[608] Fix | Delete
[609] Fix | Delete
return $output;
[610] Fix | Delete
}
[611] Fix | Delete
endif;
[612] Fix | Delete
[613] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_down_icon_list_items' ) ) :
[614] Fix | Delete
function et_pb_get_font_down_icon_list_items() {
[615] Fix | Delete
$output = '';
[616] Fix | Delete
[617] Fix | Delete
$symbols = et_pb_get_font_down_icon_symbols();
[618] Fix | Delete
[619] Fix | Delete
foreach ( $symbols as $symbol ) {
[620] Fix | Delete
$output .= sprintf( '<li data-icon="%1$s"></li>', esc_attr( $symbol ) );
[621] Fix | Delete
}
[622] Fix | Delete
[623] Fix | Delete
return $output;
[624] Fix | Delete
}
[625] Fix | Delete
endif;
[626] Fix | Delete
[627] Fix | Delete
if ( ! function_exists( 'et_pb_font_down_icon_list' ) ) :
[628] Fix | Delete
function et_pb_font_down_icon_list() {
[629] Fix | Delete
echo et_core_esc_previously( et_pb_get_font_down_icon_list() );
[630] Fix | Delete
}
[631] Fix | Delete
endif;
[632] Fix | Delete
[633] Fix | Delete
/**
[634] Fix | Delete
* Processes font icon value for use on front-end
[635] Fix | Delete
*
[636] Fix | Delete
* @param string $font_icon Font Icon ( exact value or in %%index_number%% format ).
[637] Fix | Delete
* @param string $symbols_function Optional. Name of the function that gets an array of font icon values.
[638] Fix | Delete
* et_pb_get_font_icon_symbols function is used by default.
[639] Fix | Delete
* @return string $font_icon Font Icon value
[640] Fix | Delete
*/
[641] Fix | Delete
if ( ! function_exists( 'et_pb_process_font_icon' ) ) :
[642] Fix | Delete
function et_pb_process_font_icon( $font_icon, $symbols_function = 'default' ) {
[643] Fix | Delete
// the exact font icon value is saved
[644] Fix | Delete
if ( 1 !== preg_match( "/^%%/", trim( $font_icon ) ) ) {
[645] Fix | Delete
return $font_icon;
[646] Fix | Delete
}
[647] Fix | Delete
[648] Fix | Delete
// the font icon value is saved in the following format: %%index_number%%
[649] Fix | Delete
$icon_index = (int) str_replace( '%', '', $font_icon );
[650] Fix | Delete
// @phpcs:ignore Generic.PHP.ForbiddenFunctions.Found
[651] Fix | Delete
$icon_symbols = 'default' === $symbols_function ? et_pb_get_font_icon_symbols() : call_user_func( $symbols_function );
[652] Fix | Delete
$font_icon = isset( $icon_symbols[ $icon_index ] ) ? $icon_symbols[ $icon_index ] : '';
[653] Fix | Delete
[654] Fix | Delete
return $font_icon;
[655] Fix | Delete
}
[656] Fix | Delete
endif;
[657] Fix | Delete
[658] Fix | Delete
if ( ! function_exists( 'et_builder_accent_color' ) ) :
[659] Fix | Delete
function et_builder_accent_color( $default_color = '#7EBEC5' ) {
[660] Fix | Delete
// Accent color option exists in Divi theme only. Use default color in plugin
[661] Fix | Delete
$accent_color = ! et_is_builder_plugin_active() ? et_get_option( 'accent_color', $default_color ) : $default_color;
[662] Fix | Delete
[663] Fix | Delete
return apply_filters( 'et_builder_accent_color', $accent_color );
[664] Fix | Delete
}
[665] Fix | Delete
endif;
[666] Fix | Delete
[667] Fix | Delete
if ( ! function_exists( 'et_pb_process_header_level' ) ) :
[668] Fix | Delete
function et_pb_process_header_level( $new_level, $default ) {
[669] Fix | Delete
$valid_header_levels = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' );
[670] Fix | Delete
[671] Fix | Delete
// return the new header level if exists in the list of valid header levels
[672] Fix | Delete
if ( in_array( $new_level, $valid_header_levels ) ) {
[673] Fix | Delete
return $new_level;
[674] Fix | Delete
}
[675] Fix | Delete
[676] Fix | Delete
// return default if defined. Fallback to h2 otherwise
[677] Fix | Delete
return isset( $default ) ? $default : 'h2';
[678] Fix | Delete
}
[679] Fix | Delete
endif;
[680] Fix | Delete
[681] Fix | Delete
if ( ! function_exists( 'et_pb_get_alignment' ) ) {
[682] Fix | Delete
function et_pb_get_alignment( $key ) {
[683] Fix | Delete
if ( is_rtl() && 'left' === $key ) {
[684] Fix | Delete
$key = 'right';
[685] Fix | Delete
}
[686] Fix | Delete
[687] Fix | Delete
switch ( $key ) {
[688] Fix | Delete
case 'force_left' :
[689] Fix | Delete
return 'left';
[690] Fix | Delete
break;
[691] Fix | Delete
case 'justified' :
[692] Fix | Delete
return 'justify';
[693] Fix | Delete
break;
[694] Fix | Delete
default :
[695] Fix | Delete
return $key;
[696] Fix | Delete
}
[697] Fix | Delete
}
[698] Fix | Delete
}
[699] Fix | Delete
[700] Fix | Delete
if ( ! function_exists( 'et_builder_get_text_orientation_options' ) ) :
[701] Fix | Delete
function et_builder_get_text_orientation_options( $exclude_options = array(), $include_options = array() ) {
[702] Fix | Delete
$text_orientation_options = array(
[703] Fix | Delete
'left' => et_builder_i18n( 'Left' ),
[704] Fix | Delete
'center' => et_builder_i18n( 'Center' ),
[705] Fix | Delete
'right' => et_builder_i18n( 'Right' ),
[706] Fix | Delete
'justified' => et_builder_i18n( 'Justified' ),
[707] Fix | Delete
);
[708] Fix | Delete
[709] Fix | Delete
if ( is_rtl() ) {
[710] Fix | Delete
$text_orientation_options = array(
[711] Fix | Delete
'right' => et_builder_i18n( 'Right' ),
[712] Fix | Delete
'center' => et_builder_i18n( 'Center' ),
[713] Fix | Delete
'force_left' => et_builder_i18n( 'Left' ),
[714] Fix | Delete
);
[715] Fix | Delete
}
[716] Fix | Delete
[717] Fix | Delete
// Exclude some options if needed
[718] Fix | Delete
if ( ! empty( $exclude_options ) ) {
[719] Fix | Delete
foreach ( $exclude_options as $exclude ) {
[720] Fix | Delete
unset( $text_orientation_options[ $exclude ] );
[721] Fix | Delete
}
[722] Fix | Delete
}
[723] Fix | Delete
[724] Fix | Delete
// Include some options if needed
[725] Fix | Delete
if ( ! empty( $include_options ) ) {
[726] Fix | Delete
$text_orientation_options = wp_parse_args( $include_options, $text_orientation_options );
[727] Fix | Delete
}
[728] Fix | Delete
[729] Fix | Delete
return apply_filters( 'et_builder_text_orientation_options', $text_orientation_options );
[730] Fix | Delete
}
[731] Fix | Delete
endif;
[732] Fix | Delete
[733] Fix | Delete
if ( ! function_exists( 'et_builder_get_gallery_settings' ) ) :
[734] Fix | Delete
function et_builder_get_gallery_settings() {
[735] Fix | Delete
$output = sprintf(
[736] Fix | Delete
'<input type="button" class="button button-upload et-pb-gallery-button" value="%1$s" />',
[737] Fix | Delete
esc_attr__( 'Update Gallery', 'et_builder' )
[738] Fix | Delete
);
[739] Fix | Delete
[740] Fix | Delete
return $output;
[741] Fix | Delete
}
[742] Fix | Delete
endif;
[743] Fix | Delete
[744] Fix | Delete
if ( ! function_exists( 'et_builder_get_nav_menus_options' ) ) :
[745] Fix | Delete
function et_builder_get_nav_menus_options() {
[746] Fix | Delete
$nav_menus_options = array( 'none' => esc_html__( 'Select a menu', 'et_builder' ) );
[747] Fix | Delete
[748] Fix | Delete
$nav_menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
[749] Fix | Delete
foreach ( (array) $nav_menus as $_nav_menu ) {
[750] Fix | Delete
$nav_menus_options[ $_nav_menu->term_id ] = $_nav_menu->name;
[751] Fix | Delete
}
[752] Fix | Delete
[753] Fix | Delete
return apply_filters( 'et_builder_nav_menus_options', $nav_menus_options );
[754] Fix | Delete
}
[755] Fix | Delete
endif;
[756] Fix | Delete
[757] Fix | Delete
if ( ! function_exists( 'et_builder_generate_center_map_setting' ) ) :
[758] Fix | Delete
function et_builder_generate_center_map_setting() {
[759] Fix | Delete
return '<div id="et_pb_map_center_map" class="et-pb-map et_pb_map_center_map"></div>';
[760] Fix | Delete
}
[761] Fix | Delete
endif;
[762] Fix | Delete
[763] Fix | Delete
if ( ! function_exists( 'et_builder_generate_pin_zoom_level_input' ) ) :
[764] Fix | Delete
function et_builder_generate_pin_zoom_level_input() {
[765] Fix | Delete
return '<input class="et_pb_zoom_level" type="hidden" value="18" />';
[766] Fix | Delete
}
[767] Fix | Delete
endif;
[768] Fix | Delete
[769] Fix | Delete
/**
[770] Fix | Delete
* Define conditional tags needed for component's backend parser. This is used for FB's public facing update
[771] Fix | Delete
* mechanism to pass conditional tag to admin-ajax.php for component which relies to backend parsing. Backend
[772] Fix | Delete
* uses this conditional tags' key as well for sanitization
[773] Fix | Delete
*
[774] Fix | Delete
* @return array
[775] Fix | Delete
*/
[776] Fix | Delete
function et_fb_conditional_tag_params() {
[777] Fix | Delete
global $post;
[778] Fix | Delete
[779] Fix | Delete
$post_type = isset( $post->post_type ) ? $post->post_type : false;
[780] Fix | Delete
[781] Fix | Delete
$conditional_tags = array(
[782] Fix | Delete
'is_limited_mode' => et_builder_is_limited_mode(),
[783] Fix | Delete
'is_bfb' => et_builder_bfb_enabled(),
[784] Fix | Delete
'is_bfb_activated' => et_builder_bfb_activated(),
[785] Fix | Delete
'is_tb' => et_builder_tb_enabled(),
[786] Fix | Delete
'is_front_page' => is_front_page(),
[787] Fix | Delete
'is_home_page' => is_home() || is_front_page(),
[788] Fix | Delete
'is_search' => is_search(),
[789] Fix | Delete
'is_single' => is_single(),
[790] Fix | Delete
'is_singular' => is_singular(),
[791] Fix | Delete
'is_singular_project' => is_singular( 'project' ),
[792] Fix | Delete
'is_rtl' => is_rtl(),
[793] Fix | Delete
'is_no_rtl' => 'on' === et_get_option( 'divi_disable_translations', 'off' ),
[794] Fix | Delete
'et_is_builder_plugin_active' => et_is_builder_plugin_active(),
[795] Fix | Delete
'is_user_logged_in' => is_user_logged_in(),
[796] Fix | Delete
'et_is_ab_testing_active' => et_is_ab_testing_active() ? 'yes' : 'no',
[797] Fix | Delete
'is_wrapped_styles' => et_builder_has_limitation( 'use_wrapped_styles' ),
[798] Fix | Delete
'is_gutenberg' => et_core_is_gutenberg_active(),
[799] Fix | Delete
'is_custom_post_type' => et_builder_is_post_type_custom( $post_type ),
[800] Fix | Delete
'is_layout_post_type' => et_theme_builder_is_layout_post_type( $post_type ),
[801] Fix | Delete
'is_rich_editor' => 'true' === apply_filters( 'user_can_richedit', get_user_option( 'rich_editing' ) ) ? 'yes' : 'no',
[802] Fix | Delete
[803] Fix | Delete
// Pass falsey as empty string so it remains falsey when conditionalTags is fetched and
[804] Fix | Delete
// passed string as AJAX payload (on AJAX string, false bool becomes 'false' string)
[805] Fix | Delete
'is_layout_block' => ET_GB_Block_Layout::is_layout_block_preview() ? true : '',
[806] Fix | Delete
);
[807] Fix | Delete
[808] Fix | Delete
return apply_filters( 'et_fb_conditional_tag_params', $conditional_tags );
[809] Fix | Delete
}
[810] Fix | Delete
[811] Fix | Delete
if ( ! function_exists( 'et_builder_page_creation_options' ) ) :
[812] Fix | Delete
/**
[813] Fix | Delete
* Get Page Creation flow options
[814] Fix | Delete
*
[815] Fix | Delete
* @since 4.2
[816] Fix | Delete
*
[817] Fix | Delete
* @return array
[818] Fix | Delete
*/
[819] Fix | Delete
function et_builder_page_creation_options() {
[820] Fix | Delete
return array(
[821] Fix | Delete
'build_from_scratch' => array(
[822] Fix | Delete
'className' => 'accent-blue',
[823] Fix | Delete
'imgSrc' => 'scratch.png',
[824] Fix | Delete
'imgSrcHover' => 'scratch.gif',
[825] Fix | Delete
'titleText' => esc_html__( 'Build From Scratch', 'et_builder' ),
[826] Fix | Delete
'descriptionText' => esc_html__( 'Build your page from the ground up. Don’t worry, you can access our premade layouts at any time.', 'et_builder' ),
[827] Fix | Delete
'buttonText' => esc_html__( 'Start Building', 'et_builder' ),
[828] Fix | Delete
'permission' => array( 'add_module' ),
[829] Fix | Delete
'setting' => array(
[830] Fix | Delete
'value_index' => 1,
[831] Fix | Delete
),
[832] Fix | Delete
),
[833] Fix | Delete
'use_existing_content' => array(
[834] Fix | Delete
'className' => 'accent-blue',
[835] Fix | Delete
'imgSrc' => 'existing.png',
[836] Fix | Delete
'imgSrcHover' => 'existing.gif',
[837] Fix | Delete
'titleText' => esc_html__( 'Use Existing Content', 'et_builder' ),
[838] Fix | Delete
'descriptionText' => esc_html__( 'Use the Divi Builder while retaining your existing page content.', 'et_builder' ),
[839] Fix | Delete
'buttonText' => esc_html__( 'Start Building', 'et_builder' ),
[840] Fix | Delete
'permission' => array( 'edit_module' ),
[841] Fix | Delete
'setting' => false,
[842] Fix | Delete
),
[843] Fix | Delete
'choose_premade_layout' => array(
[844] Fix | Delete
'className' => 'accent-purple',
[845] Fix | Delete
'imgSrc' => 'premade.png',
[846] Fix | Delete
'imgSrcHover' => 'premade.gif',
[847] Fix | Delete
'titleText' => esc_html__( 'Choose a premade Layout', 'et_builder' ),
[848] Fix | Delete
'descriptionText' => esc_html__( 'Choose from hundreds of world-class premade layouts or start from any of your existing saved layouts.', 'et_builder' ),
[849] Fix | Delete
'buttonText' => esc_html__( 'Browse Layouts', 'et_builder' ),
[850] Fix | Delete
'permission' => array( 'load_layout', 'divi_library' ),
[851] Fix | Delete
'setting' => array(
[852] Fix | Delete
'label' => esc_html__( 'Load Premade Layout', 'et_builder' ),
[853] Fix | Delete
'value_index' => 2,
[854] Fix | Delete
),
[855] Fix | Delete
),
[856] Fix | Delete
'clone_existing_page' => array(
[857] Fix | Delete
'className' => 'accent-green',
[858] Fix | Delete
'imgSrc' => 'clone.png',
[859] Fix | Delete
'imgSrcHover' => 'clone.gif',
[860] Fix | Delete
'titleText' => esc_html__( 'Clone Existing page', 'et_builder' ),
[861] Fix | Delete
'descriptionText' => esc_html__( 'Jump start your layout design by duplicating another page that you’ve already built.', 'et_builder' ),
[862] Fix | Delete
'buttonText' => esc_html__( 'Choose Page', 'et_builder' ),
[863] Fix | Delete
'permission' => array( 'load_layout', 'divi_library', 'edit_module' ),
[864] Fix | Delete
'setting' => array(
[865] Fix | Delete
'value_index' => 3,
[866] Fix | Delete
),
[867] Fix | Delete
),
[868] Fix | Delete
);
[869] Fix | Delete
}
[870] Fix | Delete
endif;
[871] Fix | Delete
[872] Fix | Delete
if ( ! function_exists( 'et_builder_page_creation_settings' ) ) :
[873] Fix | Delete
/**
[874] Fix | Delete
* Get Page Creation flow setting options
[875] Fix | Delete
*
[876] Fix | Delete
* @since 4.2
[877] Fix | Delete
*
[878] Fix | Delete
* @param bool $value_as_index Flag to set the options value as numeric index.
[879] Fix | Delete
*
[880] Fix | Delete
* @return array
[881] Fix | Delete
*/
[882] Fix | Delete
function et_builder_page_creation_settings( $value_as_index = false ) {
[883] Fix | Delete
$default_label = esc_html__( 'Give Me A Choice', 'et_builder' );
[884] Fix | Delete
[885] Fix | Delete
if ( $value_as_index ) {
[886] Fix | Delete
$settings = array(
[887] Fix | Delete
$default_label,
[888] Fix | Delete
);
[889] Fix | Delete
} else {
[890] Fix | Delete
$settings = array(
[891] Fix | Delete
'default' => $default_label,
[892] Fix | Delete
);
[893] Fix | Delete
}
[894] Fix | Delete
[895] Fix | Delete
foreach ( et_builder_page_creation_options() as $key => $option ) {
[896] Fix | Delete
if ( ! et_()->array_get( $option, 'setting' ) ) {
[897] Fix | Delete
continue;
[898] Fix | Delete
}
[899] Fix | Delete
[900] Fix | Delete
if ( isset( $option['permission'] ) ) {
[901] Fix | Delete
$capabilities = is_array( $option['permission'] ) ? $option['permission'] : explode( ',', $option['permission'] );
[902] Fix | Delete
$allowed = array_filter( $capabilities, 'et_pb_is_allowed' );
[903] Fix | Delete
[904] Fix | Delete
if ( ! $allowed || count( $capabilities ) !== count( $allowed ) ) {
[905] Fix | Delete
continue;
[906] Fix | Delete
}
[907] Fix | Delete
}
[908] Fix | Delete
[909] Fix | Delete
$value = $value_as_index ? $option['setting']['value_index'] : $key;
[910] Fix | Delete
$label = et_()->array_get( $option, 'setting.label', $option['titleText'] );
[911] Fix | Delete
[912] Fix | Delete
$settings[ $value ] = $label;
[913] Fix | Delete
}
[914] Fix | Delete
[915] Fix | Delete
return $settings;
[916] Fix | Delete
}
[917] Fix | Delete
endif;
[918] Fix | Delete
[919] Fix | Delete
function et_fb_app_preferences_settings() {
[920] Fix | Delete
$app_preferences = array(
[921] Fix | Delete
'settings_bar_location' => array(
[922] Fix | Delete
'type' => 'string',
[923] Fix | Delete
'default' => 'bottom',
[924] Fix | Delete
'options' => array(
[925] Fix | Delete
'top-left',
[926] Fix | Delete
'top',
[927] Fix | Delete
'top-right',
[928] Fix | Delete
'right',
[929] Fix | Delete
'bottom-right',
[930] Fix | Delete
'bottom',
[931] Fix | Delete
'bottom-left',
[932] Fix | Delete
'left',
[933] Fix | Delete
),
[934] Fix | Delete
),
[935] Fix | Delete
'builder_animation' => array(
[936] Fix | Delete
'type' => 'bool',
[937] Fix | Delete
'default' => true,
[938] Fix | Delete
),
[939] Fix | Delete
'builder_display_modal_settings' => array(
[940] Fix | Delete
'type' => 'bool',
[941] Fix | Delete
'default' => false,
[942] Fix | Delete
),
[943] Fix | Delete
'builder_enable_dummy_content' => array(
[944] Fix | Delete
'type' => 'bool',
[945] Fix | Delete
'default' => true,
[946] Fix | Delete
),
[947] Fix | Delete
'event_mode' => array(
[948] Fix | Delete
'type' => 'string',
[949] Fix | Delete
'default' => 'hover',
[950] Fix | Delete
'options' => array(
[951] Fix | Delete
'hover' => esc_html__( 'Hover Mode' , 'et_builder' ),
[952] Fix | Delete
'click' => esc_html__( 'Click Mode' , 'et_builder' ),
[953] Fix | Delete
'grid' => esc_html__( 'Grid Mode' , 'et_builder' ),
[954] Fix | Delete
),
[955] Fix | Delete
),
[956] Fix | Delete
'view_mode' => array(
[957] Fix | Delete
'type' => 'string',
[958] Fix | Delete
'default' => et_builder_bfb_enabled() ? 'wireframe' : 'desktop',
[959] Fix | Delete
'options' => array(
[960] Fix | Delete
'desktop' => esc_html__( 'Desktop View' , 'et_builder' ),
[961] Fix | Delete
'tablet' => esc_html__( 'Tablet View' , 'et_builder' ),
[962] Fix | Delete
'phone' => esc_html__( 'Phone View' , 'et_builder' ),
[963] Fix | Delete
'wireframe' => esc_html__( 'Wireframe View' , 'et_builder' ),
[964] Fix | Delete
),
[965] Fix | Delete
),
[966] Fix | Delete
'hide_disabled_modules' => array(
[967] Fix | Delete
'type' => 'bool',
[968] Fix | Delete
'default' => false,
[969] Fix | Delete
),
[970] Fix | Delete
'history_intervals' => array(
[971] Fix | Delete
'type' => 'int',
[972] Fix | Delete
'default' => 1,
[973] Fix | Delete
'options' => array(
[974] Fix | Delete
'1' => esc_html__( 'After Every Action' , 'et_builder' ),
[975] Fix | Delete
'10' => esc_html__( 'After Every 10th Action' , 'et_builder' ),
[976] Fix | Delete
'20' => esc_html__( 'After Every 20th Action' , 'et_builder' ),
[977] Fix | Delete
'30' => esc_html__( 'After Every 30th Action' , 'et_builder' ),
[978] Fix | Delete
'40' => esc_html__( 'After Every 40th Action' , 'et_builder' ),
[979] Fix | Delete
),
[980] Fix | Delete
),
[981] Fix | Delete
'page_creation_flow' => array(
[982] Fix | Delete
'type' => 'string',
[983] Fix | Delete
'default' => 'default',
[984] Fix | Delete
'options' => et_builder_page_creation_settings(),
[985] Fix | Delete
),
[986] Fix | Delete
'quick_actions_always_start_with' => array(
[987] Fix | Delete
'type' => 'string',
[988] Fix | Delete
'default' => 'nothing',
[989] Fix | Delete
),
[990] Fix | Delete
'quick_actions_show_recent_queries' => array(
[991] Fix | Delete
'type' => 'string',
[992] Fix | Delete
'default' => 'off',
[993] Fix | Delete
),
[994] Fix | Delete
'quick_actions_recent_queries' => array(
[995] Fix | Delete
'type' => 'string',
[996] Fix | Delete
'default' => '',
[997] Fix | Delete
'max_length' => 100,
[998] Fix | Delete
),
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function