FlowMattic Table data fetch and Fluent Form Autofill

// 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

Add Featured Images to RSS Feeds

/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…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

Full

import { useState } from ‘react’ import { Heart, Users, Play, Home, Search, User, Bell, ArrowRight, X } from ‘lucide-react’ import { Button } from “/components/ui/button” import { Card, CardContent, CardHeader, CardTitle, CardDescription } from “/components/ui/card” import { Input }…Continue reading

TEMPLATE Admin – Support Ticket Page

add_action(‘admin_menu’, ‘register_support_tickets_page’); function register_support_tickets_page() { add_menu_page( ‘Support Tickets’, // Page title (appears in tag) ‘Support Tickets’, // Menu title (appears in the sidebar) ‘edit_posts’, // Capability required to access ‘support-tickets’, // Menu slug (used in URL) ‘support_tickets_page_html’,// Callback function to…Continue reading

TEMPLATE Admin – Dashboard Welcome Widget

add_action(‘wp_dashboard_setup’, function() { wp_add_dashboard_widget( ‘custom_widget_welcome’, ‘Welcome’, ‘custom_dashboard_widget_welcome_display’ ); }); function custom_dashboard_widget_welcome_display() { $current_user = wp_get_current_user(); $display_name = esc_html($current_user->display_name); // EDIT SITE SPECIFIC DETAILS BELOW echo ‘ ‘; echo ‘ Hi ‘ . $display_name . ‘ 👋 ‘; echo ‘ Here…Continue reading

TEMPLATE Admin – Restrict Access to Docs

// Restrict access to Docs page function restrict_page_to_logged_in_users() { // EDIT SITE SPECIFIC PAGE ID HERE $restricted_page_id = 390; // Check if the current page is the restricted page and if the user is not logged in if (is_page($restricted_page_id) &&…Continue reading