tak1993
Forum Replies Created
-
Forum: Plugins
In reply to: [Code Snippets] Site crash with PHP 8On the backend I got this:
?Es gab einen kritischen Fehler auf deiner Website“
“There was a critical error on your website”Forum: Plugins
In reply to: [Code Snippets] Site crash with PHP 8There is only crashing the backend site with php8 and enabled code snippets. With 7.4 everything working good
Forum: Plugins
In reply to: [Code Snippets] Site crash with PHP 8My php snippet:
add_action( 'woocommerce_share', 'bbloomer_custom_action', 5 ); function bbloomer_custom_action() { echo '<div class="atkp-disclaimer2">* Wir weisen darauf hin, dass sich hier angezeigte Preise inzwischen ge?ndert haben k?nnen. Alle Angaben ohne Gew?hr. <br> Wenn du über den Button "Produkt kaufen" ein Produkt bestellst, bekommen wir dafür eine Provision vom Verk?ufer. Für dich entstehen selbstverst?ndlich keine zus?tzlichen Kosten.</div>'; } function no_self_ping( &$links ) { $home = get_option( 'home' ); foreach ( $links as $l => $link ) if ( 0 === strpos( $link, $home ) ) unset($links[$l]); } add_action( 'pre_ping', 'no_self_ping' ); function search_form_shortcode( ) { get_search_form( ); } add_shortcode('search_form', 'search_form_shortcode'); function comment_after_policy_field() { echo '<br><p>Hast du Probleme bei der Einrichtung oder Fragen zu technischen Produkten? Dann kannst du gerne deine Frage in unserer <b><a href="https://www.facebook.com/groups/internetderdinge">Facebook Gruppe</a></b> stellen. Die IDD-Community wird versuchen dein Anliegen zu l?sen.</p>'; } add_action('comment_form', 'comment_after_policy_field'); add_action('admin_head', 'pfc_tinymce_custom_vars'); function disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','disable_comment_url'); /** * Open all external links in a new window */ // This will take care of the Buy Product button below the external product on the Shop page. add_filter( 'woocommerce_loop_add_to_cart_link', 'ts_external_add_product_link' , 10, 2 ); // Remove the default WooCommerce external product Buy Product button on the individual Product page. remove_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 ); // Add the open in a new browser tab WooCommerce external product Buy Product button. add_action( 'woocommerce_external_add_to_cart', 'ts_external_add_to_cart', 30 ); function ts_external_add_product_link( $link ) { global $product; if ( $product->is_type( 'external' ) ) { $link = sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="%s" target="_blank">%s</a>', esc_url( $product->add_to_cart_url() ), esc_attr( isset( $quantity ) ? $quantity : 1 ), esc_attr( $product->id ), esc_attr( $product->get_sku() ), esc_attr( isset( $class ) ? $class : 'button product_type_external' ), esc_html( $product->add_to_cart_text() ) ); } return $link; } function ts_external_add_to_cart() { global $product; if ( ! $product->add_to_cart_url() ) { return; } $product_url = $product->add_to_cart_url(); $button_text = $product->single_add_to_cart_text(); /** * The code below outputs the edited button with target="_blank" added to the html markup. */ do_action( 'woocommerce_before_add_to_cart_button' ); ?> <p class="cart"> <a href="<?php echo esc_url( $product_url ); ?>" rel="nofollow" class="single_add_to_cart_button button alt" target="_blank"> <?php echo esc_html($button_text ); ?></a> </p> <?php do_action( 'woocommerce_after_add_to_cart_button' ); } /** * Changes the external product button's add to cart text * * @param string $button_text the button's text * @param \WC_Product $product * @return string - updated button text */ //function sv_wc_external_product_button( $button_text, $product ) { // // if ( 'external' === $product->get_type() ) { // enter the default text for external products // return $product->button_text ? $product->button_text : 'Jetzt kaufen'; // } // return $button_text; //} //add_filter( 'woocommerce_product_single_add_to_cart_text', 'sv_wc_external_product_button', 10, 2 ); function sv_wc_external_product_button( $button_text ) { return 'Jetzt kaufen'; } add_filter( 'woocommerce_product_single_add_to_cart_text', 'sv_wc_external_product_button' ); /** * Disable WooCommerce block styles (front-end). */ function slug_disable_woocommerce_block_styles() { wp_dequeue_style( 'wc-block-style' ); } add_action( 'wp_enqueue_scripts', 'slug_disable_woocommerce_block_styles' ); /** * Geschwindigkeit verbessern */ add_filter ('wpcf7_load_js', '__return_false'); add_filter ('wpcf7_load_css', '__return_false'); remove_action ('wp_head', 'wlwmanifest_link'); remove_action ('wp_head', 'wp_generator'); add_filter ('xmlrpc_enabled', '__return_false'); remove_action ('wp_head', 'print_emoji_detection_script', 7); remove_action ('wp_print_styles', 'print_emoji_styles'); remove_action ('admin_print_scripts', 'print_emoji_detection_script'); remove_action ('admin_print_styles', 'print_emoji_styles'); remove_action ('wp_head', 'rsd_link'); /** Disable Ajax Call from WooCommerce on front page and posts*/ add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11); function dequeue_woocommerce_cart_fragments() { if (is_front_page() || is_single() ) wp_dequeue_script('wc-cart-fragments'); } //Remove JQuery migrate function remove_jquery_migrate($scripts) { if (!is_admin() && isset($scripts->registered['jquery'])) { $script = $scripts->registered['jquery']; if ($script->deps) { // Check whether the script has any dependencies $script->deps = array_diff($script->deps, array( 'jquery-migrate' )); } } } add_action('wp_default_scripts', 'remove_jquery_migrate'); /* Kryptow?hrungen Kategorie aus Startseite ausschlie?en */ function theme_slug_exclude_categories( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-6546' ); } } add_action( 'pre_get_posts', 'theme_slug_exclude_categories' ); // WooCommerce Shop-Seite auf 4 Spalten einstellen add_filter( 'loop_shop_columns', 'az_product_columns', 5); function az_product_columns($columns) { if ( is_shop() || is_product_category() || is_product_tag() ) { $columns = 4; return $columns; } }
Do you want to add this function later?
Forum: Plugins
In reply to: [UpdraftPlus: WP Backup & Migration Plugin] Local backup will not be deletedHello,
thanks, but that is the problem what i told. The local backups will not be deleted, when I delete the local backups i have the same problem again and again….
Problem: the local backups will not be deleted. I have already checked the box to delete local backups!Forum: Plugins
In reply to: [UpdraftPlus: WP Backup & Migration Plugin] Local backup will not be deletedHi Bryle,
pastebin did not work, but other alternative:
https://zerobin.net/?a0026f1e884bef7d#CyxMM+GxRwXZhTXFQUZgGea7I4FxfH7rdKVOYg5VF8g=Thank you
I have also the same problem after the update.
=> Sorry, you are not allowed to access this page.I havn’t any user-role plugins or anythings.
Update via WordPress