Skip to content

Commit

Permalink
Merge pull request #10 from linchpin/merge/upstream-phpcbf
Browse files Browse the repository at this point in the history
Auto Fix Formatting
  • Loading branch information
aaronware authored Apr 28, 2023
2 parents 1af7a01 + 52d9e98 commit 279a212
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 54 deletions.
97 changes: 45 additions & 52 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @link https://frostwp.com/
*/

if (!function_exists('frost_setup')) {
if ( ! function_exists( 'frost_setup' ) ) {

/**
* Sets up theme defaults and registers support for various WordPress features.
Expand All @@ -22,11 +22,9 @@
*
* @return void
*/
function frost_setup()
{

function frost_setup() {
// Make theme available for translation.
load_theme_textdomain('frost', get_template_directory() . '/languages');
load_theme_textdomain( 'frost', get_template_directory() . '/languages' );

// Enqueue editor styles and fonts.
add_editor_style(
Expand All @@ -36,51 +34,48 @@ function frost_setup()
);

// Remove core block patterns.
remove_theme_support('core-block-patterns');
remove_theme_support( 'core-block-patterns' );
}
}
add_action('after_setup_theme', 'frost_setup');
add_action( 'after_setup_theme', 'frost_setup' );

// Enqueue style sheet.
add_action('wp_enqueue_scripts', 'frost_enqueue_style_sheet');
function frost_enqueue_style_sheet()
{
wp_enqueue_style('ash', get_template_directory_uri() . '/css/ash.css', [], wp_get_theme()->get('Version'));
add_action( 'wp_enqueue_scripts', 'frost_enqueue_style_sheet' );
function frost_enqueue_style_sheet() {
wp_enqueue_style( 'ash', get_template_directory_uri() . '/css/ash.css', array(), wp_get_theme()->get( 'Version' ) );
}

/**
* Register block styles.
*
* @since 0.9.2
*/
function frost_register_block_styles()
{

function frost_register_block_styles() {
$block_styles = array(
'core/button' => array(
'fill-base' => __('Fill Base', 'frost'),
'outline-base' => __('Outline Base', 'frost'),
'fill-base' => __( 'Fill Base', 'frost' ),
'outline-base' => __( 'Outline Base', 'frost' ),
),
'core/columns' => array(
'columns-reverse' => __('Reverse', 'frost'),
'columns-reverse' => __( 'Reverse', 'frost' ),
),
'core/group' => array(
'shadow' => __('Shadow', 'frost'),
'shadow-solid' => __('Shadow Solid', 'frost'),
'shadow' => __( 'Shadow', 'frost' ),
'shadow-solid' => __( 'Shadow Solid', 'frost' ),
),
'core/list' => array(
'no-disc' => __('No Disc', 'frost'),
'no-disc' => __( 'No Disc', 'frost' ),
),
'core/navigation-link' => array(
'outline' => __('Outline', 'frost'),
'outline' => __( 'Outline', 'frost' ),
),
'core/social-links' => array(
'outline' => __('Outline', 'frost'),
'core/social-links' => array(
'outline' => __( 'Outline', 'frost' ),
),
);

foreach ($block_styles as $block => $styles) {
foreach ($styles as $style_name => $style_label) {
foreach ( $block_styles as $block => $styles ) {
foreach ( $styles as $style_name => $style_label ) {
register_block_style(
$block,
array(
Expand All @@ -91,50 +86,48 @@ function frost_register_block_styles()
}
}
}
add_action('init', 'frost_register_block_styles');
add_action( 'init', 'frost_register_block_styles' );

/**
* Registers block categories, and type.
*
* @since 0.9.2
*/
function frost_register_block_pattern_categories()
{

function frost_register_block_pattern_categories() {
/* Functionality specific to the Block Pattern Explorer plugin. */
if (function_exists('register_block_pattern_category_type')) {
register_block_pattern_category_type('frost', array('label' => __('Frost', 'frost')));
if ( function_exists( 'register_block_pattern_category_type' ) ) {
register_block_pattern_category_type( 'frost', array( 'label' => __( 'Frost', 'frost' ) ) );
}

$block_pattern_categories = array(
'frost-footer' => array(
'label' => __('Footer', 'frost'),
'categoryTypes' => array('frost'),
'frost-footer' => array(
'label' => __( 'Footer', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
'frost-general' => array(
'label' => __('General', 'frost'),
'categoryTypes' => array('frost'),
'frost-general' => array(
'label' => __( 'General', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
'frost-header' => array(
'label' => __('Header', 'frost'),
'categoryTypes' => array('frost'),
'frost-header' => array(
'label' => __( 'Header', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
'frost-page' => array(
'label' => __('Page', 'frost'),
'categoryTypes' => array('frost'),
'frost-page' => array(
'label' => __( 'Page', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
'frost-query' => array(
'label' => __('Query', 'frost'),
'categoryTypes' => array('frost'),
'frost-query' => array(
'label' => __( 'Query', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
'frost-proposals' => array(
'label' => __('Proposals', 'frost'),
'categoryTypes' => array('frost'),
'frost-proposals' => array(
'label' => __( 'Proposals', 'frost' ),
'categoryTypes' => array( 'frost' ),
),
);

foreach ($block_pattern_categories as $name => $properties) {
register_block_pattern_category($name, $properties);
foreach ( $block_pattern_categories as $name => $properties ) {
register_block_pattern_category( $name, $properties );
}
}
add_action('init', 'frost_register_block_pattern_categories', 9);
add_action( 'init', 'frost_register_block_pattern_categories', 9 );
2 changes: 1 addition & 1 deletion patterns/general-project-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group --></div></div>
<!-- /wp:cover -->
<!-- /wp:cover -->
2 changes: 1 addition & 1 deletion patterns/general-proposal.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- /wp:group -->

0 comments on commit 279a212

Please sign in to comment.