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: core.php
if ( ! function_exists( 'et_builder_email_maybe_migrate_accounts') ):
[2500] Fix | Delete
function et_builder_email_maybe_migrate_accounts() {
[2501] Fix | Delete
$divi_migrated_key = 'divi_email_provider_credentials_migrated';
[2502] Fix | Delete
$builder_migrated_key = 'email_provider_credentials_migrated';
[2503] Fix | Delete
[2504] Fix | Delete
$builder_options = (array) get_option( 'et_pb_builder_options' );
[2505] Fix | Delete
$builder_migrated = isset( $builder_options[ $builder_migrated_key ] );
[2506] Fix | Delete
$divi_migrated = false !== et_get_option( $divi_migrated_key, false );
[2507] Fix | Delete
[2508] Fix | Delete
$data_utils = ET_Core_Data_Utils::instance();
[2509] Fix | Delete
$migrations = array( 'builder' => $builder_migrated, 'divi' => $divi_migrated );
[2510] Fix | Delete
$providers = new ET_Core_API_Email_Providers(); // Ensure the email component group is loaded.
[2511] Fix | Delete
[2512] Fix | Delete
if ( $data_utils->all( $migrations, true ) ) {
[2513] Fix | Delete
// We've already migrated accounts data
[2514] Fix | Delete
return;
[2515] Fix | Delete
}
[2516] Fix | Delete
[2517] Fix | Delete
foreach ( $migrations as $product => $completed ) {
[2518] Fix | Delete
if ( 'builder' === $product ) {
[2519] Fix | Delete
$account_name = 'Divi Builder Plugin';
[2520] Fix | Delete
$mailchimp_api_key = isset( $builder_options['newsletter_main_mailchimp_key'] ) ? $builder_options['newsletter_main_mailchimp_key'] : '';
[2521] Fix | Delete
[2522] Fix | Delete
$consumer_key = isset( $builder_options['aweber_consumer_key'] ) ? $builder_options['aweber_consumer_key'] : '';
[2523] Fix | Delete
$consumer_secret = isset( $builder_options['aweber_consumer_secret'] ) ? $builder_options['aweber_consumer_secret'] : '';
[2524] Fix | Delete
$access_key = isset( $builder_options['aweber_access_key'] ) ? $builder_options['aweber_access_key'] : '';
[2525] Fix | Delete
$access_secret = isset( $builder_options['aweber_access_secret'] ) ? $builder_options['aweber_access_secret'] : '';
[2526] Fix | Delete
} else if ( 'divi' === $product ) {
[2527] Fix | Delete
$account_name = 'Divi Builder';
[2528] Fix | Delete
$mailchimp_api_key = et_get_option( 'divi_mailchimp_api_key' );
[2529] Fix | Delete
[2530] Fix | Delete
$consumer_key = et_get_option( 'divi_aweber_consumer_key' );
[2531] Fix | Delete
$consumer_secret = et_get_option( 'divi_aweber_consumer_secret' );
[2532] Fix | Delete
$access_key = et_get_option( 'divi_aweber_access_key' );
[2533] Fix | Delete
$access_secret = et_get_option( 'divi_aweber_access_secret' );
[2534] Fix | Delete
} else {
[2535] Fix | Delete
continue; // Satisfy code linter.
[2536] Fix | Delete
}
[2537] Fix | Delete
[2538] Fix | Delete
$aweber_key_parts = array( $consumer_key, $consumer_secret, $access_key, $access_secret );
[2539] Fix | Delete
[2540] Fix | Delete
if ( $data_utils->all( $aweber_key_parts ) ) {
[2541] Fix | Delete
// Typically AWeber tokens have five parts. We don't have the last part (the verifier token) because
[2542] Fix | Delete
// we didn't save it at the time it was originally input by the user. Thus, we add an additional separator
[2543] Fix | Delete
// (|) so that the token passes the processing performed by ET_Core_API_Email_Aweber::_parse_ID().
[2544] Fix | Delete
$aweber_api_key = implode( '|', array( $consumer_key, $consumer_secret, $access_key, $access_secret, '|' ) );
[2545] Fix | Delete
}
[2546] Fix | Delete
[2547] Fix | Delete
if ( ! empty( $mailchimp_api_key ) ) {
[2548] Fix | Delete
et_core_api_email_fetch_lists( 'MailChimp', "{$account_name} MailChimp", $mailchimp_api_key );
[2549] Fix | Delete
}
[2550] Fix | Delete
[2551] Fix | Delete
if ( ! empty( $aweber_api_key ) ) {
[2552] Fix | Delete
$aweber = $providers->get( 'Aweber', "{$account_name} Aweber", 'builder' );
[2553] Fix | Delete
[2554] Fix | Delete
$aweber->data['api_key'] = $aweber_api_key;
[2555] Fix | Delete
$aweber->data['consumer_key'] = $consumer_key;
[2556] Fix | Delete
$aweber->data['consumer_secret'] = $consumer_secret;
[2557] Fix | Delete
$aweber->data['access_key'] = $access_key;
[2558] Fix | Delete
$aweber->data['access_secret'] = $access_secret;
[2559] Fix | Delete
$aweber->data['is_authorized'] = true;
[2560] Fix | Delete
[2561] Fix | Delete
$aweber->save_data();
[2562] Fix | Delete
$aweber->fetch_subscriber_lists();
[2563] Fix | Delete
}
[2564] Fix | Delete
}
[2565] Fix | Delete
[2566] Fix | Delete
// Make sure the BB updates its cached templates
[2567] Fix | Delete
et_pb_force_regenerate_templates();
[2568] Fix | Delete
[2569] Fix | Delete
$builder_options[ $builder_migrated_key ] = true;
[2570] Fix | Delete
[2571] Fix | Delete
update_option( 'et_pb_builder_options', $builder_options );
[2572] Fix | Delete
et_update_option( $divi_migrated_key, true );
[2573] Fix | Delete
}
[2574] Fix | Delete
endif;
[2575] Fix | Delete
[2576] Fix | Delete
[2577] Fix | Delete
if ( ! function_exists( 'et_builder_email_remove_account' ) ):
[2578] Fix | Delete
/**
[2579] Fix | Delete
* Ajax handler for the Email Opt-in Module's "Remove Account" action.
[2580] Fix | Delete
*/
[2581] Fix | Delete
function et_builder_email_remove_account() {
[2582] Fix | Delete
et_core_security_check( 'manage_options', 'et_builder_email_remove_account_nonce' );
[2583] Fix | Delete
[2584] Fix | Delete
$provider_slug = sanitize_text_field( $_POST['et_provider'] );
[2585] Fix | Delete
$account_name = sanitize_text_field( $_POST['et_account'] );
[2586] Fix | Delete
[2587] Fix | Delete
if ( isset( $_POST['module_class'] ) && in_array( $_POST['module_class'], array( 'Signup', 'Contact_Form' ) ) ) {
[2588] Fix | Delete
$module_class = sanitize_text_field( $_POST['module_class'] );
[2589] Fix | Delete
} else {
[2590] Fix | Delete
$module_class = 'Signup';
[2591] Fix | Delete
}
[2592] Fix | Delete
[2593] Fix | Delete
$is_BB = isset( $_POST['et_bb'] );
[2594] Fix | Delete
$is_spam_account = isset( $_POST['is_spam_account'] );
[2595] Fix | Delete
[2596] Fix | Delete
if ( empty( $provider_slug ) || empty( $account_name ) ) {
[2597] Fix | Delete
et_core_die();
[2598] Fix | Delete
}
[2599] Fix | Delete
[2600] Fix | Delete
if ( $is_spam_account ) {
[2601] Fix | Delete
et_core_api_spam_remove_account( $provider_slug, $account_name );
[2602] Fix | Delete
[2603] Fix | Delete
} else {
[2604] Fix | Delete
et_core_api_email_remove_account( $provider_slug, $account_name );
[2605] Fix | Delete
}
[2606] Fix | Delete
[2607] Fix | Delete
$_ = ET_Core_Data_Utils::instance();
[2608] Fix | Delete
[2609] Fix | Delete
// Get data in builder format
[2610] Fix | Delete
$list_data = et_builder_email_get_lists_field_data( $provider_slug, $is_BB, $module_class );
[2611] Fix | Delete
[2612] Fix | Delete
$result = array(
[2613] Fix | Delete
'error' => false,
[2614] Fix | Delete
'accounts_list' => $_->array_get( $list_data, 'accounts_list', $list_data ),
[2615] Fix | Delete
'custom_fields' => $_->array_get( $list_data, 'custom_fields', array() ),
[2616] Fix | Delete
'predefined_custom_fields' => ET_Core_API_Email_Providers::instance()->custom_fields_data(),
[2617] Fix | Delete
);
[2618] Fix | Delete
[2619] Fix | Delete
die( wp_json_encode( $result ) );
[2620] Fix | Delete
}
[2621] Fix | Delete
add_action( 'wp_ajax_et_builder_email_remove_account', 'et_builder_email_remove_account' );
[2622] Fix | Delete
endif;
[2623] Fix | Delete
[2624] Fix | Delete
[2625] Fix | Delete
if ( ! function_exists( 'et_pb_submit_subscribe_form' ) ):
[2626] Fix | Delete
/**
[2627] Fix | Delete
* Ajax handler for Email Opt-in Module form submissions.
[2628] Fix | Delete
*/
[2629] Fix | Delete
function et_pb_submit_subscribe_form() {
[2630] Fix | Delete
et_core_security_check( '', 'et_frontend_nonce' );
[2631] Fix | Delete
[2632] Fix | Delete
$providers = ET_Core_API_Email_Providers::instance();
[2633] Fix | Delete
$utils = ET_Core_Data_Utils::instance();
[2634] Fix | Delete
[2635] Fix | Delete
$checksum = $utils->array_get_sanitized( $_POST, 'et_checksum' );
[2636] Fix | Delete
$use_spam_service = get_option( 'et_pb_signup_' . $checksum );
[2637] Fix | Delete
[2638] Fix | Delete
$provider_slug = $utils->array_get_sanitized( $_POST, 'et_provider' );
[2639] Fix | Delete
$account_name = $utils->array_get_sanitized( $_POST, 'et_account' );
[2640] Fix | Delete
$custom_fields = $utils->array_get( $_POST, 'et_custom_fields', array() );
[2641] Fix | Delete
$provider = $providers->get( $provider_slug, $account_name, 'builder' );
[2642] Fix | Delete
[2643] Fix | Delete
if ( ! $provider || ! $use_spam_service ) {
[2644] Fix | Delete
et_core_die( esc_html__( 'Configuration Error: Invalid data.', 'et_builder' ) );
[2645] Fix | Delete
}
[2646] Fix | Delete
[2647] Fix | Delete
$args = array(
[2648] Fix | Delete
'list_id' => $utils->array_get_sanitized( $_POST, 'et_list_id' ),
[2649] Fix | Delete
'email' => $utils->array_get_sanitized( $_POST, 'et_email' ),
[2650] Fix | Delete
'name' => $utils->array_get_sanitized( $_POST, 'et_firstname' ),
[2651] Fix | Delete
'last_name' => $utils->array_get_sanitized( $_POST, 'et_lastname' ),
[2652] Fix | Delete
'ip_address' => $utils->array_get_sanitized( $_POST, 'et_ip_address' ),
[2653] Fix | Delete
'custom_fields' => $utils->sanitize_text_fields( $custom_fields ),
[2654] Fix | Delete
);
[2655] Fix | Delete
[2656] Fix | Delete
if ( ! is_email( $args['email'] ) ) {
[2657] Fix | Delete
et_core_die( esc_html__( 'Please input a valid email address.', 'et_builder' ) );
[2658] Fix | Delete
}
[2659] Fix | Delete
[2660] Fix | Delete
if ( '' === (string) $args['list_id'] ) {
[2661] Fix | Delete
et_core_die( esc_html__( 'Configuration Error: No list has been selected for this form.', 'et_builder' ) );
[2662] Fix | Delete
}
[2663] Fix | Delete
[2664] Fix | Delete
$signup = ET_Builder_Element::get_module( 'et_pb_signup' );
[2665] Fix | Delete
[2666] Fix | Delete
if ( $signup && 'on' === $use_spam_service && $signup->is_spam_submission() ) {
[2667] Fix | Delete
et_core_die( esc_html__( 'You must be a human to submit this form.', 'et_builder' ) );
[2668] Fix | Delete
}
[2669] Fix | Delete
[2670] Fix | Delete
et_builder_email_maybe_migrate_accounts();
[2671] Fix | Delete
[2672] Fix | Delete
$result = $provider->subscribe( $args );
[2673] Fix | Delete
[2674] Fix | Delete
if ( 'success' === $result ) {
[2675] Fix | Delete
$result = array( 'success' => true );
[2676] Fix | Delete
} else {
[2677] Fix | Delete
$message = esc_html__( 'Subscription Error: ', 'et_builder' );
[2678] Fix | Delete
$result = array( 'error' => $message . $result );
[2679] Fix | Delete
}
[2680] Fix | Delete
[2681] Fix | Delete
die( wp_json_encode( $result ) );
[2682] Fix | Delete
}
[2683] Fix | Delete
add_action( 'wp_ajax_et_pb_submit_subscribe_form', 'et_pb_submit_subscribe_form' );
[2684] Fix | Delete
add_action( 'wp_ajax_nopriv_et_pb_submit_subscribe_form', 'et_pb_submit_subscribe_form' );
[2685] Fix | Delete
endif;
[2686] Fix | Delete
[2687] Fix | Delete
[2688] Fix | Delete
if ( ! function_exists( 'et_builder_has_limitation' ) ):
[2689] Fix | Delete
/**
[2690] Fix | Delete
* Whether or not the builder currently has a certain limitation.
[2691] Fix | Delete
*
[2692] Fix | Delete
* @since 3.18
[2693] Fix | Delete
*
[2694] Fix | Delete
* @return bool
[2695] Fix | Delete
*/
[2696] Fix | Delete
function et_builder_has_limitation( $limit ) {
[2697] Fix | Delete
if ( 'use_wrapped_styles' === $limit && et_builder_is_post_type_custom( get_post_type() ) ) {
[2698] Fix | Delete
return true;
[2699] Fix | Delete
}
[2700] Fix | Delete
[2701] Fix | Delete
if ( ! et_builder_is_limited_mode() ) {
[2702] Fix | Delete
return false;
[2703] Fix | Delete
}
[2704] Fix | Delete
[2705] Fix | Delete
$limited_builder = et_get_limited_builder();
[2706] Fix | Delete
$limited_builder_limits = et_get_limited_builder_defaults();
[2707] Fix | Delete
[2708] Fix | Delete
switch ( $limited_builder ) {
[2709] Fix | Delete
case 'divi-builder-plugin':
[2710] Fix | Delete
$limited_builder_limits = array_merge( $limited_builder_limits, array(
[2711] Fix | Delete
'use_wrapped_styles',
[2712] Fix | Delete
'force_use_global_important',
[2713] Fix | Delete
'use_limited_main',
[2714] Fix | Delete
'use_additional_limiting_styles',
[2715] Fix | Delete
'forced_icon_color_default',
[2716] Fix | Delete
'register_fittext_script',
[2717] Fix | Delete
) );
[2718] Fix | Delete
break;
[2719] Fix | Delete
}
[2720] Fix | Delete
[2721] Fix | Delete
return in_array( $limit, $limited_builder_limits );
[2722] Fix | Delete
}
[2723] Fix | Delete
endif;
[2724] Fix | Delete
[2725] Fix | Delete
/**
[2726] Fix | Delete
* Get the defaults for limited builder limitations.
[2727] Fix | Delete
*
[2728] Fix | Delete
* @since 3.18
[2729] Fix | Delete
*
[2730] Fix | Delete
* @return string[]
[2731] Fix | Delete
*/
[2732] Fix | Delete
function et_get_limited_builder_defaults() {
[2733] Fix | Delete
return apply_filters( 'et_builder_get_limited_builder_defaults', array(
[2734] Fix | Delete
'force_enqueue_theme_style',
[2735] Fix | Delete
) );
[2736] Fix | Delete
}
[2737] Fix | Delete
[2738] Fix | Delete
[2739] Fix | Delete
/**
[2740] Fix | Delete
* Get the slug name of the current limited builder.
[2741] Fix | Delete
*
[2742] Fix | Delete
* @since 3.18
[2743] Fix | Delete
*
[2744] Fix | Delete
* @return string The slug name of the current limited builder.
[2745] Fix | Delete
*/
[2746] Fix | Delete
function et_get_limited_builder() {
[2747] Fix | Delete
$get = $_GET;
[2748] Fix | Delete
$bfb = '1' === et_()->array_get( $get, 'et_bfb', '0' );
[2749] Fix | Delete
$dbp = et_is_builder_plugin_active();
[2750] Fix | Delete
[2751] Fix | Delete
if ( $dbp ) {
[2752] Fix | Delete
return 'divi-builder-plugin';
[2753] Fix | Delete
}
[2754] Fix | Delete
[2755] Fix | Delete
if ( $bfb ) {
[2756] Fix | Delete
return 'bfb';
[2757] Fix | Delete
}
[2758] Fix | Delete
[2759] Fix | Delete
return '';
[2760] Fix | Delete
}
[2761] Fix | Delete
[2762] Fix | Delete
[2763] Fix | Delete
if ( ! function_exists( 'et_builder_is_limited_mode' ) ):
[2764] Fix | Delete
/**
[2765] Fix | Delete
* Is Builder in limited mode?
[2766] Fix | Delete
*
[2767] Fix | Delete
* @since 3.18
[2768] Fix | Delete
*
[2769] Fix | Delete
* @return bool True - if the builder is in limited mode.
[2770] Fix | Delete
*/
[2771] Fix | Delete
function et_builder_is_limited_mode() {
[2772] Fix | Delete
$get = $_GET;
[2773] Fix | Delete
[2774] Fix | Delete
return '' !== et_get_limited_builder();
[2775] Fix | Delete
}
[2776] Fix | Delete
endif;
[2777] Fix | Delete
[2778] Fix | Delete
if ( ! function_exists( 'et_is_builder_plugin_active' ) ):
[2779] Fix | Delete
/**
[2780] Fix | Delete
* Is Builder plugin active?
[2781] Fix | Delete
*
[2782] Fix | Delete
* @since 3.18
[2783] Fix | Delete
* @deprecated ??
[2784] Fix | Delete
*
[2785] Fix | Delete
* @return bool True - if the plugin is active.
[2786] Fix | Delete
*/
[2787] Fix | Delete
function et_is_builder_plugin_active() {
[2788] Fix | Delete
return (bool) defined( 'ET_BUILDER_PLUGIN_ACTIVE' );
[2789] Fix | Delete
}
[2790] Fix | Delete
endif;
[2791] Fix | Delete
[2792] Fix | Delete
if ( ! function_exists( 'et_is_shortcodes_plugin_active' ) ):
[2793] Fix | Delete
/**
[2794] Fix | Delete
* Is ET Shortcodes plugin active?
[2795] Fix | Delete
*
[2796] Fix | Delete
* @return bool True - if the plugin is active
[2797] Fix | Delete
*/
[2798] Fix | Delete
function et_is_shortcodes_plugin_active() {
[2799] Fix | Delete
return (bool) defined( 'ET_SHORTCODES_PLUGIN_VERSION' );
[2800] Fix | Delete
}
[2801] Fix | Delete
endif;
[2802] Fix | Delete
[2803] Fix | Delete
/**
[2804] Fix | Delete
* Saves the Role Settings into WP database
[2805] Fix | Delete
* @return void
[2806] Fix | Delete
*/
[2807] Fix | Delete
function et_pb_save_role_settings() {
[2808] Fix | Delete
if ( ! wp_verify_nonce( $_POST['et_pb_save_roles_nonce'] , 'et_roles_nonce' ) ) {
[2809] Fix | Delete
die( -1 );
[2810] Fix | Delete
}
[2811] Fix | Delete
[2812] Fix | Delete
if ( ! current_user_can( 'manage_options' ) ) {
[2813] Fix | Delete
die( -1 );
[2814] Fix | Delete
}
[2815] Fix | Delete
[2816] Fix | Delete
// handle received data and convert json string to array
[2817] Fix | Delete
$data_json = str_replace( '\\', '' , $_POST['et_pb_options_all'] );
[2818] Fix | Delete
$data = json_decode( $data_json, true );
[2819] Fix | Delete
$processed_options = array();
[2820] Fix | Delete
[2821] Fix | Delete
// convert settings string for each role into array and save it into et_pb_role_settings option
[2822] Fix | Delete
if ( ! empty( $data ) ) {
[2823] Fix | Delete
$role_capabilities = array();
[2824] Fix | Delete
foreach( $data as $role => $settings ) {
[2825] Fix | Delete
parse_str( $data[ $role ], $role_capabilities );
[2826] Fix | Delete
foreach ( $role_capabilities as $capability => $value ) {
[2827] Fix | Delete
$processed_options[ $role ][ $capability ] = $value;
[2828] Fix | Delete
}
[2829] Fix | Delete
}
[2830] Fix | Delete
}
[2831] Fix | Delete
[2832] Fix | Delete
update_option( 'et_pb_role_settings', $processed_options );
[2833] Fix | Delete
// set the flag to reload backbone templates and make sure all the role settings applied correctly right away
[2834] Fix | Delete
et_update_option( 'et_pb_clear_templates_cache', true );
[2835] Fix | Delete
[2836] Fix | Delete
// Delete cached definitions / helpers
[2837] Fix | Delete
et_fb_delete_builder_assets();
[2838] Fix | Delete
[2839] Fix | Delete
die();
[2840] Fix | Delete
}
[2841] Fix | Delete
add_action( 'wp_ajax_et_pb_save_role_settings', 'et_pb_save_role_settings' );
[2842] Fix | Delete
[2843] Fix | Delete
/**
[2844] Fix | Delete
* Filter callback to determine what shortcodes tags are to be removed.
[2845] Fix | Delete
* Stips all non-builder shortcodes.
[2846] Fix | Delete
*
[2847] Fix | Delete
* @see strip_shortcodes_tagnames
[2848] Fix | Delete
*
[2849] Fix | Delete
* @param array $tags_to_remove An array of tags to be removed during strip_shortcodes() call.
[2850] Fix | Delete
*
[2851] Fix | Delete
* @return array An array of tags to be removed during strip_shortcodes() call.
[2852] Fix | Delete
*/
[2853] Fix | Delete
function et_pb_strip_non_builder_shortcodes_tagnames( $tags_to_remove ) {
[2854] Fix | Delete
// Initial allowlist
[2855] Fix | Delete
$valid_tags = ET_Builder_Element::get_module_slugs_by_post_type();
[2856] Fix | Delete
[2857] Fix | Delete
/**
[2858] Fix | Delete
* What shortcode tags are valid (and safe) builder shortcodes,
[2859] Fix | Delete
* all other shortcodes will be stripped.
[2860] Fix | Delete
*
[2861] Fix | Delete
* @param array $valid_tags Array of valid shortcode tags.
[2862] Fix | Delete
*/
[2863] Fix | Delete
$valid_tags = apply_filters( 'et_pb_valid_builder_shortcodes', $valid_tags );
[2864] Fix | Delete
[2865] Fix | Delete
// Generate a blocklist, by subtracting the allowlist from all registered shortcodes.
[2866] Fix | Delete
$tags_to_remove = array_diff( $tags_to_remove, $valid_tags );
[2867] Fix | Delete
[2868] Fix | Delete
return $tags_to_remove;
[2869] Fix | Delete
}
[2870] Fix | Delete
[2871] Fix | Delete
/**
[2872] Fix | Delete
* Is Yoast SEO plugin active?
[2873] Fix | Delete
*
[2874] Fix | Delete
* @return bool True - if the plugin is active
[2875] Fix | Delete
*/
[2876] Fix | Delete
if ( ! function_exists( 'et_is_yoast_seo_plugin_active' ) ) :
[2877] Fix | Delete
function et_is_yoast_seo_plugin_active() {
[2878] Fix | Delete
return class_exists( 'WPSEO_Options' );
[2879] Fix | Delete
}
[2880] Fix | Delete
endif;
[2881] Fix | Delete
[2882] Fix | Delete
/**
[2883] Fix | Delete
* Remove all non-builder shortcodes from builder built post content.
[2884] Fix | Delete
*
[2885] Fix | Delete
* @param string $content Builder built post content.
[2886] Fix | Delete
*
[2887] Fix | Delete
* @return string Sanitized builder built post content.
[2888] Fix | Delete
*/
[2889] Fix | Delete
function et_pb_enforce_builder_shortcode( $content ) {
[2890] Fix | Delete
add_filter( 'strip_shortcodes_tagnames', 'et_pb_strip_non_builder_shortcodes_tagnames' );
[2891] Fix | Delete
[2892] Fix | Delete
$content = strip_shortcodes( $content );
[2893] Fix | Delete
[2894] Fix | Delete
remove_filter( 'strip_shortcodes_tagnames', 'et_pb_strip_non_builder_shortcodes_tagnames' );
[2895] Fix | Delete
[2896] Fix | Delete
// this will parse the shortcode to an array, then run it back through some sanity check and sanitization and reform into a shortcode again.
[2897] Fix | Delete
$content = et_pb_sanitize_shortcode( $content, true );
[2898] Fix | Delete
[2899] Fix | Delete
return $content;
[2900] Fix | Delete
}
[2901] Fix | Delete
[2902] Fix | Delete
if ( ! function_exists( 'et_pb_register_posttypes' ) ) :
[2903] Fix | Delete
function et_pb_register_posttypes() {
[2904] Fix | Delete
$labels = array(
[2905] Fix | Delete
'name' => esc_html__( 'Projects', 'et_builder' ),
[2906] Fix | Delete
'singular_name' => esc_html__( 'Project', 'et_builder' ),
[2907] Fix | Delete
'add_new' => esc_html__( 'Add New', 'et_builder' ),
[2908] Fix | Delete
'add_new_item' => esc_html__( 'Add New Project', 'et_builder' ),
[2909] Fix | Delete
'edit_item' => esc_html__( 'Edit Project', 'et_builder' ),
[2910] Fix | Delete
'new_item' => esc_html__( 'New Project', 'et_builder' ),
[2911] Fix | Delete
'all_items' => esc_html__( 'All Projects', 'et_builder' ),
[2912] Fix | Delete
'view_item' => esc_html__( 'View Project', 'et_builder' ),
[2913] Fix | Delete
'search_items' => esc_html__( 'Search Projects', 'et_builder' ),
[2914] Fix | Delete
'not_found' => esc_html__( 'Nothing found', 'et_builder' ),
[2915] Fix | Delete
'not_found_in_trash' => esc_html__( 'Nothing found in Trash', 'et_builder' ),
[2916] Fix | Delete
'parent_item_colon' => '',
[2917] Fix | Delete
);
[2918] Fix | Delete
[2919] Fix | Delete
$args = array(
[2920] Fix | Delete
'labels' => $labels,
[2921] Fix | Delete
'public' => true,
[2922] Fix | Delete
'publicly_queryable' => true,
[2923] Fix | Delete
'show_ui' => true,
[2924] Fix | Delete
'can_export' => true,
[2925] Fix | Delete
'show_in_nav_menus' => true,
[2926] Fix | Delete
'query_var' => true,
[2927] Fix | Delete
'has_archive' => true,
[2928] Fix | Delete
'rewrite' => apply_filters( 'et_project_posttype_rewrite_args', array(
[2929] Fix | Delete
'feeds' => true,
[2930] Fix | Delete
'slug' => 'project',
[2931] Fix | Delete
'with_front' => false,
[2932] Fix | Delete
) ),
[2933] Fix | Delete
'capability_type' => 'post',
[2934] Fix | Delete
'hierarchical' => false,
[2935] Fix | Delete
'menu_position' => null,
[2936] Fix | Delete
'show_in_rest' => true,
[2937] Fix | Delete
'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'excerpt', 'comments', 'revisions', 'custom-fields' ),
[2938] Fix | Delete
);
[2939] Fix | Delete
[2940] Fix | Delete
register_post_type( 'project', apply_filters( 'et_project_posttype_args', $args ) );
[2941] Fix | Delete
[2942] Fix | Delete
$labels = array(
[2943] Fix | Delete
'name' => esc_html__( 'Project Categories', 'et_builder' ),
[2944] Fix | Delete
'singular_name' => esc_html__( 'Project Category', 'et_builder' ),
[2945] Fix | Delete
'search_items' => esc_html__( 'Search Categories', 'et_builder' ),
[2946] Fix | Delete
'all_items' => esc_html__( 'All Categories', 'et_builder' ),
[2947] Fix | Delete
'parent_item' => esc_html__( 'Parent Category', 'et_builder' ),
[2948] Fix | Delete
'parent_item_colon' => esc_html__( 'Parent Category:', 'et_builder' ),
[2949] Fix | Delete
'edit_item' => esc_html__( 'Edit Category', 'et_builder' ),
[2950] Fix | Delete
'update_item' => esc_html__( 'Update Category', 'et_builder' ),
[2951] Fix | Delete
'add_new_item' => esc_html__( 'Add New Category', 'et_builder' ),
[2952] Fix | Delete
'new_item_name' => esc_html__( 'New Category Name', 'et_builder' ),
[2953] Fix | Delete
'menu_name' => esc_html__( 'Categories', 'et_builder' ),
[2954] Fix | Delete
'not_found' => esc_html__( "You currently don't have any project categories.", 'et_builder' ),
[2955] Fix | Delete
);
[2956] Fix | Delete
[2957] Fix | Delete
register_taxonomy( 'project_category', array( 'project' ), array(
[2958] Fix | Delete
'hierarchical' => true,
[2959] Fix | Delete
'labels' => $labels,
[2960] Fix | Delete
'show_ui' => true,
[2961] Fix | Delete
'show_admin_column' => true,
[2962] Fix | Delete
'query_var' => true,
[2963] Fix | Delete
'show_in_rest' => true,
[2964] Fix | Delete
) );
[2965] Fix | Delete
[2966] Fix | Delete
$labels = array(
[2967] Fix | Delete
'name' => esc_html__( 'Project Tags', 'et_builder' ),
[2968] Fix | Delete
'singular_name' => esc_html__( 'Project Tag', 'et_builder' ),
[2969] Fix | Delete
'search_items' => esc_html__( 'Search Tags', 'et_builder' ),
[2970] Fix | Delete
'all_items' => esc_html__( 'All Tags', 'et_builder' ),
[2971] Fix | Delete
'parent_item' => esc_html__( 'Parent Tag', 'et_builder' ),
[2972] Fix | Delete
'parent_item_colon' => esc_html__( 'Parent Tag:', 'et_builder' ),
[2973] Fix | Delete
'edit_item' => esc_html__( 'Edit Tag', 'et_builder' ),
[2974] Fix | Delete
'update_item' => esc_html__( 'Update Tag', 'et_builder' ),
[2975] Fix | Delete
'add_new_item' => esc_html__( 'Add New Tag', 'et_builder' ),
[2976] Fix | Delete
'new_item_name' => esc_html__( 'New Tag Name', 'et_builder' ),
[2977] Fix | Delete
'menu_name' => esc_html__( 'Tags', 'et_builder' ),
[2978] Fix | Delete
);
[2979] Fix | Delete
[2980] Fix | Delete
register_taxonomy( 'project_tag', array( 'project' ), array(
[2981] Fix | Delete
'hierarchical' => false,
[2982] Fix | Delete
'labels' => $labels,
[2983] Fix | Delete
'show_ui' => true,
[2984] Fix | Delete
'show_admin_column' => true,
[2985] Fix | Delete
'query_var' => true,
[2986] Fix | Delete
'show_in_rest' => true,
[2987] Fix | Delete
) );
[2988] Fix | Delete
}
[2989] Fix | Delete
endif;
[2990] Fix | Delete
[2991] Fix | Delete
[2992] Fix | Delete
function et_admin_backbone_templates_being_loaded() {
[2993] Fix | Delete
if ( ! et_core_security_check_passed( '', 'et_admin_load_nonce' ) ) {
[2994] Fix | Delete
return false;
[2995] Fix | Delete
}
[2996] Fix | Delete
[2997] Fix | Delete
if ( ! is_admin() ) {
[2998] Fix | Delete
return false;
[2999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function