feat: add native code block feature with Prism highlighting and editor integration
- Implemented custom code block system for frontend and editors - Integrated Prism.js for syntax highlighting (YAML + HTML support) - Added copy-to-clipboard functionality with hover-based UI - Introduced custom Gutenberg block for code input - Added Classic Editor button for quick code insertion - Implemented server-side rendering via the_content filter - Added dedicated styling (code.css) with Dracula-inspired theme - Added editor preview styling (editor.css) for visual consistency - Ensured accessibility and keyboard support for copy button - Optimized asset loading and versioning using filemtime() This feature provides a lightweight, theme-native alternative to external code highlighting plugins.
This commit is contained in:
@@ -224,3 +224,11 @@ if ( ! function_exists( 'zeitfresser_asset' ) ) {
|
||||
return get_template_directory_uri() . '/assets/' . ltrim($path, '/');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Cookie Button
|
||||
*/
|
||||
add_filter( 'comment_form_default_fields', function( $fields ) {
|
||||
unset( $fields['cookies'] );
|
||||
return $fields;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user