AI Coding Toolkit – WordPress Generator
AI Coding Toolkit
WordPress Plugin & Page Generator
Click any card to flip between AI generator and system prompt
`;
break;
case 'theme':
generatedCode = `/**
* Theme Name: ${inputValues[0] || generator.title}
* Description: ${inputValues[1] || generator.description}
* Version: 1.0.0
*/
/* Main Styles */
body {
font-family: Arial, sans-serif;
background-color: #000000;
color: #ffffff;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.header {
background: #facc15;
color: #000000;
padding: 1rem;
text-align: center;
}
.main-content {
background: #111827;
padding: 2rem;
margin: 20px 0;
border-radius: 5px;
border: 1px solid #facc15;
}
.footer {
background: #facc15;
color: #000000;
text-align: center;
padding: 1rem;
margin-top: 20px;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 10px;
}
.main-content {
padding: 1rem;
}
}`;
break;
case 'shortcode':
generatedCode = ` 'Default Title',
'content' => 'Default content',
), \$atts);
// Output the shortcode content
\$output = '
'; \$output .= '
' . esc_html(\$atts['title']) . ''; \$output .= '
' . esc_html(\$atts['content']) . '
'; \$output .= '
'; return \$output; } // Register the shortcode add_shortcode('${inputValues[0] ? inputValues[0].toLowerCase().replace(/\s+/g, '') : 'custom_shortcode'}', '${inputValues[0] ? inputValues[0].toLowerCase().replace(/\s+/g, '_') : 'custom_shortcode'}_handler'); `; break; default: generatedCode = `// Generated code for: ${generator.title}\n// Inputs: ${inputValues.join(', ')}`; } // Show generated code in an alert for demo purposes alert(`Generated ${generator.type.toUpperCase()} Code:\n\n${generatedCode}`); } function editGenerator(index) { const generator = generators[index]; generatorTitleInput.value = generator.title; generatorTypeInput.value = generator.type; systemPromptInput.value = generator.systemPrompt; generatorDescriptionInput.value = generator.description; formContainer.style.display = 'block'; editingIndex = index; } function deleteGenerator(index) { if (confirm('Are you sure you want to delete this generator?')) { generators.splice(index, 1); localStorage.setItem('ai_toolkit_generators', JSON.stringify(generators)); renderGenerators(); } }