__( 'Bongoto', 'bongoto' ) ) ); } } add_action( 'init', 'bongoto_register_pattern_category' ); /** * 3) Register Block Styles (Buttons → Rounded) * - Loads a small CSS file only when editing/rendering blocks that need it */ function bongoto_register_block_styles() { $handle = 'bongoto-block-styles'; $rel = 'block-styles/buttons-rounded.css'; $path = defined('BONGOTO_DIR') ? BONGOTO_DIR . $rel : trailingslashit( get_template_directory() ) . $rel; $uri = defined('BONGOTO_URI') ? BONGOTO_URI . $rel : trailingslashit( get_template_directory_uri() ) . $rel; if ( file_exists( $path ) ) { wp_register_style( $handle, $uri, array(), function_exists( 'bongoto_file_version' ) ? bongoto_file_version( $rel ) : ( defined( 'BONGOTO_VERSION' ) ? BONGOTO_VERSION : '1.0.0' ) ); if ( function_exists( 'register_block_style' ) ) { register_block_style( 'core/button', array( 'name' => 'bongoto-buttons-rounded', 'label' => __( 'Rounded (Bongoto)', 'bongoto' ), 'style_handle' => $handle, ) ); } } } add_action( 'init', 'bongoto_register_block_styles' ); /** * 4) Image sizes → show in media size dropdown */ function bongoto_image_size_names( $sizes ) { $sizes['bongoto-thumb'] = __( 'Bongoto Thumb (540×360 crop)', 'bongoto' ); $sizes['bongoto-card'] = __( 'Bongoto Card (720×480 crop)', 'bongoto' ); return $sizes; } add_filter( 'image_size_names_choose', 'bongoto_image_size_names' ); /** * 5) Tidy excerpt more string */ function bongoto_excerpt_more( $more ) { if ( is_admin() ) { return $more; } return '…'; } add_filter( 'excerpt_more', 'bongoto_excerpt_more' ); /** * 6) Register Footer Sidebars (Contact + Columns) * - Footer Contact: বাম পাশে লোগোর নিচে * - Footer Column 1..6: ডান পাশে গ্রিড কলামগুলো */ function bongoto_register_sidebars() { // Left: contact area under logo register_sidebar( [ /* translators: Footer Contact widget area name */ 'name' => __( 'Footer Contact', 'bongoto' ), 'id' => 'footer-contact', 'description' => __( 'Left area under logo in the footer. Add a Text/HTML widget for contact info.', 'bongoto' ), 'before_widget' => '', 'before_title' => '