__( 'Primary Menu', 'brizy-starter' ), 'footer' => __( 'Footer Menu', 'brizy-starter' ), ) ); // Disable Gutenberg editor globally add_filter( 'use_block_editor_for_post_type', '__return_false', 100 ); add_filter( 'use_block_editor_for_post', '__return_false', 100 ); } add_action( 'after_setup_theme', 'reventor_brizy_setup' ); /** * Enqueue minimal styles and scripts */ function brizy_theme_scripts() { wp_enqueue_style( 'brizy-starter-style', get_stylesheet_uri() ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'brizy-starter-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'brizy_theme_scripts' ); /** * Brizy Compatibility - Full width support */ function reventor_brizy_full_width() { add_theme_support( 'align-wide' ); // Remove content width restrictions for Brizy add_filter( 'content_width', function ( $width ) { return 1920; // Full width for Brizy compatibility } ); } add_action( 'after_setup_theme', 'reventor_brizy_full_width' ); /** * Register widget area */ function reventor_brizy_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'brizy-starter' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar.', 'brizy-starter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'reventor_brizy_widgets_init' ); /** * Fallback menu for primary navigation */ function brizy_theme_fallback_menu() { echo ''; } /** * Display admin notice on theme activation suggesting Brizy plugin installation */ function reventor_brizy_activation_notice() { // Include the required file for is_plugin_active() function if ( ! function_exists( 'is_plugin_active' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } // Check if Brizy is already active if ( is_plugin_active( 'brizy-editor/brizy-editor.php' ) ) { // Clear the notice flag if Brizy is now active delete_option( 'reventor_brizy_show_notice' ); return; } // Set flag to show the notice update_option( 'reventor_brizy_show_notice', true ); } add_action( 'after_switch_theme', 'reventor_brizy_activation_notice' ); /** * Show admin notice with Brizy installation suggestion */ function reventor_brizy_show_activation_notice() { // Include the required file for is_plugin_active() function if ( ! function_exists( 'is_plugin_active' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } // Check if Brizy is already active if ( is_plugin_active( 'brizy-editor/brizy-editor.php' ) ) { delete_option( 'reventor_brizy_show_notice' ); return; } // Check if notice should be displayed if ( ! get_option( 'reventor_brizy_show_notice' ) ) { return; } // Only show to users who can install plugins if ( ! current_user_can( 'install_plugins' ) ) { return; } $install_link = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => 'brizy', ), admin_url( 'update.php' ) ), 'install-plugin_brizy' ); $activate_link = wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => 'brizy-editor/brizy-editor.php', 'plugin_status' => 'all', 'paged' => '1', ), admin_url( 'plugins.php' ) ), 'activate-plugin_brizy-editor/brizy-editor.php' ); ?>


false, ) ); } } add_action( 'admin_init', 'reventor_brizy_dismiss_notice' ); /** * Note: Automatic plugin installation removed to comply with WordPress.org guidelines. * Users should manually install and activate the Brizy page builder plugin. * See the README.md for installation instructions. */ /** * Note: Automatic home page creation removed to comply with WordPress.org guidelines. * Users have full control over their homepage setup and can create a custom home page * by creating a new page and selecting the "Brizy Template" from the page template dropdown. */ /** * Fallback menu for footer navigation */ function brizy_theme_fallback_footer_menu() { echo ''; }