From 884e74cde78b5eff0d7b2ad01b8307ed75fa52d4 Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Tue, 5 Dec 2023 08:03:34 +0000 Subject: [PATCH] chore: fix spacing --- inc/Block_Patterns.php | 5 - inc/Core.php | 275 +++++++++++++++-------------- inc/patterns/features-centered.php | 150 ++++++++-------- 3 files changed, 215 insertions(+), 215 deletions(-) diff --git a/inc/Block_Patterns.php b/inc/Block_Patterns.php index cfafdac..8697b7a 100644 --- a/inc/Block_Patterns.php +++ b/inc/Block_Patterns.php @@ -126,11 +126,6 @@ private function setup_properties() { 'single-post-cover', 'homepage-2', 'homepage -3', - - - - - ); $this->categories = apply_filters( 'raft_block_patterns_categories', $categories ); diff --git a/inc/Core.php b/inc/Core.php index 71b95e5..3b0689b 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -15,149 +15,152 @@ * @package raft */ class Core { - /** - * Core instance. - * - * @var Core - */ - public static $instance = null; - - /** - * Get the static instance of the class. - * - * @return Core - */ - public static function get_instance() { - if ( null === self::$instance ) { - self::$instance = new self(); - } - - return self::$instance; - } - - /** - * Core constructor. - */ - public function __construct() { - $this->run_hooks(); - - new Admin(); - new Block_Patterns(); - new Block_Styles(); - } - - /** - * Initialize hooks. - * - * @return void - */ - private function run_hooks() { - add_action( 'after_setup_theme', array( $this, 'setup' ) ); - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) ); - add_action( 'enqueue_block_editor_assets', array( $this, 'add_editor_styles' ) ); - add_filter( 'raft_strings', array( $this, 'strings' ) ); // Added line - } - - /** - * Setup theme. - * - * @return void - */ - public function setup() { - load_theme_textdomain( 'raft', RAFT_DIR . '/languages' ); - - $starter_content = new Starter_Content(); - - add_theme_support( 'starter-content', $starter_content->get() ); - add_theme_support( 'wp-block-styles' ); - add_theme_support( 'automatic-feed-links' ); - add_theme_support( 'title-tag' ); - add_theme_support( 'post-thumbnails' ); - add_theme_support( 'editor-styles' ); - add_theme_support( - 'html5', - array( - 'search-form', - 'comment-form', - 'comment-list', - 'gallery', - 'caption', - 'style', - 'script', - ) - ); - - remove_theme_support( 'core-block-patterns' ); - - register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'raft' ) ) ); - } - - /** - * Enqueue scripts and styles. - * - * @return void - */ - public function enqueue() { - Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['frontend-css'], 'style' ); - } - - /** - * Add editor styles. - * - * @return void - */ - public function add_editor_styles() { - Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['editor-css'], 'editor' ); - } - - /** - * Define theme strings. - */ - public function strings( $strings = [] ) { - $strings = array( + /** + * Core instance. + * + * @var Core + */ + public static $instance = null; + + /** + * Get the static instance of the class. + * + * @return Core + */ + public static function get_instance() { + if ( null === self::$instance ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Core constructor. + */ + public function __construct() { + $this->run_hooks(); + + new Admin(); + new Block_Patterns(); + new Block_Styles(); + } + + /** + * Initialize hooks. + * + * @return void + */ + private function run_hooks() { + add_action( 'after_setup_theme', array( $this, 'setup' ) ); + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) ); + add_action( 'enqueue_block_editor_assets', array( $this, 'add_editor_styles' ) ); + add_filter( 'raft_strings', array( $this, 'strings' ) ); + } + + /** + * Setup theme. + * + * @return void + */ + public function setup() { + load_theme_textdomain( 'raft', RAFT_DIR . '/languages' ); + + $starter_content = new Starter_Content(); + + add_theme_support( 'starter-content', $starter_content->get() ); + add_theme_support( 'wp-block-styles' ); + add_theme_support( 'automatic-feed-links' ); + add_theme_support( 'title-tag' ); + add_theme_support( 'post-thumbnails' ); + add_theme_support( 'editor-styles' ); + add_theme_support( + 'html5', + array( + 'search-form', + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + 'style', + 'script', + ) + ); + + remove_theme_support( 'core-block-patterns' ); + + register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'raft' ) ) ); + } + + /** + * Enqueue scripts and styles. + * + * @return void + */ + public function enqueue() { + Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['frontend-css'], 'style' ); + } + + /** + * Add editor styles. + * + * @return void + */ + public function add_editor_styles() { + Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['editor-css'], 'editor' ); + } + + /** + * Define theme strings. + * + * @param array $strings Strings. + * @return array + */ + public function strings( $strings = array() ) { + $strings = array( - // Generic patterns - 'hero_title' => __( 'Block Based Themes Made simple', 'raft' ), - 'page_title' => __( 'This is a page title', 'raft' ), - 'section_title' => __( 'This is section title', 'raft' ), - 'subtitle' => __( 'Subtitle', 'raft' ), - 'section_description' => __( 'A short section description', 'raft' ), - 'paragraph_text' => __( 'This is placeholder text, feel free to replace it with your unique content as it\'s included here just to provide you with a better understanding of how your text will fit in the layout. Explore the various patterns and templates as you create your personalized web experience.', 'raft' ), - 'short_text' => __( 'Just some placeholder text', 'raft' ), + // Generic patterns. + 'hero_title' => __( 'Block Based Themes Made simple', 'raft' ), + 'page_title' => __( 'This is a page title', 'raft' ), + 'section_title' => __( 'This is section title', 'raft' ), + 'subtitle' => __( 'Subtitle', 'raft' ), + 'section_description' => __( 'A short section description', 'raft' ), + 'paragraph_text' => __( 'This is placeholder text, feel free to replace it with your unique content as it\'s included here just to provide you with a better understanding of how your text will fit in the layout. Explore the various patterns and templates as you create your personalized web experience.', 'raft' ), + 'short_text' => __( 'Just some placeholder text', 'raft' ), - // Feature patterns - 'feature_section_title' => __( 'Showcase your Features and Services', 'raft' ), - 'feature_title' => __( 'This is feature title', 'raft' ), - 'feature_description' => __( 'A placeholder description that you can replace with your own content.', 'raft' ), - 'button_text' => __( 'Button Text', 'raft' ), + // Feature patterns. + 'feature_section_title' => __( 'Showcase your Features and Services', 'raft' ), + 'feature_title' => __( 'This is feature title', 'raft' ), + 'feature_description' => __( 'A placeholder description that you can replace with your own content.', 'raft' ), + 'button_text' => __( 'Button Text', 'raft' ), - // Team patterns - 'team_section_title' => __( 'Our Team', 'raft' ), - 'team_member' => __( 'Team member name', 'raft' ), - 'member_role' => __( 'Company role', 'raft' ), + // Team patterns. + 'team_section_title' => __( 'Our Team', 'raft' ), + 'team_member' => __( 'Team member name', 'raft' ), + 'member_role' => __( 'Company role', 'raft' ), - // Pricing patterns - 'pricing_section_title' => __( 'A pricing section. Join premium!', 'raft' ), - 'plan_title' => __( 'Plan title', 'raft' ), - 'price' => __( '$19.99', 'raft' ), - 'price_feature' => __( 'A pricing feature', 'raft' ), + // Pricing patterns. + 'pricing_section_title' => __( 'A pricing section. Join premium!', 'raft' ), + 'plan_title' => __( 'Plan title', 'raft' ), + 'price' => __( '$19.99', 'raft' ), + 'price_feature' => __( 'A pricing feature', 'raft' ), - // FAQ patterns - 'faq_section_title' => __( 'Frequently Asked Questions', 'raft' ), - 'faq_title' => __( 'Just a frequent question', 'raft' ), + // FAQ patterns. + 'faq_section_title' => __( 'Frequently Asked Questions', 'raft' ), + 'faq_title' => __( 'Just a frequent question', 'raft' ), - // Content Patterns - 'content_title' => __( 'A generic content title', 'raft' ), - 'content_subtitle' => __( 'A content subtitle', 'raft' ), + // Content Patterns. + 'content_title' => __( 'A generic content title', 'raft' ), + 'content_subtitle' => __( 'A content subtitle', 'raft' ), - // Testimonial patterns - 'testimonial' => __( '"...Absolutely one of the best services out there, very professional and easy-going experience, highly recommended..."', 'raft' ), - 'testimonial_name' => __( 'Jason Doe', 'raft' ), + // Testimonial patterns. + 'testimonial' => __( '"...Absolutely one of the best services out there, very professional and easy-going experience, highly recommended..."', 'raft' ), + 'testimonial_name' => __( 'Jason Doe', 'raft' ), - // CTA patterns - 'cta_title' => __( 'Get started today, get in touch!', 'raft' ), - ); + // CTA patterns. + 'cta_title' => __( 'Get started today, get in touch!', 'raft' ), + ); - return $strings; - } + return $strings; + } } diff --git a/inc/patterns/features-centered.php b/inc/patterns/features-centered.php index 7f768cc..2ce627a 100644 --- a/inc/patterns/features-centered.php +++ b/inc/patterns/features-centered.php @@ -1,5 +1,7 @@ __( 'Feature Block', 'raft' ), - 'categories' => array( 'raft/features' ), - 'content' => ' - -
- -
- -
- -
- -
- -
- -
- + 'title' => __( 'Feature Block', 'raft' ), + 'categories' => array( 'raft/features' ), + 'content' => ' + +
+ +
+ +
+ +
+ +
+ +
+ +
+ - -

' . esc_html( $strings['feature_title'] ) . '

- + +

' . esc_html( $strings['feature_title'] ) . '

+ - -

' . esc_html( $strings['feature_description'] ) . '

- + +

' . esc_html( $strings['feature_description'] ) . '

+ - - - -
- -
- -
- + + + +
+ +
+ +
+ - -
- -
- -
- -
- -
- + +
+ +
+ +
+ +
+ +
+ - -

' . esc_html( $strings['feature_title'] ) . '

- + +

' . esc_html( $strings['feature_title'] ) . '

+ - -

' . esc_html( $strings['feature_description'] ) . '

- + +

' . esc_html( $strings['feature_description'] ) . '

+ - - - -
- -
- -
- -
- -
- - ' + + + +
+ +
+ +
+ +
+ +
+ + ', );