/* Plugin Name: SuperWp WhatsApp Product Enquiry Description: Adds a WhatsApp enquiry button to WooCommerce product pages with customizable options, custom messages, and phone number input. Version: 1.0.3 Author: Thiarara SuperWP */ // Add WooCommerce Submenu for WhatsApp Enquiry Settings…Continue reading
// Register taxonomies for scenes and devices add_action(‘init’, ‘register_tent_space_taxonomies’); function register_tent_space_taxonomies() { // Register Scenes taxonomy register_taxonomy(‘tent_scene’, array(‘tent-space’), array( ‘hierarchical’ => false, ‘labels’ => array( ‘name’ => ‘Tent Scenes’, ‘singular_name’ => ‘Tent Scene’, ‘search_items’ => ‘Search Scenes’, ‘all_items’ => ‘All…Continue reading
/** * Shows how to add a custom dropdown in a donation form (this example the select field is called “Giving Type”) * * This snippet only works in Charitable 1.5 or above. * */ function wpchar_charitable_register_new_dropodown_field() { /** *…Continue reading
$servername = “your_server”; // change your_server with your actual database server $username = “your_username”; // change your_username with your actual database username $password = “your_password”; // change your_password with your actual database password $dbname = “your_database”; // change your_database with…Continue reading
add_filter( ‘body_class’, function( $classes ) { global $post; if ( is_singular() && isset( $post->post_name ) ) { $classes[] = $post->post_type . ‘-‘ . sanitize_html_class( $post->post_name ); } return $classes; });Continue reading
// Author: Sumaiya, Clickup Doc: https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-24495 // Add action for fetching tool data add_action(‘wp_ajax_fetch_tool_data_unique’, ‘fetch_tool_data_customized’); add_action(‘wp_ajax_nopriv_fetch_tool_data_unique’, ‘fetch_tool_data_customized’); // For non-logged in users if (!function_exists(‘fetch_tool_data_by_task_id_unique’)) { function fetch_tool_data_by_task_id_unique($task_id) { global $wpdb; $task_id = sanitize_text_field($task_id); $table_name = ‘sumaiya_test_table’; // Table name without…Continue reading
/** * 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