Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

product attributes on hover

// PHP function to display product attributes add_action( ‘woocommerce_after_shop_loop_item_title’, ‘display_product_attributes_on_hover’, 10 ); function display_product_attributes_on_hover() { global $product; // Get product attributes $attributes = $product->get_attributes(); if ( ! empty( $attributes ) ) { // Output container for product attributes, initially hidden…Continue reading

get all entries from a form

/** Funktion zur Ermittlung aller Einträge in einem Formidable Form. Optional kann mit einem $searchTerm gefiltert werden. */ function getFormidableDataFromForm($formId, $searchTerm) { // API-Schlüssel abrufen $frmApiKey = getFormidableApiKey(); // Die URL für die Anfrage zusammenstellen $searchstring = ”; if (!empty($searchTerm))…Continue reading

Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Automatic lazy rendering exclusion

// add_filter( ‘rocket_lrc_optimization’, ‘__return_false’ , 999 ); add_filter( ‘rocket_lrc_exclusions’, function( $exclusions ) { $exclusions[] = ‘breakdance”‘; return $exclusions; } );Continue reading