Type: php
(cloud) Claude – Generate Sitemap
add_action(‘admin_menu’, ‘add_sitemap_generator_menu’); function add_sitemap_generator_menu() { add_menu_page( ‘Sitemap Generator’, ‘Sitemap Generator’, ‘manage_options’, ‘csv-sitemap-generator’, ‘csv_sitemap_generator_page’, ‘dashicons-networking’ ); } function write_log($message) { $timestamp = date(‘Y-m-d H:i:s’); $log_entry = “[$timestamp] $message\n”; file_put_contents(WP_CONTENT_DIR . ‘/sitemap-logs.txt’, $log_entry, FILE_APPEND); } function generate_sitemap_file($urls, $batch_number, $output_dir) { header(‘Cache-Control: no-store,…Continue reading
Lock users if website is idle for certain period ウェブサイトが一定期間アイドル状態の場合にユーザーをロックするBy Amiru San
/** * Lock user out after 5 minutes of inactivity by Amiru ウェブサイトが一定期間アイドル状態の場合にユーザーをロックする. */ add_action( ‘init’, ‘lock_user_after_inactivity’ ); function lock_user_after_inactivity() { // Check if the user is logged in if ( is_user_logged_in() ) { // Get the current user ID…Continue reading
Remove the option to reset your password upon login
function remove_lost_password_link() { return ”; } add_filter( ‘gettext’, ‘remove_lost_password_link’, 10, 3 );Continue reading
WPForms Repeater Output Support / Central Region Service Request (SEI)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading
WPForms Repeater Output Support / Central Region Service Request (SKY)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading
WPForms Repeater Output Support / Central Region Service Request (LSO)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading
WPForms Repeater Output Support / Central Region Service Request (EDB)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading
WPForms Repeater Output Support / Central Region Service Request (ACE)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading
WPForms Repeater Output Support / Central Region Service Request (ALS)
add_action(‘wpforms_loaded’, function() { // 1. Register your custom smart tags (this happens site-wide). add_filter(‘wpforms_smart_tags’, function($tags) { $tags[‘equipment_type_list’] = ‘Equipment Type List’; $tags[‘ownership_type_list’] = ‘Ownership Type List’; $tags[‘serial_number_list’] = ‘Serial Number List’; $tags[‘brand_model_list’] = ‘Brand/Model List’; return $tags; }); // 2.…Continue reading