Skip to content

Commit

Permalink
Merge branch 'master' into feat/i18n-tax-cpt
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen authored Jan 10, 2024
2 parents 317cf14 + c77c676 commit 034596c
Show file tree
Hide file tree
Showing 22 changed files with 24,526 additions and 65 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dandelion.yml
sass/navigation/luxbar
sass/navigation/_luxbar.scss
.DS_Store
package-lock.json
html
w3cErrors/
.vscode
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
### [Unreleased]
### 9.3.6rc: 2023-12-08

* Fix the permission issue with self-updater
* Fix ACF element colors in Gutenberg editor
* Add WOFF2 to variablefont mixin #194 (thanks @raikasdev!)
* Fix the permission issue with self-updater
* Fix ACF element colors in Gutenberg editor
* Add WOFF2 to variablefont mixin #194 (thanks @raikasdev!)
* Remove duplicate gulp dependency #204 (thanks @Nostalginen!)
* Pop!_OS support for newtheme script #202 (thanks @raikasdev!)
* Fix footer colors on WordPress.org theme preview, Closes #182 #200 (thanks @raikasdev!)
* Clean up ACF Block load script if expression #199 (thanks @raikasdev!)
* Fix PHP styling with new guidelines and fixed allowed blocks #198 (thanks @raikasdev!)
* Remove package-lock.json from gitignore #197 (thanks @raikasdev!)

### 9.3.5: 2023-09-12

Expand Down
44 changes: 44 additions & 0 deletions bin/newtheme-popos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
# WordPress theme starting bash script for Air-light, ported for Pop!_OS, might work on Ubuntu or even Debian, or other forks.
# @Author: Roni Laukkarinen
# @Date: 2021-04-22 08:06:02
# @Last Modified by: Roni Äikäs
# @Last Modified time: 2023-09-29 22:15:53

# Script specific vars
SCRIPT_LABEL='for Pop!_OS'
SCRIPT_VERSION='1.0.0 (2023-09-29)'

# Vars needed for this file to function globally
CURRENTFILE=`basename $0`

# Determine scripts location to get imports right
if [ "$CURRENTFILE" = "newtheme.sh" ]; then
SCRIPTS_LOCATION="$( pwd )"
source ${SCRIPTS_LOCATION}/tasks/variables.sh
source ${SCRIPTS_LOCATION}/tasks/header.sh
exit
else
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ORIGINAL_FILE=$( readlink $DIR/$CURRENTFILE )
SCRIPTS_LOCATION=$( dirname $ORIGINAL_FILE )
fi

# Final note about server requirements
echo ""
echo "${WHITE}Using this start script requires you use the following:
https://github.com/raikasdev/pop-lemp-setup
https://github.com/digitoimistodude/air-light
${TXTRESET}"

# First, let's check updates to self
source ${SCRIPTS_LOCATION}/tasks/self-update.sh

# Import required tasks
source ${SCRIPTS_LOCATION}/tasks/imports.sh

# Replace Air-light with your theme name and other seds
source ${SCRIPTS_LOCATION}/tasks/replaces-wsl.sh

# The end
source ${SCRIPTS_LOCATION}/tasks/footer.sh
1 change: 0 additions & 1 deletion bin/tasks/cleanups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ rm ${PROJECT_THEME_PATH}/sass/layout/_wordpress.scss
echo "${YELLOW}Remove things we need to remove anyway in each start...${TXTRESET}"
rm ${PROJECT_THEME_PATH}/sass/layout/_site-footer.scss
touch ${PROJECT_THEME_PATH}/sass/layout/_site-footer.scss
rm ${PROJECT_THEME_PATH}/template-parts/header/demo-content.php
rm -rf ${PROJECT_THEME_PATH}/template-parts/footer
8 changes: 5 additions & 3 deletions bin/tasks/replaces-wsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ read -p "${BOLDYELLOW}Do we use comments in this project? (y/n)${TXTRESET} " yn

echo "${YELLOW}Running project gulp styles once...${TXTRESET}"
cd ${PROJECT_PATH}
gulp devstyles
gulp prodstyles

# NPX to try use the project gulp first (making sure we use right version)
npx gulp devstyles
npx gulp prodstyles

echo "${YELLOW}Running project gulp scripts task once...${TXTRESET}"
cd ${PROJECT_PATH}
gulp js
npx gulp js
21 changes: 5 additions & 16 deletions css/dev/global.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions css/dev/gutenberg-editor-styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/prod/global.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/prod/gutenberg-editor-styles.css

Large diffs are not rendered by default.

Binary file added fonts/inter-variablefont.woff2
Binary file not shown.
3 changes: 1 addition & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@
// Restrict to only selected blocks
// Set the value to 'all' to allow all blocks everywhere
'allowed_blocks' => [
'default' => [
],
'default' => [],
'post' => [
'core/archives',
'core/audio',
Expand Down
4 changes: 4 additions & 0 deletions inc/hooks/gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ function allowed_block_types( $allowed_blocks, $editor_context ) {

// If there is post type specific blocks, add them to the allowed blocks list
if ( isset( $editor_context->post->post_type ) && isset( THEME_SETTINGS['allowed_blocks'][ $editor_context->post->post_type ] ) ) {
if ( 'all' === THEME_SETTINGS['allowed_blocks'][ $editor_context->post->post_type ] ) {
return $allowed_blocks;
}

$allowed_blocks = array_merge( $allowed_blocks, THEME_SETTINGS['allowed_blocks'][ $editor_context->post->post_type ] );
}

Expand Down
4 changes: 1 addition & 3 deletions inc/includes/nav-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public function start_lvl( &$output, $depth = 0, $args = null ) {
} else {
$output .= "\n{$n}{$indent}<ul>{$n}";
}

}

/**
Expand Down Expand Up @@ -146,7 +145,7 @@ public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {

// Updating the CSS classes of a menu item in the WordPress Customizer preview results in all classes defined
// in that particular input box to come in as one big class string.
$split_on_spaces = function ( $class ) {
$split_on_spaces = function( $class ) {
return preg_split( '/\s+/', $class );
};
$classes = $this->flatten( array_map( $split_on_spaces, $classes ) );
Expand Down Expand Up @@ -600,5 +599,4 @@ public function flatten( $array ) {
}
return $result;
}

}
1 change: 0 additions & 1 deletion inc/taxonomies/your-taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ public function register( array $post_types = [] ) {

$this->register_wp_taxonomy( $this->slug, $post_types, $args );
}

}
6 changes: 5 additions & 1 deletion inc/template-tags/acf-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ function load_acf_block( $block_path, $cache = false, $block = [], $is_preview =
*/
if ( ! $is_preview ) {
$post_type = get_post_type();
if ( $post_type && 'wp_block' !== $post_type && is_array( $block['post_types'] ) && ! in_array( $post_type, $block['post_types'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict

$is_not_wp_block = $post_type && 'wp_block' !== $post_type;
$is_disallowed_in_post_type = is_array( $block['post_types'] ) && ! in_array( $post_type, $block['post_types'] );

if ( $is_not_wp_block && $is_disallowed_in_post_type ) {
return '';
}
}
Expand Down
1 change: 0 additions & 1 deletion inc/template-tags/edit-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ function air_edit_link() {
</a>
</p>
<?php

}
3 changes: 2 additions & 1 deletion inc/template-tags/single-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

namespace Air_Light;

function single_comment( $comment, $args, $depth ) { ?>
function single_comment( $comment, $args, $depth ) {
?>
<li id="li-comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
<div id="comment-<?php comment_ID(); ?>">
<?php echo get_avatar( $comment, '62' ); ?>
Expand Down
Loading

0 comments on commit 034596c

Please sign in to comment.