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
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder
File: functions.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! defined( 'ET_BUILDER_PRODUCT_VERSION' ) ) {
[2] Fix | Delete
// Note, this will be updated automatically during grunt release task.
[3] Fix | Delete
define( 'ET_BUILDER_PRODUCT_VERSION', '4.5.3' );
[4] Fix | Delete
}
[5] Fix | Delete
[6] Fix | Delete
if ( ! defined( 'ET_BUILDER_VERSION' ) ) {
[7] Fix | Delete
define( 'ET_BUILDER_VERSION', 0.7 );
[8] Fix | Delete
}
[9] Fix | Delete
[10] Fix | Delete
if ( ! defined( 'ET_BUILDER_FORCE_CACHE_PURGE' ) ) {
[11] Fix | Delete
define( 'ET_BUILDER_FORCE_CACHE_PURGE', false );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
if ( ! defined( 'ET_BUILDER_DIR_RESOLVED_PATH' ) ) {
[15] Fix | Delete
define( 'ET_BUILDER_DIR_RESOLVED_PATH', dirname( __FILE__ ) );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
// When set to true, the builder will use the new loading method
[19] Fix | Delete
if ( ! defined( 'ET_BUILDER_CACHE_ASSETS' ) ) {
[20] Fix | Delete
define( 'ET_BUILDER_CACHE_ASSETS', ! isset( $_REQUEST['nocache'] ) );
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
if ( ! defined( 'ET_BUILDER_CACHE_MODULES' ) ) {
[24] Fix | Delete
define( 'ET_BUILDER_CACHE_MODULES', apply_filters( 'et_builder_cache_modules', true ) );
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
if ( ! defined( 'ET_BUILDER_JSON_ENCODE_OPTIONS' ) ) {
[28] Fix | Delete
define( 'ET_BUILDER_JSON_ENCODE_OPTIONS', 0 );
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
if ( ! defined( 'ET_BUILDER_KEEP_OLDEST_CACHED_ASSETS' ) ) {
[32] Fix | Delete
define( 'ET_BUILDER_KEEP_OLDEST_CACHED_ASSETS', false );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
if ( ! defined( 'ET_BUILDER_PURGE_OLD_CACHED_ASSETS' ) ) {
[36] Fix | Delete
define( 'ET_BUILDER_PURGE_OLD_CACHED_ASSETS', true );
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
if ( defined( 'ET_BUILDER_DEFINITION_SORT' ) && ET_BUILDER_DEFINITION_SORT ) {
[40] Fix | Delete
// You don't want to know and this isn't the function you're looking for.
[41] Fix | Delete
// Still reading ? Aight, this is only used to debug definitions.
[42] Fix | Delete
function et_builder_definition_sort( &$definitions ) {
[43] Fix | Delete
if ( ! is_array( $definitions ) ) {
[44] Fix | Delete
return;
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
$fields = array_keys( $definitions );
[48] Fix | Delete
$order = array(
[49] Fix | Delete
'label',
[50] Fix | Delete
'description',
[51] Fix | Delete
'option_category',
[52] Fix | Delete
'type',
[53] Fix | Delete
'data_type',
[54] Fix | Delete
'upload_button_text',
[55] Fix | Delete
);
[56] Fix | Delete
[57] Fix | Delete
foreach ( $fields as $field ) {
[58] Fix | Delete
$definition =& $definitions[ $field ];
[59] Fix | Delete
[60] Fix | Delete
if ( is_array( $definition ) ) {
[61] Fix | Delete
foreach ( $order as $key ) {
[62] Fix | Delete
if ( isset( $definition[ $key ] ) ) {
[63] Fix | Delete
$value = $definition[ $key ];
[64] Fix | Delete
unset( $definition[ $key ] );
[65] Fix | Delete
$definition[ $key ] = $value;
[66] Fix | Delete
}
[67] Fix | Delete
}
[68] Fix | Delete
et_builder_definition_sort( $definition );
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
$et_fonts_queue = array();
[75] Fix | Delete
[76] Fix | Delete
// exclude predefined layouts from import
[77] Fix | Delete
function et_remove_predefined_layouts_from_import( $posts ) {
[78] Fix | Delete
$processed_posts = $posts;
[79] Fix | Delete
[80] Fix | Delete
if ( isset( $posts ) && is_array( $posts ) ) {
[81] Fix | Delete
$processed_posts = array();
[82] Fix | Delete
[83] Fix | Delete
foreach ( $posts as $post ) {
[84] Fix | Delete
if ( isset( $post['postmeta'] ) && is_array( $post['postmeta'] ) ) {
[85] Fix | Delete
foreach ( $post['postmeta'] as $meta ) {
[86] Fix | Delete
if ( '_et_pb_predefined_layout' === $meta['key'] && 'on' === $meta['value'] )
[87] Fix | Delete
continue 2;
[88] Fix | Delete
}
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
$processed_posts[] = $post;
[92] Fix | Delete
}
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
return $processed_posts;
[96] Fix | Delete
}
[97] Fix | Delete
add_filter( 'wp_import_posts', 'et_remove_predefined_layouts_from_import', 5 );
[98] Fix | Delete
[99] Fix | Delete
[100] Fix | Delete
/**
[101] Fix | Delete
* Output all module fields JSON dump.
[102] Fix | Delete
* For dev use only.
[103] Fix | Delete
*
[104] Fix | Delete
* @return void
[105] Fix | Delete
*/
[106] Fix | Delete
// function et_dev_output_all_fields() {
[107] Fix | Delete
// die( json_encode( ET_Builder_Element::get_all_fields('page') ) );
[108] Fix | Delete
// }
[109] Fix | Delete
// add_action('wp', 'et_dev_output_all_fields', 100);
[110] Fix | Delete
[111] Fix | Delete
// set the layout_type taxonomy to "layout" for layouts imported from old version of Divi.
[112] Fix | Delete
function et_update_old_layouts_taxonomy( $posts ) {
[113] Fix | Delete
$processed_posts = $posts;
[114] Fix | Delete
[115] Fix | Delete
if ( isset( $posts ) && is_array( $posts ) ) {
[116] Fix | Delete
$processed_posts = array();
[117] Fix | Delete
[118] Fix | Delete
foreach ( $posts as $post ) {
[119] Fix | Delete
$update_built_for_post_type = false;
[120] Fix | Delete
[121] Fix | Delete
if ( 'et_pb_layout' === $post['post_type'] ) {
[122] Fix | Delete
if ( ! isset( $post['terms'] ) ) {
[123] Fix | Delete
$post['terms'][] = array(
[124] Fix | Delete
'name' => 'layout',
[125] Fix | Delete
'slug' => 'layout',
[126] Fix | Delete
'domain' => 'layout_type'
[127] Fix | Delete
);
[128] Fix | Delete
$post['terms'][] = array(
[129] Fix | Delete
'name' => 'not_global',
[130] Fix | Delete
'slug' => 'not_global',
[131] Fix | Delete
'domain' => 'scope'
[132] Fix | Delete
);
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
$update_built_for_post_type = true;
[136] Fix | Delete
[137] Fix | Delete
// check whether _et_pb_built_for_post_type custom field exists
[138] Fix | Delete
if ( ! empty( $post['postmeta'] ) ) {
[139] Fix | Delete
foreach ( $post['postmeta'] as $index => $value ) {
[140] Fix | Delete
if ( '_et_pb_built_for_post_type' === $value['key'] ) {
[141] Fix | Delete
$update_built_for_post_type = false;
[142] Fix | Delete
}
[143] Fix | Delete
}
[144] Fix | Delete
}
[145] Fix | Delete
}
[146] Fix | Delete
[147] Fix | Delete
// set _et_pb_built_for_post_type value to 'page' if not exists
[148] Fix | Delete
if ( $update_built_for_post_type ) {
[149] Fix | Delete
$post['postmeta'][] = array(
[150] Fix | Delete
'key' => '_et_pb_built_for_post_type',
[151] Fix | Delete
'value' => 'page',
[152] Fix | Delete
);
[153] Fix | Delete
}
[154] Fix | Delete
[155] Fix | Delete
$processed_posts[] = $post;
[156] Fix | Delete
}
[157] Fix | Delete
}
[158] Fix | Delete
[159] Fix | Delete
return $processed_posts;
[160] Fix | Delete
}
[161] Fix | Delete
add_filter( 'wp_import_posts', 'et_update_old_layouts_taxonomy', 10 );
[162] Fix | Delete
[163] Fix | Delete
// add custom filters for posts in the Divi Library
[164] Fix | Delete
if ( ! function_exists( 'et_pb_add_layout_filters' ) ) :
[165] Fix | Delete
function et_pb_add_layout_filters() {
[166] Fix | Delete
if ( isset( $_GET['post_type'] ) && 'et_pb_layout' === $_GET['post_type'] ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[167] Fix | Delete
$layout_categories = get_terms( 'layout_category' );
[168] Fix | Delete
$filter_category = array();
[169] Fix | Delete
$filter_category[''] = esc_html__( 'All Categories', 'et_builder' );
[170] Fix | Delete
[171] Fix | Delete
if ( is_array( $layout_categories ) && ! empty( $layout_categories ) ) {
[172] Fix | Delete
foreach( $layout_categories as $category ) {
[173] Fix | Delete
$filter_category[$category->slug] = $category->name;
[174] Fix | Delete
}
[175] Fix | Delete
}
[176] Fix | Delete
[177] Fix | Delete
$layout_packs = get_terms( 'layout_pack' );
[178] Fix | Delete
$filter_pack = array();
[179] Fix | Delete
$filter_pack[''] = esc_html_x( 'All Packs', 'Layout Packs', 'et_builder' );
[180] Fix | Delete
[181] Fix | Delete
if ( is_array( $layout_packs ) ) {
[182] Fix | Delete
foreach ( $layout_packs as $pack ) {
[183] Fix | Delete
$filter_pack[ $pack->slug ] = $pack->name;
[184] Fix | Delete
}
[185] Fix | Delete
}
[186] Fix | Delete
[187] Fix | Delete
$filter_layout_type = array(
[188] Fix | Delete
'' => esc_html__( 'All Types', 'et_builder' ),
[189] Fix | Delete
'module' => esc_html__( 'Modules', 'et_builder' ),
[190] Fix | Delete
'row' => esc_html__( 'Rows', 'et_builder' ),
[191] Fix | Delete
'section' => esc_html__( 'Sections', 'et_builder' ),
[192] Fix | Delete
'layout' => esc_html__( 'Layouts', 'et_builder' ),
[193] Fix | Delete
);
[194] Fix | Delete
[195] Fix | Delete
$filter_scope = array(
[196] Fix | Delete
'' => esc_html__( 'All Scopes', 'et_builder' ),
[197] Fix | Delete
'global' => esc_html__( 'Global', 'et_builder' ),
[198] Fix | Delete
'not_global' => esc_html__( 'Not Global', 'et_builder' )
[199] Fix | Delete
);
[200] Fix | Delete
?>
[201] Fix | Delete
[202] Fix | Delete
<select name="layout_type">
[203] Fix | Delete
<?php
[204] Fix | Delete
$selected = isset( $_GET['layout_type'] ) ? $_GET['layout_type'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[205] Fix | Delete
foreach ( $filter_layout_type as $value => $label ) {
[206] Fix | Delete
printf( '<option value="%1$s"%2$s>%3$s</option>',
[207] Fix | Delete
esc_attr( $value ),
[208] Fix | Delete
selected( $value, $selected ),
[209] Fix | Delete
esc_html( $label )
[210] Fix | Delete
);
[211] Fix | Delete
} ?>
[212] Fix | Delete
</select>
[213] Fix | Delete
[214] Fix | Delete
<select name="scope">
[215] Fix | Delete
<?php
[216] Fix | Delete
$selected = isset( $_GET['scope'] ) ? $_GET['scope'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[217] Fix | Delete
foreach ( $filter_scope as $value => $label ) {
[218] Fix | Delete
printf( '<option value="%1$s"%2$s>%3$s</option>',
[219] Fix | Delete
esc_attr( $value ),
[220] Fix | Delete
selected( $value, $selected ),
[221] Fix | Delete
esc_html( $label )
[222] Fix | Delete
);
[223] Fix | Delete
} ?>
[224] Fix | Delete
</select>
[225] Fix | Delete
[226] Fix | Delete
<select name="layout_category">
[227] Fix | Delete
<?php
[228] Fix | Delete
$selected = isset( $_GET['layout_category'] ) ? $_GET['layout_category'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[229] Fix | Delete
foreach ( $filter_category as $value => $label ) {
[230] Fix | Delete
printf( '<option value="%1$s"%2$s>%3$s</option>',
[231] Fix | Delete
esc_attr( $value ),
[232] Fix | Delete
selected( $value, $selected ),
[233] Fix | Delete
esc_html( $label )
[234] Fix | Delete
);
[235] Fix | Delete
} ?>
[236] Fix | Delete
</select>
[237] Fix | Delete
[238] Fix | Delete
<select name="layout_pack">
[239] Fix | Delete
<?php
[240] Fix | Delete
$selected = isset( $_GET['layout_pack'] ) ? $_GET['layout_pack'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[241] Fix | Delete
foreach ( $filter_pack as $value => $label ) {
[242] Fix | Delete
printf( '<option value="%1$s"%2$s>%3$s</option>',
[243] Fix | Delete
esc_attr( $value ),
[244] Fix | Delete
selected( $value, $selected ),
[245] Fix | Delete
esc_html( $label )
[246] Fix | Delete
);
[247] Fix | Delete
} ?>
[248] Fix | Delete
</select>
[249] Fix | Delete
<?php
[250] Fix | Delete
}
[251] Fix | Delete
}
[252] Fix | Delete
endif;
[253] Fix | Delete
add_action( 'restrict_manage_posts', 'et_pb_add_layout_filters' );
[254] Fix | Delete
[255] Fix | Delete
// Add "Export Divi Layouts" button to the Divi Library page
[256] Fix | Delete
if ( ! function_exists( 'et_pb_load_export_section' ) ) :
[257] Fix | Delete
function et_pb_load_export_section(){
[258] Fix | Delete
$current_screen = get_current_screen();
[259] Fix | Delete
[260] Fix | Delete
if ( 'edit-et_pb_layout' === $current_screen->id ) {
[261] Fix | Delete
// display wp error screen if library is disabled for current user
[262] Fix | Delete
if ( ! et_pb_is_allowed( 'divi_library' ) || ! et_pb_is_allowed( 'add_library' ) || ! et_pb_is_allowed( 'save_library' ) ) {
[263] Fix | Delete
wp_die( esc_html__( "you don't have sufficient permissions to access this page", 'et_builder' ) );
[264] Fix | Delete
}
[265] Fix | Delete
[266] Fix | Delete
add_action( 'all_admin_notices', 'et_pb_export_layouts_interface' );
[267] Fix | Delete
}
[268] Fix | Delete
}
[269] Fix | Delete
endif;
[270] Fix | Delete
add_action( 'load-edit.php', 'et_pb_load_export_section' );
[271] Fix | Delete
[272] Fix | Delete
if ( ! function_exists( 'et_pb_edit_library_categories' ) ) :
[273] Fix | Delete
function et_pb_edit_library_categories(){
[274] Fix | Delete
$current_screen = get_current_screen();
[275] Fix | Delete
[276] Fix | Delete
if ( 'edit-layout_category' === $current_screen->id || 'edit-layout_pack' === $current_screen->id ) {
[277] Fix | Delete
// display wp error screen if library is disabled for current user
[278] Fix | Delete
if ( ! et_pb_is_allowed( 'divi_library' ) || ! et_pb_is_allowed( 'add_library' ) || ! et_pb_is_allowed( 'save_library' ) ) {
[279] Fix | Delete
wp_die( esc_html__( "you don't have sufficient permissions to access this page", 'et_builder' ) );
[280] Fix | Delete
}
[281] Fix | Delete
[282] Fix | Delete
wp_enqueue_script( 'builder-library-category', ET_BUILDER_URI . '/scripts/library_category.js', array( 'jquery' ), ET_BUILDER_VERSION, true );
[283] Fix | Delete
}
[284] Fix | Delete
}
[285] Fix | Delete
endif;
[286] Fix | Delete
add_action( 'load-edit-tags.php', 'et_pb_edit_library_categories' );
[287] Fix | Delete
[288] Fix | Delete
// Check whether the library editor page should be displayed or not
[289] Fix | Delete
function et_pb_check_library_permissions(){
[290] Fix | Delete
$current_screen = get_current_screen();
[291] Fix | Delete
[292] Fix | Delete
if ( 'et_pb_layout' === $current_screen->id && ( ! et_pb_is_allowed( 'divi_library' ) || ! et_pb_is_allowed( 'save_library' ) ) ) {
[293] Fix | Delete
// display wp error screen if library is disabled for current user
[294] Fix | Delete
wp_die( esc_html__( "you don't have sufficient permissions to access this page", 'et_builder' ) );
[295] Fix | Delete
}
[296] Fix | Delete
}
[297] Fix | Delete
add_action( 'load-post.php', 'et_pb_check_library_permissions' );
[298] Fix | Delete
[299] Fix | Delete
// exclude premade layouts from the list of all templates in the library.
[300] Fix | Delete
if ( ! function_exists( 'exclude_premade_layouts_library' ) ) :
[301] Fix | Delete
function exclude_premade_layouts_library( $query ) {
[302] Fix | Delete
global $pagenow;
[303] Fix | Delete
$current_post_type = get_query_var( 'post_type' );
[304] Fix | Delete
[305] Fix | Delete
if ( is_admin() && 'edit.php' === $pagenow && $current_post_type && 'et_pb_layout' === $current_post_type ) {
[306] Fix | Delete
$meta_query = array(
[307] Fix | Delete
array(
[308] Fix | Delete
'key' => '_et_pb_predefined_layout',
[309] Fix | Delete
'value' => 'on',
[310] Fix | Delete
'compare' => 'NOT EXISTS',
[311] Fix | Delete
),
[312] Fix | Delete
);
[313] Fix | Delete
[314] Fix | Delete
$used_built_for_post_types = et_pb_get_used_built_for_post_types();
[315] Fix | Delete
if ( isset( $_GET['built_for'] ) && count( $used_built_for_post_types ) > 1 ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[316] Fix | Delete
$built_for_post_type = sanitize_text_field( $_GET['built_for'] );
[317] Fix | Delete
// get array of all standard post types if built_for is one of them
[318] Fix | Delete
$built_for_post_type_processed = in_array( $built_for_post_type, et_pb_get_standard_post_types() ) ? et_pb_get_standard_post_types() : $built_for_post_type;
[319] Fix | Delete
[320] Fix | Delete
if ( in_array( $built_for_post_type, $used_built_for_post_types ) ) {
[321] Fix | Delete
$meta_query[] = array(
[322] Fix | Delete
'key' => '_et_pb_built_for_post_type',
[323] Fix | Delete
'value' => $built_for_post_type_processed,
[324] Fix | Delete
'compare' => 'IN',
[325] Fix | Delete
);
[326] Fix | Delete
}
[327] Fix | Delete
}
[328] Fix | Delete
[329] Fix | Delete
$query->set( 'meta_query', $meta_query );
[330] Fix | Delete
}
[331] Fix | Delete
[332] Fix | Delete
return $query;
[333] Fix | Delete
}
[334] Fix | Delete
endif;
[335] Fix | Delete
add_action( 'pre_get_posts', 'exclude_premade_layouts_library' );
[336] Fix | Delete
[337] Fix | Delete
if ( ! function_exists( 'exclude_premade_layouts_library_count' ) ) :
[338] Fix | Delete
/**
[339] Fix | Delete
* Post count for "mine" in post table relies to fixed value set by WP_Posts_List_Table->user_posts_count
[340] Fix | Delete
* Thus, exclude_premade_layouts_library() action doesn't automatically exclude premade layout and
[341] Fix | Delete
* it has to be late filtered via this exclude_premade_layouts_library_count()
[342] Fix | Delete
*
[343] Fix | Delete
* @see WP_Posts_List_Table->user_posts_count to see how mine post value is retrieved
[344] Fix | Delete
*
[345] Fix | Delete
* @param array
[346] Fix | Delete
* @return array
[347] Fix | Delete
*/
[348] Fix | Delete
function exclude_premade_layouts_library_count( $views ) {
[349] Fix | Delete
if ( isset( $views['mine'] ) ) {
[350] Fix | Delete
$current_user_id = get_current_user_id();
[351] Fix | Delete
[352] Fix | Delete
if ( isset( $_GET['author'] ) && ( $_GET['author'] === $current_user_id ) ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
[353] Fix | Delete
$class = 'current';
[354] Fix | Delete
[355] Fix | Delete
// Reuse current $wp_query global
[356] Fix | Delete
global $wp_query;
[357] Fix | Delete
[358] Fix | Delete
$mine_posts_count = $wp_query->found_posts;
[359] Fix | Delete
} else {
[360] Fix | Delete
$class = '';
[361] Fix | Delete
[362] Fix | Delete
// Use WP_Query instead of plain MySQL SELECT because the custom field filtering uses
[363] Fix | Delete
// GROUP BY which needs FOUND_ROWS() and this has been automatically handled by WP_Query
[364] Fix | Delete
$query = new WP_Query( array(
[365] Fix | Delete
'post_type' => 'et_pb_layout',
[366] Fix | Delete
'author' => $current_user_id,
[367] Fix | Delete
'meta_query' => array(
[368] Fix | Delete
'key' => '_et_pb_predefined_layout',
[369] Fix | Delete
'value' => 'on',
[370] Fix | Delete
'compare' => 'NOT EXISTS',
[371] Fix | Delete
),
[372] Fix | Delete
) );
[373] Fix | Delete
[374] Fix | Delete
$mine_posts_count = $query->found_posts;
[375] Fix | Delete
}
[376] Fix | Delete
[377] Fix | Delete
$url = add_query_arg(
[378] Fix | Delete
array(
[379] Fix | Delete
'post_type' => 'et_pb_layout',
[380] Fix | Delete
'author' => $current_user_id,
[381] Fix | Delete
),
[382] Fix | Delete
'edit.php'
[383] Fix | Delete
);
[384] Fix | Delete
[385] Fix | Delete
$views['mine'] = sprintf(
[386] Fix | Delete
'<a href="%1$s" class="%2$s">%3$s <span class="count">(%4$s)</span></a>',
[387] Fix | Delete
esc_url( $url ),
[388] Fix | Delete
esc_attr( $class ),
[389] Fix | Delete
esc_html__( 'Mine', 'et_builder' ),
[390] Fix | Delete
esc_html( intval( $mine_posts_count ) )
[391] Fix | Delete
);
[392] Fix | Delete
}
[393] Fix | Delete
[394] Fix | Delete
return $views;
[395] Fix | Delete
}
[396] Fix | Delete
endif;
[397] Fix | Delete
add_filter( 'views_edit-et_pb_layout', 'exclude_premade_layouts_library_count' );
[398] Fix | Delete
[399] Fix | Delete
[400] Fix | Delete
if ( ! function_exists( 'et_pb_get_standard_post_types' ) ):
[401] Fix | Delete
/**
[402] Fix | Delete
* Returns the standard '_et_pb_built_for_post_type' post types.
[403] Fix | Delete
*
[404] Fix | Delete
* @deprecated {@see ET_Builder_Post_Type_Layout::get_built_for_post_types()}
[405] Fix | Delete
*
[406] Fix | Delete
* @since 3.1 Deprecated.
[407] Fix | Delete
* @since 1.8
[408] Fix | Delete
*
[409] Fix | Delete
* @return string[]
[410] Fix | Delete
*/
[411] Fix | Delete
function et_pb_get_standard_post_types() {
[412] Fix | Delete
return ET_Builder_Library::built_for_post_types();
[413] Fix | Delete
}
[414] Fix | Delete
endif;
[415] Fix | Delete
[416] Fix | Delete
if ( ! function_exists( 'et_pb_get_used_built_for_post_types' ) ):
[417] Fix | Delete
/**
[418] Fix | Delete
* Returns all current '_et_pb_built_for_post_type' post types.
[419] Fix | Delete
*
[420] Fix | Delete
* @deprecated {@see ET_Builder_Post_Type_Layout::get_built_for_post_types()}
[421] Fix | Delete
*
[422] Fix | Delete
* @since 3.1 Deprecated.
[423] Fix | Delete
* @since 1.8
[424] Fix | Delete
*
[425] Fix | Delete
* @return string[]
[426] Fix | Delete
*/
[427] Fix | Delete
function et_pb_get_used_built_for_post_types() {
[428] Fix | Delete
return ET_Builder_Library::built_for_post_types( 'all' );
[429] Fix | Delete
}
[430] Fix | Delete
endif;
[431] Fix | Delete
[432] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_icon_symbols' ) ) :
[433] Fix | Delete
function et_pb_get_font_icon_symbols() {
[434] Fix | Delete
$symbols = array( '&amp;#x21;', '&amp;#x22;', '&amp;#x23;', '&amp;#x24;', '&amp;#x25;', '&amp;#x26;', '&amp;#x27;', '&amp;#x28;', '&amp;#x29;', '&amp;#x2a;', '&amp;#x2b;', '&amp;#x2c;', '&amp;#x2d;', '&amp;#x2e;', '&amp;#x2f;', '&amp;#x30;', '&amp;#x31;', '&amp;#x32;', '&amp;#x33;', '&amp;#x34;', '&amp;#x35;', '&amp;#x36;', '&amp;#x37;', '&amp;#x38;', '&amp;#x39;', '&amp;#x3a;', '&amp;#x3b;', '&amp;#x3c;', '&amp;#x3d;', '&amp;#x3e;', '&amp;#x3f;', '&amp;#x40;', '&amp;#x41;', '&amp;#x42;', '&amp;#x43;', '&amp;#x44;', '&amp;#x45;', '&amp;#x46;', '&amp;#x47;', '&amp;#x48;', '&amp;#x49;', '&amp;#x4a;', '&amp;#x4b;', '&amp;#x4c;', '&amp;#x4d;', '&amp;#x4e;', '&amp;#x4f;', '&amp;#x50;', '&amp;#x51;', '&amp;#x52;', '&amp;#x53;', '&amp;#x54;', '&amp;#x55;', '&amp;#x56;', '&amp;#x57;', '&amp;#x58;', '&amp;#x59;', '&amp;#x5a;', '&amp;#x5b;', '&amp;#x5c;', '&amp;#x5d;', '&amp;#x5e;', '&amp;#x5f;', '&amp;#x60;', '&amp;#x61;', '&amp;#x62;', '&amp;#x63;', '&amp;#x64;', '&amp;#x65;', '&amp;#x66;', '&amp;#x67;', '&amp;#x68;', '&amp;#x69;', '&amp;#x6a;', '&amp;#x6b;', '&amp;#x6c;', '&amp;#x6d;', '&amp;#x6e;', '&amp;#x6f;', '&amp;#x70;', '&amp;#x71;', '&amp;#x72;', '&amp;#x73;', '&amp;#x74;', '&amp;#x75;', '&amp;#x76;', '&amp;#x77;', '&amp;#x78;', '&amp;#x79;', '&amp;#x7a;', '&amp;#x7b;', '&amp;#x7c;', '&amp;#x7d;', '&amp;#x7e;', '&amp;#xe000;', '&amp;#xe001;', '&amp;#xe002;', '&amp;#xe003;', '&amp;#xe004;', '&amp;#xe005;', '&amp;#xe006;', '&amp;#xe007;', '&amp;#xe009;', '&amp;#xe00a;', '&amp;#xe00b;', '&amp;#xe00c;', '&amp;#xe00d;', '&amp;#xe00e;', '&amp;#xe00f;', '&amp;#xe010;', '&amp;#xe011;', '&amp;#xe012;', '&amp;#xe013;', '&amp;#xe014;', '&amp;#xe015;', '&amp;#xe016;', '&amp;#xe017;', '&amp;#xe018;', '&amp;#xe019;', '&amp;#xe01a;', '&amp;#xe01b;', '&amp;#xe01c;', '&amp;#xe01d;', '&amp;#xe01e;', '&amp;#xe01f;', '&amp;#xe020;', '&amp;#xe021;', '&amp;#xe022;', '&amp;#xe023;', '&amp;#xe024;', '&amp;#xe025;', '&amp;#xe026;', '&amp;#xe027;', '&amp;#xe028;', '&amp;#xe029;', '&amp;#xe02a;', '&amp;#xe02b;', '&amp;#xe02c;', '&amp;#xe02d;', '&amp;#xe02e;', '&amp;#xe02f;', '&amp;#xe030;', '&amp;#xe103;', '&amp;#xe0ee;', '&amp;#xe0ef;', '&amp;#xe0e8;', '&amp;#xe0ea;', '&amp;#xe101;', '&amp;#xe107;', '&amp;#xe108;', '&amp;#xe102;', '&amp;#xe106;', '&amp;#xe0eb;', '&amp;#xe010;', '&amp;#xe105;', '&amp;#xe0ed;', '&amp;#xe100;', '&amp;#xe104;', '&amp;#xe0e9;', '&amp;#xe109;', '&amp;#xe0ec;', '&amp;#xe0fe;', '&amp;#xe0f6;', '&amp;#xe0fb;', '&amp;#xe0e2;', '&amp;#xe0e3;', '&amp;#xe0f5;', '&amp;#xe0e1;', '&amp;#xe0ff;', '&amp;#xe031;', '&amp;#xe032;', '&amp;#xe033;', '&amp;#xe034;', '&amp;#xe035;', '&amp;#xe036;', '&amp;#xe037;', '&amp;#xe038;', '&amp;#xe039;', '&amp;#xe03a;', '&amp;#xe03b;', '&amp;#xe03c;', '&amp;#xe03d;', '&amp;#xe03e;', '&amp;#xe03f;', '&amp;#xe040;', '&amp;#xe041;', '&amp;#xe042;', '&amp;#xe043;', '&amp;#xe044;', '&amp;#xe045;', '&amp;#xe046;', '&amp;#xe047;', '&amp;#xe048;', '&amp;#xe049;', '&amp;#xe04a;', '&amp;#xe04b;', '&amp;#xe04c;', '&amp;#xe04d;', '&amp;#xe04e;', '&amp;#xe04f;', '&amp;#xe050;', '&amp;#xe051;', '&amp;#xe052;', '&amp;#xe053;', '&amp;#xe054;', '&amp;#xe055;', '&amp;#xe056;', '&amp;#xe057;', '&amp;#xe058;', '&amp;#xe059;', '&amp;#xe05a;', '&amp;#xe05b;', '&amp;#xe05c;', '&amp;#xe05d;', '&amp;#xe05e;', '&amp;#xe05f;', '&amp;#xe060;', '&amp;#xe061;', '&amp;#xe062;', '&amp;#xe063;', '&amp;#xe064;', '&amp;#xe065;', '&amp;#xe066;', '&amp;#xe067;', '&amp;#xe068;', '&amp;#xe069;', '&amp;#xe06a;', '&amp;#xe06b;', '&amp;#xe06c;', '&amp;#xe06d;', '&amp;#xe06e;', '&amp;#xe06f;', '&amp;#xe070;', '&amp;#xe071;', '&amp;#xe072;', '&amp;#xe073;', '&amp;#xe074;', '&amp;#xe075;', '&amp;#xe076;', '&amp;#xe077;', '&amp;#xe078;', '&amp;#xe079;', '&amp;#xe07a;', '&amp;#xe07b;', '&amp;#xe07c;', '&amp;#xe07d;', '&amp;#xe07e;', '&amp;#xe07f;', '&amp;#xe080;', '&amp;#xe081;', '&amp;#xe082;', '&amp;#xe083;', '&amp;#xe084;', '&amp;#xe085;', '&amp;#xe086;', '&amp;#xe087;', '&amp;#xe088;', '&amp;#xe089;', '&amp;#xe08a;', '&amp;#xe08b;', '&amp;#xe08c;', '&amp;#xe08d;', '&amp;#xe08e;', '&amp;#xe08f;', '&amp;#xe090;', '&amp;#xe091;', '&amp;#xe092;', '&amp;#xe0f8;', '&amp;#xe0fa;', '&amp;#xe0e7;', '&amp;#xe0fd;', '&amp;#xe0e4;', '&amp;#xe0e5;', '&amp;#xe0f7;', '&amp;#xe0e0;', '&amp;#xe0fc;', '&amp;#xe0f9;', '&amp;#xe0dd;', '&amp;#xe0f1;', '&amp;#xe0dc;', '&amp;#xe0f3;', '&amp;#xe0d8;', '&amp;#xe0db;', '&amp;#xe0f0;', '&amp;#xe0df;', '&amp;#xe0f2;', '&amp;#xe0f4;', '&amp;#xe0d9;', '&amp;#xe0da;', '&amp;#xe0de;', '&amp;#xe0e6;', '&amp;#xe093;', '&amp;#xe094;', '&amp;#xe095;', '&amp;#xe096;', '&amp;#xe097;', '&amp;#xe098;', '&amp;#xe099;', '&amp;#xe09a;', '&amp;#xe09b;', '&amp;#xe09c;', '&amp;#xe09d;', '&amp;#xe09e;', '&amp;#xe09f;', '&amp;#xe0a0;', '&amp;#xe0a1;', '&amp;#xe0a2;', '&amp;#xe0a3;', '&amp;#xe0a4;', '&amp;#xe0a5;', '&amp;#xe0a6;', '&amp;#xe0a7;', '&amp;#xe0a8;', '&amp;#xe0a9;', '&amp;#xe0aa;', '&amp;#xe0ab;', '&amp;#xe0ac;', '&amp;#xe0ad;', '&amp;#xe0ae;', '&amp;#xe0af;', '&amp;#xe0b0;', '&amp;#xe0b1;', '&amp;#xe0b2;', '&amp;#xe0b3;', '&amp;#xe0b4;', '&amp;#xe0b5;', '&amp;#xe0b6;', '&amp;#xe0b7;', '&amp;#xe0b8;', '&amp;#xe0b9;', '&amp;#xe0ba;', '&amp;#xe0bb;', '&amp;#xe0bc;', '&amp;#xe0bd;', '&amp;#xe0be;', '&amp;#xe0bf;', '&amp;#xe0c0;', '&amp;#xe0c1;', '&amp;#xe0c2;', '&amp;#xe0c3;', '&amp;#xe0c4;', '&amp;#xe0c5;', '&amp;#xe0c6;', '&amp;#xe0c7;', '&amp;#xe0c8;', '&amp;#xe0c9;', '&amp;#xe0ca;', '&amp;#xe0cb;', '&amp;#xe0cc;', '&amp;#xe0cd;', '&amp;#xe0ce;', '&amp;#xe0cf;', '&amp;#xe0d0;', '&amp;#xe0d1;', '&amp;#xe0d2;', '&amp;#xe0d3;', '&amp;#xe0d4;', '&amp;#xe0d5;', '&amp;#xe0d6;', '&amp;#xe0d7;', '&amp;#xe600;', '&amp;#xe601;', '&amp;#xe602;', '&amp;#xe603;', '&amp;#xe604;', '&amp;#xe605;', '&amp;#xe606;', '&amp;#xe607;', '&amp;#xe608;', '&amp;#xe609;', '&amp;#xe60a;', '&amp;#xe60b;', '&amp;#xe60c;', '&amp;#xe60d;', '&amp;#xe60e;', '&amp;#xe60f;', '&amp;#xe610;', '&amp;#xe611;', '&amp;#xe612;', '&amp;#xe008;', );
[435] Fix | Delete
[436] Fix | Delete
$symbols = apply_filters( 'et_pb_font_icon_symbols', $symbols );
[437] Fix | Delete
[438] Fix | Delete
return $symbols;
[439] Fix | Delete
}
[440] Fix | Delete
endif;
[441] Fix | Delete
[442] Fix | Delete
if ( ! function_exists( 'et_pb_get_font_icon_list' ) ) :
[443] Fix | Delete
function et_pb_get_font_icon_list() {
[444] Fix | Delete
$output = is_customize_preview() ? et_pb_get_font_icon_list_items() : '<%= window.et_builder.font_icon_list_template() %>';
[445] Fix | Delete
[446] Fix | Delete
$output = sprintf( '<ul class="et_font_icon">%1$s</ul>', et_core_esc_previously( $output ) );
[447] Fix | Delete
[448] Fix | Delete
return $output;
[449] Fix | Delete
}
[450] Fix | Delete
endif;
[451] Fix | Delete
[452] Fix | Delete
if ( ! function_exists( 'et_pb_get_svg_icons_list' ) ) :
[453] Fix | Delete
function et_pb_get_svg_icons_list() {
[454] Fix | Delete
$all_icons = array(
[455] Fix | Delete
'add' =>
[456] Fix | Delete
'<g>
[457] Fix | Delete
<path d="M18 13h-3v-3a1 1 0 0 0-2 0v3h-3a1 1 0 0 0 0 2h3v3a1 1 0 0 0 2 0v-3h3a1 1 0 0 0 0-2z" fillRule="evenodd" />
[458] Fix | Delete
</g>',
[459] Fix | Delete
'delete' =>
[460] Fix | Delete
'<g>
[461] Fix | Delete
<path d="M19 9h-3V8a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v1H9a1 1 0 1 0 0 2h10a1 1 0 0 0 .004-2H19zM9 20c.021.543.457.979 1 1h8c.55-.004.996-.45 1-1v-7H9v7zm2.02-4.985h2v4h-2v-4zm4 0h2v4h-2v-4z" fillRule="evenodd" />
[462] Fix | Delete
</g>',
[463] Fix | Delete
'setting' =>
[464] Fix | Delete
'<g>
[465] Fix | Delete
<path d="M20.426 13.088l-1.383-.362a.874.874 0 0 1-.589-.514l-.043-.107a.871.871 0 0 1 .053-.779l.721-1.234a.766.766 0 0 0-.116-.917 6.682 6.682 0 0 0-.252-.253.768.768 0 0 0-.917-.116l-1.234.722a.877.877 0 0 1-.779.053l-.107-.044a.87.87 0 0 1-.513-.587l-.362-1.383a.767.767 0 0 0-.73-.567h-.358a.768.768 0 0 0-.73.567l-.362 1.383a.878.878 0 0 1-.513.589l-.107.044a.875.875 0 0 1-.778-.054l-1.234-.722a.769.769 0 0 0-.918.117c-.086.082-.17.166-.253.253a.766.766 0 0 0-.115.916l.721 1.234a.87.87 0 0 1 .053.779l-.043.106a.874.874 0 0 1-.589.514l-1.382.362a.766.766 0 0 0-.567.731v.357a.766.766 0 0 0 .567.731l1.383.362c.266.07.483.26.588.513l.043.107a.87.87 0 0 1-.053.779l-.721 1.233a.767.767 0 0 0 .115.917c.083.087.167.171.253.253a.77.77 0 0 0 .918.116l1.234-.721a.87.87 0 0 1 .779-.054l.107.044a.878.878 0 0 1 .513.589l.362 1.383a.77.77 0 0 0 .731.567h.356a.766.766 0 0 0 .73-.567l.362-1.383a.878.878 0 0 1 .515-.589l.107-.044a.875.875 0 0 1 .778.054l1.234.721c.297.17.672.123.917-.117.087-.082.171-.166.253-.253a.766.766 0 0 0 .116-.917l-.721-1.234a.874.874 0 0 1-.054-.779l.044-.107a.88.88 0 0 1 .589-.513l1.383-.362a.77.77 0 0 0 .567-.731v-.357a.772.772 0 0 0-.569-.724v-.005zm-6.43 3.9a2.986 2.986 0 1 1 2.985-2.986 3 3 0 0 1-2.985 2.987v-.001z" fillRule="evenodd" />
[466] Fix | Delete
</g>',
[467] Fix | Delete
'background-color' =>
[468] Fix | Delete
'<g>
[469] Fix | Delete
<path d="M19.4 14.6c0 0-1.5 3.1-1.5 4.4 0 0.9 0.7 1.6 1.5 1.6 0.8 0 1.5-0.7 1.5-1.6C20.9 17.6 19.4 14.6 19.4 14.6zM19.3 12.8l-4.8-4.8c-0.2-0.2-0.4-0.3-0.6-0.3 -0.3 0-0.5 0.1-0.7 0.3l-1.6 1.6L9.8 7.8c-0.4-0.4-1-0.4-1.4 0C8 8.1 8 8.8 8.4 9.1l1.8 1.8 -2.8 2.8c-0.4 0.4-0.4 1-0.1 1.4l4.6 4.6c0.2 0.2 0.4 0.3 0.6 0.3 0.3 0 0.5-0.1 0.7-0.3l6.1-6.1C19.5 13.4 19.5 13.1 19.3 12.8zM15.6 14.6c-1.7 1.7-4.5 1.7-6.2 0l2.1-2.1 1 1c0.4 0.4 1 0.4 1.4 0 0.4-0.4 0.4-1 0-1.4l-1-1 0.9-0.9 3.1 3.1L15.6 14.6z" fillRule="evenodd"/>
[470] Fix | Delete
</g>',
[471] Fix | Delete
'background-image' =>
[472] Fix | Delete
'<g>
[473] Fix | Delete
<path d="M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9H7v-10h14V18.9z" fillRule="evenodd"/>
[474] Fix | Delete
<circle cx="10.5" cy="12.4" r="1.5"/>
[475] Fix | Delete
<polygon points="15 16.9 13 13.9 11 16.9 "/>
[476] Fix | Delete
<polygon points="17 10.9 15 16.9 19 16.9 "/>
[477] Fix | Delete
</g>',
[478] Fix | Delete
'background-gradient' =>
[479] Fix | Delete
'<g>
[480] Fix | Delete
<path d="M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9L7 8.9h14V18.9z" fillRule="evenodd"/>
[481] Fix | Delete
</g>',
[482] Fix | Delete
'background-video' =>
[483] Fix | Delete
'<g>
[484] Fix | Delete
<path d="M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9H7v-10h14V18.9z" fillRule="evenodd"/>
[485] Fix | Delete
<polygon points="13 10.9 13 16.9 17 13.9 "/>
[486] Fix | Delete
</g>',
[487] Fix | Delete
'swap' =>
[488] Fix | Delete
'<g>
[489] Fix | Delete
<path d="M19 12h-3V9c0-0.5-0.5-1-1-1H8C7.5 8 7 8.5 7 9v7c0 0.5 0.5 1 1 1h3v3c0 0.5 0.5 1 1 1h7c0.5 0 1-0.5 1-1v-7C20 12.5 19.5 12 19 12zM18 19h-5v-2h2c0.5 0 1-0.5 1-1v-2h2V19z" fillRule="evenodd"/>
[490] Fix | Delete
</g>',
[491] Fix | Delete
'none' =>
[492] Fix | Delete
'<g>
[493] Fix | Delete
<path d="M14 24c5.5 0 10-4.5 10-10S19.5 4 14 4 4 8.5 4 14s4.5 10 10 10zm0-17.5c4.1 0 7.5 3.4 7.5 7.5 0 1.5-.5 2.9-1.2 4.1L9.9 7.7c1.2-.7 2.6-1.2 4.1-1.2zM7.7 9.9l10.4 10.4c-1.2.8-2.6 1.2-4.1 1.2-4.1 0-7.5-3.4-7.5-7.5 0-1.5.5-2.9 1.2-4.1z"/>
[494] Fix | Delete
</g>',
[495] Fix | Delete
'animation-none' =>
[496] Fix | Delete
'<g>
[497] Fix | Delete
<path d="M14 24c5.5 0 10-4.5 10-10S19.5 4 14 4 4 8.5 4 14s4.5 10 10 10zm0-17.5c4.1 0 7.5 3.4 7.5 7.5 0 1.5-.5 2.9-1.2 4.1L9.9 7.7c1.2-.7 2.6-1.2 4.1-1.2zM7.7 9.9l10.4 10.4c-1.2.8-2.6 1.2-4.1 1.2-4.1 0-7.5-3.4-7.5-7.5 0-1.5.5-2.9 1.2-4.1z"/>
[498] Fix | Delete
</g>',
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function