Archives: Snippets
CSS snipett
/* ===== VCLIP MEDIA CLONE – GLOBAL STYLES ===== */ :root { –primary: #2D5BE3; –primary-dark: #1A48C1; –secondary: #FF6B35; –dark: #1A1A2E; –light: #F8F9FA; –gray: #6C757D; –white: #FFFFFF; –shadow: 0 10px 30px rgba(0, 0, 0, 0.08); –radius: 10px; –transition: all 0.3s ease;…Continue reading
Perfume
https://fragrance-renaissance-lab.lovable.app/
sticky headers general solution
Öffnungszeiten Reiat Schlauchservice
Add Custom Fields to Products.php
/** * Merchatura – Simple per-product custom fields (v4.2) ✅ Conditional Logic added * * Adds per-field conditional rules that work: * – In admin (inline rule builder under each field) * – On the product page (hide/show live) *…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
Enable Payment on Account
/** * WooCommerce: Role-based + Guest payment methods UI + logic * * – Adds a “Payment Methods” tab under WooCommerce > Settings. * – Shows a matrix of User Roles (down the left) vs Active Payment Methods (across the…Continue reading
Roles.php
// ✅ Add “Roles” menu for shop_manager_-_reseller_admin add_action(‘admin_menu’, function () { $user = wp_get_current_user(); if (!in_array(‘shop_manager_-_reseller_admin’, (array) $user->roles)) return; add_menu_page( ‘Create Customer Role’, ‘Roles’, ‘manage_product_terms’, ‘create-customer-role’, ‘render_custom_role_form’, ‘dashicons-groups’, 56 ); }); // ✅ Render form and role list function render_custom_role_form()…Continue reading