Merge branch 'develop' into woo-fields
This commit is contained in:
commit
b7daadcea9
|
|
@ -8,6 +8,27 @@
|
|||
|
||||
-
|
||||
|
||||
## Release 1.2.3-beta.1 October 16th 2023
|
||||
|
||||
** Enhancements **
|
||||
|
||||
- Add and update WooCommerce templates #2091
|
||||
- Improves readability of the sidebar templates #2071
|
||||
- Uses Babel to compile Bootstrap imports #2035
|
||||
- Adds Bootstrap container classes and max-widths to editor styles #2121
|
||||
- Add editor-color-palette-bootstrap4.json #2032
|
||||
|
||||
** Fixes **
|
||||
|
||||
- Fixes typos in the repository #2113
|
||||
- Fix typo in .gitignore to track .browserslistrc #2118
|
||||
- Fixes TinyMCE editor margins #2073
|
||||
- Bump Bootstrap from 5.2.2 to 5.2.3 & other dependencies #2010
|
||||
- Deprecate understrap_link_pages_args filter hook #1967
|
||||
- Add grouped version updates for dependabot #2130
|
||||
- Reduce code duplication by declaring copyDir() once #2129
|
||||
- Fix and update workflows #2127
|
||||
|
||||
## Release 1.2.2 January 16th 2023
|
||||
|
||||
** Fixes **
|
||||
|
|
@ -81,7 +102,7 @@
|
|||
** Fixes **
|
||||
|
||||
- Updates WooCommerce templates to current versions.
|
||||
- Corrects mis-applied version numbers in WooCommerce templates.
|
||||
- Corrects misapplied version numbers in WooCommerce templates.
|
||||
- Reverts WooCommerce Translations to woocommerce language domain.
|
||||
- Updates understrap.pot file to include several translation strings that had not been added.
|
||||
- Fixes spelling and grammar errors in the CHANGELOG.md.
|
||||
|
|
@ -135,7 +156,7 @@ This is a maintenance release incorporating many commits including code formatti
|
|||
- Removes vendor from paths
|
||||
- Removes gulp-touch-fd
|
||||
- Removes jquery.slim.min.js
|
||||
- Removes undescores-for-npm
|
||||
- Removes underscores-for-npm
|
||||
- Removes Bower
|
||||
|
||||
---
|
||||
|
|
@ -384,7 +405,7 @@ Clean rebuild
|
|||
## Release 0.8.5 July 26th 2018
|
||||
- Update to Bootstrap 4.1.3
|
||||
|
||||
## Release 0.8.4 July 16th 2018 Maintenace Release:
|
||||
## Release 0.8.4 July 16th 2018 Maintenance Release:
|
||||
- Update to Bootstrap 4.1.2
|
||||
- fixing sidebar.php problem
|
||||
- Revert to Gulp 3.x support
|
||||
|
|
@ -413,7 +434,7 @@ Clean rebuild
|
|||
## Release 0.8.2 April 11th 2018
|
||||
- Update to Bootstrap 4.1
|
||||
- Adding CONTRIBUTING.md and ISSUE_TEMPLATE.md - Thx @Thomas-A-Reinert
|
||||
- Adding empty JavaScripot file into build process for adding own JS more easily - Thx @Thomas-A-Reinert
|
||||
- Adding empty JavaScript file into build process for adding own JS more easily - Thx @Thomas-A-Reinert
|
||||
- WooCommerce update and cleanup - Thx @ZacharyElkins
|
||||
- Adding SASS source map functionality - Thx @axlright
|
||||
- Cleanup - Thx @axlright
|
||||
|
|
@ -450,7 +471,7 @@ Clean rebuild
|
|||
|
||||
## Release 0.7.0 December 29th 2017
|
||||
- Update to Bootstrap 4 Beta 3
|
||||
- Create rigth-sidebar-check.php - Thx @Vishal-Deshpande
|
||||
- Create right-sidebar-check.php - Thx @Vishal-Deshpande
|
||||
- Fixing container type customizer setting - Thx @0dp
|
||||
- Fixing comments.php - Thx @Vishal-Deshpande
|
||||
|
||||
|
|
@ -518,7 +539,7 @@ Clean rebuild
|
|||
- WooCommerce 3.1 compatibility update - Thx @typeplus
|
||||
- WooCommerce Bootstrap buttons - Thx @yeszao
|
||||
- theme-settings.php update - Thx @oralunal
|
||||
- Update responisve meta tags for Bootstrap 4 - Thx @chuckreynolds
|
||||
- Update responsive meta tags for Bootstrap 4 - Thx @chuckreynolds
|
||||
|
||||
|
||||
## Release 0.6.2 June 7h 2017
|
||||
|
|
@ -615,7 +636,7 @@ Clean rebuild
|
|||
- General bug fixing
|
||||
- Fixing live preview for customizer
|
||||
- Font Awesome update
|
||||
- Udating all npm dependencies
|
||||
- Updating all npm dependencies
|
||||
- ARIA roles update
|
||||
- Updating hamburger icon behavior
|
||||
|
||||
|
|
@ -623,7 +644,7 @@ Clean rebuild
|
|||
- Update Owl Carousel to 2.2.0
|
||||
- Update Font Awesome to 4.7.0
|
||||
- Greek language file added - Thx @stef-k
|
||||
- Portugese language file added - Thx @jfig
|
||||
- Portuguese language file added - Thx @jfig
|
||||
- Adding vertical-one-page template for landingpages - Thx @stef-k
|
||||
- Making all theme functions pluggable to allow child themes to overwrite ´em
|
||||
- French language file added - Thx @tchama
|
||||
|
|
@ -633,7 +654,7 @@ Clean rebuild
|
|||
- Basic WooCommerce templates added
|
||||
- Fixing "Gulp dist" Task
|
||||
- Adding masonry layout option to optimizer - Thx @stef-k
|
||||
- Adding fluid/fixed conatiner option to optimizer
|
||||
- Adding fluid/fixed container option to optimizer
|
||||
|
||||
|
||||
## 0.4.9 Oct. 25th 2016
|
||||
|
|
@ -646,7 +667,7 @@ Clean rebuild
|
|||
|
||||
|
||||
## 0.4.8 Oct. 10th 2016
|
||||
- Removing Bower and replace the dependency managment with npm
|
||||
- Removing Bower and replace the dependency management with npm
|
||||
- Update to Bootstrap 4 Alpha 4
|
||||
- Optimizing WooCommerce loop - Thx @typeplus
|
||||
- Updating all dependencies
|
||||
|
|
@ -732,7 +753,7 @@ Clean rebuild
|
|||
|
||||
## 0.2.9 Mar. 10th 2015
|
||||
- Adding a new theme customizer option. It lets you add a code snippet right before the closing </body> tag.
|
||||
For example for Google Analytics, Google Tag Mananger, Pingdom etc. Just copy and past your code to the input field and save the setting.
|
||||
For example for Google Analytics, Google Tag Manager, Pingdom etc. Just copy and past your code to the input field and save the setting.
|
||||
So you don´t have to edit the theme source file´s directly, and your theme stay´s updateable
|
||||
|
||||
## 0.2.8 Feb. 6th 2015
|
||||
|
|
@ -748,6 +769,6 @@ Clean rebuild
|
|||
|
||||
## 0.2 Dec. 22th 2014
|
||||
- Adding Jasny Off-Canvas nav and Owl.Carousel Slider script
|
||||
- Enqueue scipts and styled dynamically
|
||||
- Enqueue scripts and styled dynamically
|
||||
|
||||
## 0.1 Dec. 10th 2014 - First commit
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ updates:
|
|||
rebase-strategy: auto
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
target-branch: "develop"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# Maintain dependencies for npm
|
||||
- package-ecosystem: "npm"
|
||||
|
|
@ -24,6 +29,19 @@ updates:
|
|||
interval: "monthly"
|
||||
target-branch: "develop"
|
||||
versioning-strategy: increase
|
||||
groups:
|
||||
npm-assets:
|
||||
patterns:
|
||||
- "bootstrap*"
|
||||
- "*popper*"
|
||||
- "font-awesome"
|
||||
npm-build:
|
||||
patterns:
|
||||
- "*"
|
||||
exclude-patterns:
|
||||
- "bootstrap*"
|
||||
- "*popper*"
|
||||
- "font-awesome"
|
||||
|
||||
# Maintain dependencies for Composer
|
||||
- package-ecosystem: "composer"
|
||||
|
|
@ -39,3 +57,7 @@ updates:
|
|||
interval: "monthly"
|
||||
target-branch: "develop"
|
||||
versioning-strategy: increase
|
||||
groups:
|
||||
composer:
|
||||
patterns:
|
||||
- "*"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
name: Build CSS & JS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
paths:
|
||||
- '**.scss'
|
||||
- '**.js'
|
||||
- 'package-lock.json'
|
||||
pull_request_target:
|
||||
branches: [ develop ]
|
||||
paths:
|
||||
- '**.scss'
|
||||
- '**.js'
|
||||
- 'package-lock.json'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
name: 'Build CSS & JS'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Copy assets
|
||||
run: npm run copy-assets
|
||||
|
||||
- name: Commit assets
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Update assets
|
||||
|
||||
- name: Build Bootstrap 5 CSS
|
||||
run: npm run css
|
||||
|
||||
- name: Build Bootstrap 5 JS
|
||||
run: npm run js
|
||||
|
||||
- name: Build Bootstrap 4 CSS
|
||||
run: npm run css-bs4
|
||||
|
||||
- name: Build Bootstrap 4 JS
|
||||
run: npm run js-bs4
|
||||
|
||||
- name: Commit CSS and JS files
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Rebuild CSS and JS files
|
||||
|
|
@ -5,15 +5,25 @@ on:
|
|||
branches: [ develop ]
|
||||
paths:
|
||||
- '**.php'
|
||||
pull_request:
|
||||
- 'phpcs.xml.dist'
|
||||
- 'phpmd.xml'
|
||||
- 'phpstan.neon.dist'
|
||||
pull_request_target:
|
||||
branches: [ develop ]
|
||||
paths:
|
||||
- '**.php'
|
||||
- 'phpcs.xml.dist'
|
||||
- 'phpmd.xml'
|
||||
- 'phpstan.neon.dist'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
php-version: '7.4'
|
||||
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
phpcs:
|
||||
|
|
@ -25,40 +35,40 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
tools: composer, cs2pr
|
||||
tools: cs2pr
|
||||
coverage: none
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
- name: Cache PHPCS cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
path: .phpcs-cache.json
|
||||
key: ${{ runner.os }}-phpcs-cache-${{ hashFiles('**/composer.lock', 'phpcs.xml.dist') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress
|
||||
- name: Install Composer dependencies
|
||||
uses: "ramsey/composer-install@v2"
|
||||
|
||||
- name: Auto fix coding standards
|
||||
run: composer phpcs-fix
|
||||
continue-on-error: true
|
||||
|
||||
- name: Commit coding standards fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Fix coding standards with phpcbf
|
||||
branch: ${{ github.head_ref }}
|
||||
|
||||
- name: Check coding standards
|
||||
run: composer phpcs-ga | cs2pr
|
||||
run: composer phpcs -- -q -n --report=checkstyle | cs2pr
|
||||
|
||||
php-lint:
|
||||
|
||||
|
|
@ -68,30 +78,19 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
tools: composer, cs2pr
|
||||
tools: cs2pr, parallel-lint
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Check syntax
|
||||
run: composer php-lint
|
||||
run: parallel-lint --checkstyle . | cs2pr
|
||||
|
||||
phpstan:
|
||||
|
||||
|
|
@ -101,29 +100,29 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
tools: composer, cs2pr
|
||||
coverage: none
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
- name: Cache PHPStan cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
path: .phpstan-cache
|
||||
key: ${{ runner.os }}-phpstan-cache-${{ hashFiles('**/composer.lock', 'phpstan.neon.dist') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress
|
||||
- name: Install Composer dependencies
|
||||
uses: "ramsey/composer-install@v2"
|
||||
|
||||
- name: Static Analysis
|
||||
- name: Analyse
|
||||
id: phpstan
|
||||
run: composer phpstan -- --error-format=github
|
||||
|
||||
|
|
@ -131,10 +130,9 @@ jobs:
|
|||
run: composer phpstan-baseline
|
||||
|
||||
- name: Commit updated basefile
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Update PHPStan basefile
|
||||
branch: ${{ github.head_ref }}
|
||||
|
||||
phpmd:
|
||||
|
||||
|
|
@ -144,36 +142,28 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.php-version }}
|
||||
tools: composer, cs2pr
|
||||
tools: phpmd
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Detect mess
|
||||
run: composer phpmd-ga
|
||||
run: phpmd . github phpmd.xml
|
||||
|
||||
- name: Update basefile
|
||||
run: composer phpmd-baseline
|
||||
run: phpmd . ansi phpmd.xml --generate-baseline
|
||||
|
||||
- name: Commit updated basefile
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Update PHPMD basefile
|
||||
branch: ${{ github.head_ref }}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
name: Typos Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
pull_request:
|
||||
branches: [ develop ]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
typos-check:
|
||||
|
||||
name: 'Typos check'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Search for misspellings
|
||||
uses: crate-ci/typos@master
|
||||
|
|
@ -16,18 +16,19 @@
|
|||
|
||||
# Ignore all files and directories starting with . or ~ or ._ or ending with ~
|
||||
.*
|
||||
!.typos.toml
|
||||
~*
|
||||
*~
|
||||
._*
|
||||
# but track
|
||||
!.babelrc.js
|
||||
!.browserslist
|
||||
!.browserslistrc
|
||||
!.editorconfig
|
||||
!.gitattributes
|
||||
!.github
|
||||
!.gitignore
|
||||
|
||||
# Ignore all files with .lock extentions
|
||||
# Ignore all files with .lock extensions
|
||||
*.lock
|
||||
# but track
|
||||
!composer.lock
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
[files]
|
||||
extend-exclude = [
|
||||
"css/",
|
||||
"fonts/",
|
||||
"js/*.min.js",
|
||||
"js/*.map",
|
||||
"js/theme*.js",
|
||||
"languages/",
|
||||
"src/sass/assets/bootstrap4/",
|
||||
"src/sass/assets/bootstrap5/",
|
||||
"src/sass/assets/fontawesome/"
|
||||
]
|
||||
|
|
@ -17,35 +17,42 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/phpcompatibility-wp": "^2.1.4",
|
||||
"phpmd/phpmd": "^2.13.0",
|
||||
"phpstan/phpstan": "^1.9.0",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"squizlabs/php_codesniffer": "^3.7.1",
|
||||
"szepeviktor/phpstan-wordpress": "^1.1.3",
|
||||
"phpmd/phpmd": "^2.14.1",
|
||||
"phpstan/phpstan": "^1.10.38",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.7.2",
|
||||
"szepeviktor/phpstan-wordpress": "^1.3.0",
|
||||
"wp-coding-standards/wpcs": "^2.3.0",
|
||||
"wptrt/wpthemereview": "^0.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"php-lint": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint --exclude vendor --exclude node_modules --exclude dist --exclude .git --exclude .phpstan-cache .",
|
||||
"phpcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -p",
|
||||
"phpcs-ga": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -n --report=checkstyle",
|
||||
"phpcs-fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf",
|
||||
"phpcs-config-set" : "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set installed_paths ../../phpcompatibility/php-compatibility,../../phpcompatibility/phpcompatibility-paragonie,../../phpcompatibility/phpcompatibility-wp,../../wp-coding-standards/wpcs,../../wptrt/wpthemereview",
|
||||
"phpmd": "@php ./vendor/phpmd/phpmd/src/bin/phpmd . ansi phpmd.xml",
|
||||
"phpmd-baseline": "@phpmd -- --generate-baseline",
|
||||
"phpmd-ga": "@php ./vendor/phpmd/phpmd/src/bin/phpmd . github phpmd.xml",
|
||||
"phpstan": "@php ./vendor/phpstan/phpstan/phpstan analyse -a src/phpstan/autoload.php",
|
||||
"phpstan-baseline": "@php ./vendor/phpstan/phpstan/phpstan analyse -a src/phpstan/autoload.php --generate-baseline",
|
||||
"post-install-cmd": "@phpcs-config-set",
|
||||
"post-update-cmd": "@phpcs-config-set"
|
||||
"php-lint": "parallel-lint --exclude vendor --exclude node_modules --exclude dist --exclude .git --exclude .phpstan-cache .",
|
||||
"phpcs": "phpcs -p",
|
||||
"phpcs-fix": "phpcbf",
|
||||
"phpmd": "phpmd . ansi phpmd.xml",
|
||||
"phpmd-baseline": "@phpmd --generate-baseline",
|
||||
"phpstan": "phpstan analyse",
|
||||
"phpstan-baseline": "@phpstan --generate-baseline --allow-empty-baseline"
|
||||
},
|
||||
"support": {
|
||||
"issues": "https://github.com/understrap/understrap/issues",
|
||||
"source": "https://github.com/understrap/understrap"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
},
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Understrap\\PHPStan\\": "src/phpstan"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -3750,7 +3750,13 @@ input[type=button].btn-block {
|
|||
.woocommerce-notices-wrapper .woocommerce-message .btn-group-toggle > a.button input[type=checkbox],
|
||||
.wpcf7 .btn-group-toggle > input[type=submit] input[type=checkbox],
|
||||
.btn-group-toggle > .btn-group > .btn input[type=radio],
|
||||
.btn-group-toggle > .btn-group > .btn input[type=checkbox] {
|
||||
.woocommerce-info .btn-group-toggle > .btn-group > a.button input[type=radio],
|
||||
.woocommerce-notices-wrapper .woocommerce-message .btn-group-toggle > .btn-group > a.button input[type=radio],
|
||||
.wpcf7 .btn-group-toggle > .btn-group > input[type=submit] input[type=radio],
|
||||
.btn-group-toggle > .btn-group > .btn input[type=checkbox],
|
||||
.woocommerce-info .btn-group-toggle > .btn-group > a.button input[type=checkbox],
|
||||
.woocommerce-notices-wrapper .woocommerce-message .btn-group-toggle > .btn-group > a.button input[type=checkbox],
|
||||
.wpcf7 .btn-group-toggle > .btn-group > input[type=submit] input[type=checkbox] {
|
||||
position: absolute;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
@charset "UTF-8";
|
||||
/*!
|
||||
* Bootstrap v5.2.2 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
|
|
@ -6672,7 +6672,6 @@ textarea.form-control-lg {
|
|||
display: block;
|
||||
}
|
||||
|
||||
/* rtl:begin:ignore */
|
||||
.carousel-item-next:not(.carousel-item-start),
|
||||
.active.carousel-item-end {
|
||||
transform: translateX(100%);
|
||||
|
|
@ -6683,7 +6682,6 @@ textarea.form-control-lg {
|
|||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
/* rtl:end:ignore */
|
||||
.carousel-fade .carousel-item {
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
|
|
@ -6942,8 +6940,6 @@ textarea.form-control-lg {
|
|||
border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.offcanvas-sm.offcanvas-end {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -6951,8 +6947,6 @@ textarea.form-control-lg {
|
|||
border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.offcanvas-sm.offcanvas-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -6962,8 +6956,6 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.offcanvas-sm.offcanvas-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
|
|
@ -6972,13 +6964,9 @@ textarea.form-control-lg {
|
|||
border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.offcanvas-sm.showing, .offcanvas-sm.show:not(.hiding) {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.offcanvas-sm.showing, .offcanvas-sm.hiding, .offcanvas-sm.show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -7030,8 +7018,6 @@ textarea.form-control-lg {
|
|||
border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.offcanvas-md.offcanvas-end {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7039,8 +7025,6 @@ textarea.form-control-lg {
|
|||
border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.offcanvas-md.offcanvas-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7050,8 +7034,6 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.offcanvas-md.offcanvas-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
|
|
@ -7060,13 +7042,9 @@ textarea.form-control-lg {
|
|||
border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.offcanvas-md.showing, .offcanvas-md.show:not(.hiding) {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.offcanvas-md.showing, .offcanvas-md.hiding, .offcanvas-md.show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -7118,8 +7096,6 @@ textarea.form-control-lg {
|
|||
border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
.offcanvas-lg.offcanvas-end {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7127,8 +7103,6 @@ textarea.form-control-lg {
|
|||
border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
.offcanvas-lg.offcanvas-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7138,8 +7112,6 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
.offcanvas-lg.offcanvas-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
|
|
@ -7148,13 +7120,9 @@ textarea.form-control-lg {
|
|||
border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
.offcanvas-lg.showing, .offcanvas-lg.show:not(.hiding) {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 991.98px) {
|
||||
.offcanvas-lg.showing, .offcanvas-lg.hiding, .offcanvas-lg.show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -7206,8 +7174,6 @@ textarea.form-control-lg {
|
|||
border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199.98px) {
|
||||
.offcanvas-xl.offcanvas-end {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7215,8 +7181,6 @@ textarea.form-control-lg {
|
|||
border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199.98px) {
|
||||
.offcanvas-xl.offcanvas-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7226,8 +7190,6 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199.98px) {
|
||||
.offcanvas-xl.offcanvas-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
|
|
@ -7236,13 +7198,9 @@ textarea.form-control-lg {
|
|||
border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199.98px) {
|
||||
.offcanvas-xl.showing, .offcanvas-xl.show:not(.hiding) {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1199.98px) {
|
||||
.offcanvas-xl.showing, .offcanvas-xl.hiding, .offcanvas-xl.show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -7294,8 +7252,6 @@ textarea.form-control-lg {
|
|||
border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1399.98px) {
|
||||
.offcanvas-xxl.offcanvas-end {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7303,8 +7259,6 @@ textarea.form-control-lg {
|
|||
border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1399.98px) {
|
||||
.offcanvas-xxl.offcanvas-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
|
@ -7314,8 +7268,6 @@ textarea.form-control-lg {
|
|||
border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1399.98px) {
|
||||
.offcanvas-xxl.offcanvas-bottom {
|
||||
right: 0;
|
||||
left: 0;
|
||||
|
|
@ -7324,13 +7276,9 @@ textarea.form-control-lg {
|
|||
border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1399.98px) {
|
||||
.offcanvas-xxl.showing, .offcanvas-xxl.show:not(.hiding) {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1399.98px) {
|
||||
.offcanvas-xxl.showing, .offcanvas-xxl.hiding, .offcanvas-xxl.show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -43,7 +43,11 @@ if ( ! function_exists( 'understrap_generate_color_palette' ) ) {
|
|||
$color_palette = array();
|
||||
|
||||
// Grabs the autogenerated color palette that we're pulling from our compiled bootstrap stylesheets.
|
||||
$color_palette_json = file_get_contents( get_theme_file_path( '/inc/editor-color-palette.json' ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
||||
$file_path = get_theme_file_path( '/inc/editor-color-palette.json' );
|
||||
if ( 'bootstrap4' === get_theme_mod( 'understrap_bootstrap_version', 'bootstrap4' ) ) {
|
||||
$file_path = get_theme_file_path( '/inc/editor-color-palette-bootstrap4.json' );
|
||||
}
|
||||
$color_palette_json = file_get_contents( $file_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
||||
|
||||
if ( $color_palette_json ) {
|
||||
$color_palette_json = json_decode( $color_palette_json, true );
|
||||
|
|
@ -63,7 +67,7 @@ if ( ! function_exists( 'understrap_generate_color_palette' ) ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Filters the default bootstrap color palette so it can be overriden by child themes or plugins when we add theme support for editor-color-palette.
|
||||
* Filters the default bootstrap color palette so it can be overridden by child themes or plugins when we add theme support for editor-color-palette.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) {
|
|||
* NOTE: linkmod and icon class arrays are passed by reference and
|
||||
* are maybe modified before being used later in this function.
|
||||
*/
|
||||
$classes = self::seporate_linkmods_and_icons_from_classes( $classes, $linkmod_classes, $icon_classes, $depth );
|
||||
$classes = self::separate_linkmods_and_icons_from_classes( $classes, $linkmod_classes, $icon_classes, $depth );
|
||||
|
||||
// Join any icon classes plucked from $classes into a string.
|
||||
$icon_class_string = join( ' ', $icon_classes );
|
||||
|
|
@ -407,7 +407,7 @@ if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) {
|
|||
*
|
||||
* @return array $classes a maybe modified array of classnames.
|
||||
*/
|
||||
private function seporate_linkmods_and_icons_from_classes( $classes, &$linkmod_classes, &$icon_classes, $depth ) {
|
||||
private function separate_linkmods_and_icons_from_classes( $classes, &$linkmod_classes, &$icon_classes, $depth ) {
|
||||
// Loop through $classes array to find linkmod or icon classes.
|
||||
foreach ( $classes as $key => $class ) {
|
||||
// If any special classes are found, store the class in it's
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
{"--blue":"#007bff","--indigo":"#6610f2","--purple":"#5533ff","--pink":"#e83e8c","--red":"#dc3545","--orange":"#fd7e14","--yellow":"#ffc107","--green":"#28a745","--teal":"#20c997","--cyan":"#17a2b8","--white":"#fff","--gray":"#6c757d","--gray-dark":"#343a40"}
|
||||
|
|
@ -1 +1 @@
|
|||
{"--blue":"#007bff","--indigo":"#6610f2","--purple":"#5533ff","--pink":"#e83e8c","--red":"#dc3545","--orange":"#fd7e14","--yellow":"#ffc107","--green":"#28a745","--teal":"#20c997","--cyan":"#17a2b8","--white":"#fff","--gray":"#6c757d","--gray-dark":"#343a40"}
|
||||
{"--bs-blue":"#0d6efd","--bs-indigo":"#6610f2","--bs-purple":"#5533ff","--bs-pink":"#d63384","--bs-red":"#dc3545","--bs-orange":"#fd7e14","--bs-yellow":"#ffc107","--bs-green":"#198754","--bs-teal":"#20c997","--bs-cyan":"#0dcaf0","--bs-white":"#fff","--bs-gray":"#6c757d","--bs-gray-dark":"#343a40"}
|
||||
|
|
@ -82,6 +82,18 @@ if ( ! function_exists( 'understrap_tiny_mce_before_init' ) ) {
|
|||
}
|
||||
|
||||
$settings['style_formats'] = wp_json_encode( $style_formats );
|
||||
|
||||
/*
|
||||
* Fix TinyMCE editor body margin that is set to 0 by Bootstrap's
|
||||
* _reboot.scss (v4 & v5). `margin: 9px 10px` is the value used by WP's
|
||||
* TinyMCE skin (/wp-includes/js/tinymce/skins/wordpress/wp-content.css).
|
||||
*/
|
||||
if ( isset( $settings['content_style'] ) ) {
|
||||
$settings['content_style'] .= ' body#tinymce { margin: 9px 10px; }';
|
||||
} else {
|
||||
$settings['content_style'] = 'body#tinymce { margin: 9px 10px; }';
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
|
|||
$theme_scripts = "/js/theme-bootstrap4{$suffix}.js";
|
||||
}
|
||||
|
||||
$css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles ); // @phpstan-ignore-line -- file exists
|
||||
$css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles );
|
||||
wp_enqueue_style( 'understrap-styles', get_template_directory_uri() . $theme_styles, array(), $css_version );
|
||||
|
||||
// Fix that the offcanvas close icon is hidden behind the admin bar.
|
||||
|
|
@ -37,7 +37,7 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
|
|||
|
||||
wp_enqueue_script( 'jquery' );
|
||||
|
||||
$js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts ); // @phpstan-ignore-line -- file exists
|
||||
$js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts );
|
||||
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . $theme_scripts, array(), $js_version, true );
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
|
|
@ -49,7 +49,7 @@ add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
|||
|
||||
if ( ! function_exists( 'understrap_offcanvas_admin_bar_inline_styles' ) ) {
|
||||
/**
|
||||
* Add inline styles for the offcanvas component if the admin bar is visibile.
|
||||
* Add inline styles for the offcanvas component if the admin bar is visible.
|
||||
*
|
||||
* Fixes that the offcanvas close icon is hidden behind the admin bar.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ if ( ! function_exists( 'understrap_default_body_attributes' ) ) {
|
|||
}
|
||||
add_filter( 'understrap_body_attributes', 'understrap_default_body_attributes' );
|
||||
|
||||
// Escapes all occurances of 'the_archive_description'.
|
||||
// Escapes all occurrences of 'the_archive_description'.
|
||||
add_filter( 'get_the_archive_description', 'understrap_escape_the_archive_description' );
|
||||
|
||||
if ( ! function_exists( 'understrap_escape_the_archive_description' ) ) {
|
||||
|
|
@ -150,10 +150,10 @@ if ( ! function_exists( 'understrap_escape_the_archive_description' ) ) {
|
|||
}
|
||||
} // End of if function_exists( 'understrap_escape_the_archive_description' ).
|
||||
|
||||
// Escapes all occurances of 'the_title()' and 'get_the_title()'.
|
||||
// Escapes all occurrences of 'the_title()' and 'get_the_title()'.
|
||||
add_filter( 'the_title', 'understrap_kses_title' );
|
||||
|
||||
// Escapes all occurances of 'the_archive_title' and 'get_the_archive_title()'.
|
||||
// Escapes all occurrences of 'the_archive_title' and 'get_the_archive_title()'.
|
||||
add_filter( 'get_the_archive_title', 'understrap_kses_title' );
|
||||
|
||||
if ( ! function_exists( 'understrap_kses_title' ) ) {
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ if ( ! function_exists( 'understrap_add_site_info' ) ) {
|
|||
sprintf(
|
||||
/* translators: 1: Theme name, 2: Theme author */
|
||||
esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ),
|
||||
$the_theme->get( 'Name' ), // @phpstan-ignore-line -- theme exists
|
||||
$the_theme->get( 'Name' ),
|
||||
'<a href="' . esc_url( __( 'https://understrap.com', 'understrap' ) ) . '">understrap.com</a>'
|
||||
),
|
||||
sprintf(
|
||||
/* translators: Theme version */
|
||||
esc_html__( 'Version: %s', 'understrap' ),
|
||||
$the_theme->get( 'Version' ) // @phpstan-ignore-line -- theme exists
|
||||
$the_theme->get( 'Version' )
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ if ( ! function_exists( 'understrap_body_attributes' ) ) {
|
|||
* @param array $atts An associative array of attributes.
|
||||
*/
|
||||
$atts = array_unique( apply_filters( 'understrap_body_attributes', $atts = array() ) );
|
||||
if ( ! is_array( $atts ) || empty( $atts ) ) {
|
||||
if ( empty( $atts ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -322,16 +322,30 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
|
|||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @link https://developer.wordpress.org/reference/functions/wp_link_pages/
|
||||
*
|
||||
* @return void|string Formatted output in HTML.
|
||||
*/
|
||||
function understrap_link_pages() {
|
||||
$args = apply_filters(
|
||||
'understrap_link_pages_args',
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
$args = array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters the arguments used in retrieving page links for paginated posts.
|
||||
*
|
||||
* Runs before the 'wp_link_pages_args' hook.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
$args = apply_filters_deprecated(
|
||||
'understrap_link_pages_args',
|
||||
array( $args ),
|
||||
'1.2.3',
|
||||
'wp_link_pages_args'
|
||||
);
|
||||
|
||||
wp_link_pages( $args );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ if ( ! function_exists( 'understrap_wc_form_field_radio' ) ) {
|
|||
* If `$args['label']` is set a `<label>` tag is prepended to the radio
|
||||
* fields. `$args['label_class']` is used for the class attribute of this
|
||||
* tag and the class attribute of the actual input labels. Hence, we must
|
||||
* remove the first occurance of the label class added via
|
||||
* remove the first occurrence of the label class added via
|
||||
* `understrap_wc_form_field_args()` that is meant for input labels only.
|
||||
*
|
||||
* @param string $field The field's HTML incl. the wrapper element.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
182
js/theme.js
182
js/theme.js
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Understrap v1.2.2 (https://understrap.com)
|
||||
* Copyright 2013-2023 The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)
|
||||
* Understrap v1.2.3-beta.1 (https://understrap.com)
|
||||
* Copyright 2013-2023 The Understrap Authors (https://github.com/understrap/understrap/graphs/contributors)
|
||||
* Licensed under GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/index.js
|
||||
* Bootstrap (v5.2.3): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const MAX_UID = 1_000_000;
|
||||
const MAX_UID = 1000000;
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend';
|
||||
|
||||
|
|
@ -279,11 +279,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): dom/event-handler.js
|
||||
* Bootstrap (v5.2.3): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -489,7 +490,7 @@
|
|||
for (const [key, value] of Object.entries(meta || {})) {
|
||||
try {
|
||||
obj[key] = value;
|
||||
} catch {
|
||||
} catch (_unused) {
|
||||
Object.defineProperty(obj, key, {
|
||||
configurable: true,
|
||||
get() {
|
||||
|
|
@ -503,7 +504,7 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): dom/data.js
|
||||
* Bootstrap (v5.2.3): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -551,7 +552,7 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): dom/manipulator.js
|
||||
* Bootstrap (v5.2.3): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -574,7 +575,7 @@
|
|||
}
|
||||
try {
|
||||
return JSON.parse(decodeURIComponent(value));
|
||||
} catch {
|
||||
} catch (_unused) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
|
@ -608,11 +609,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/config.js
|
||||
* Bootstrap (v5.2.3): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
|
|
@ -661,16 +663,17 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): base-component.js
|
||||
* Bootstrap (v5.2.3): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.2';
|
||||
const VERSION = '5.2.3';
|
||||
|
||||
/**
|
||||
* Class definition
|
||||
|
|
@ -729,10 +732,11 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/component-functions.js
|
||||
* Bootstrap (v5.2.3): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const enableDismissTrigger = (component, method = 'hide') => {
|
||||
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
|
||||
const name = component.NAME;
|
||||
|
|
@ -753,11 +757,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): alert.js
|
||||
* Bootstrap (v5.2.3): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -827,11 +832,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): button.js
|
||||
* Bootstrap (v5.2.3): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -890,11 +896,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.3): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -947,11 +954,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/swipe.js
|
||||
* Bootstrap (v5.2.3): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -1066,11 +1074,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): carousel.js
|
||||
* Bootstrap (v5.2.3): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -1438,11 +1447,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): collapse.js
|
||||
* Bootstrap (v5.2.3): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -1821,7 +1831,7 @@
|
|||
|
||||
function getUAString() {
|
||||
var uaData = navigator.userAgentData;
|
||||
if (uaData != null && uaData.brands) {
|
||||
if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
|
||||
return uaData.brands.map(function (item) {
|
||||
return item.brand + "/" + item.version;
|
||||
}).join(' ');
|
||||
|
|
@ -2108,10 +2118,9 @@
|
|||
// Zooming can change the DPR, but it seems to report a value that will
|
||||
// cleanly divide the values into the appropriate subpixels.
|
||||
|
||||
function roundOffsetsByDPR(_ref) {
|
||||
function roundOffsetsByDPR(_ref, win) {
|
||||
var x = _ref.x,
|
||||
y = _ref.y;
|
||||
var win = window;
|
||||
var dpr = win.devicePixelRatio || 1;
|
||||
return {
|
||||
x: round(x * dpr) / dpr || 0,
|
||||
|
|
@ -2184,7 +2193,7 @@
|
|||
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
||||
x: x,
|
||||
y: y
|
||||
}) : {
|
||||
}, getWindow(popper)) : {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
|
|
@ -3169,7 +3178,7 @@
|
|||
|
||||
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
||||
return m.enabled;
|
||||
}); // Validate the provided modifiers so that the consumer will get warned
|
||||
});
|
||||
runModifierEffects();
|
||||
return instance.update();
|
||||
},
|
||||
|
|
@ -3257,11 +3266,11 @@
|
|||
// one.
|
||||
|
||||
function runModifierEffects() {
|
||||
state.orderedModifiers.forEach(function (_ref3) {
|
||||
var name = _ref3.name,
|
||||
_ref3$options = _ref3.options,
|
||||
options = _ref3$options === void 0 ? {} : _ref3$options,
|
||||
effect = _ref3.effect;
|
||||
state.orderedModifiers.forEach(function (_ref) {
|
||||
var name = _ref.name,
|
||||
_ref$options = _ref.options,
|
||||
options = _ref$options === void 0 ? {} : _ref$options,
|
||||
effect = _ref.effect;
|
||||
if (typeof effect === 'function') {
|
||||
var cleanupFn = effect({
|
||||
state: state,
|
||||
|
|
@ -3297,53 +3306,54 @@
|
|||
|
||||
var Popper = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
popperGenerator: popperGenerator,
|
||||
detectOverflow: detectOverflow,
|
||||
createPopperBase: createPopper$2,
|
||||
createPopper: createPopper,
|
||||
createPopperLite: createPopper$1,
|
||||
top: top,
|
||||
bottom: bottom,
|
||||
right: right,
|
||||
left: left,
|
||||
auto: auto,
|
||||
basePlacements: basePlacements,
|
||||
start: start,
|
||||
end: end,
|
||||
clippingParents: clippingParents,
|
||||
viewport: viewport,
|
||||
popper: popper,
|
||||
reference: reference,
|
||||
variationPlacements: variationPlacements,
|
||||
placements: placements,
|
||||
beforeRead: beforeRead,
|
||||
read: read,
|
||||
afterRead: afterRead,
|
||||
beforeMain: beforeMain,
|
||||
main: main,
|
||||
afterMain: afterMain,
|
||||
beforeWrite: beforeWrite,
|
||||
write: write,
|
||||
afterRead: afterRead,
|
||||
afterWrite: afterWrite,
|
||||
modifierPhases: modifierPhases,
|
||||
applyStyles: applyStyles$1,
|
||||
arrow: arrow$1,
|
||||
auto: auto,
|
||||
basePlacements: basePlacements,
|
||||
beforeMain: beforeMain,
|
||||
beforeRead: beforeRead,
|
||||
beforeWrite: beforeWrite,
|
||||
bottom: bottom,
|
||||
clippingParents: clippingParents,
|
||||
computeStyles: computeStyles$1,
|
||||
createPopper: createPopper,
|
||||
createPopperBase: createPopper$2,
|
||||
createPopperLite: createPopper$1,
|
||||
detectOverflow: detectOverflow,
|
||||
end: end,
|
||||
eventListeners: eventListeners,
|
||||
flip: flip$1,
|
||||
hide: hide$1,
|
||||
left: left,
|
||||
main: main,
|
||||
modifierPhases: modifierPhases,
|
||||
offset: offset$1,
|
||||
placements: placements,
|
||||
popper: popper,
|
||||
popperGenerator: popperGenerator,
|
||||
popperOffsets: popperOffsets$1,
|
||||
preventOverflow: preventOverflow$1
|
||||
preventOverflow: preventOverflow$1,
|
||||
read: read,
|
||||
reference: reference,
|
||||
right: right,
|
||||
start: start,
|
||||
top: top,
|
||||
variationPlacements: variationPlacements,
|
||||
viewport: viewport,
|
||||
write: write
|
||||
});
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): dropdown.js
|
||||
* Bootstrap (v5.2.3): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -3706,11 +3716,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/scrollBar.js
|
||||
* Bootstrap (v5.2.3): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -3803,11 +3814,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/backdrop.js
|
||||
* Bootstrap (v5.2.3): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -3927,11 +3939,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/focustrap.js
|
||||
* Bootstrap (v5.2.3): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -4025,11 +4038,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): modal.js
|
||||
* Bootstrap (v5.2.3): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -4331,11 +4345,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): offcanvas.js
|
||||
* Bootstrap (v5.2.3): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -4561,7 +4576,7 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/sanitizer.js
|
||||
* Bootstrap (v5.2.3): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -4656,11 +4671,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): util/template-factory.js
|
||||
* Bootstrap (v5.2.3): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -4791,11 +4807,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): tooltip.js
|
||||
* Bootstrap (v5.2.3): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -4931,9 +4948,6 @@
|
|||
dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
||||
if (this.tip) {
|
||||
this.tip.remove();
|
||||
}
|
||||
if (this._element.getAttribute('data-bs-original-title')) {
|
||||
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
||||
}
|
||||
|
|
@ -4955,10 +4969,7 @@
|
|||
}
|
||||
|
||||
// todo v6 remove this OR make it optional
|
||||
if (this.tip) {
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
this._disposePopper();
|
||||
const tip = this._getTipElement();
|
||||
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
||||
const {
|
||||
|
|
@ -4968,11 +4979,7 @@
|
|||
container.append(tip);
|
||||
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
|
||||
}
|
||||
if (this._popper) {
|
||||
this._popper.update();
|
||||
} else {
|
||||
this._popper = this._createPopper(tip);
|
||||
}
|
||||
this._popper = this._createPopper(tip);
|
||||
tip.classList.add(CLASS_NAME_SHOW$2);
|
||||
|
||||
// If this is a touch-enabled device we add extra
|
||||
|
|
@ -5021,11 +5028,10 @@
|
|||
return;
|
||||
}
|
||||
if (!this._isHovered) {
|
||||
tip.remove();
|
||||
this._disposePopper();
|
||||
}
|
||||
this._element.removeAttribute('aria-describedby');
|
||||
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));
|
||||
this._disposePopper();
|
||||
};
|
||||
this._queueCallback(complete, this.tip, this._isAnimated());
|
||||
}
|
||||
|
|
@ -5284,6 +5290,10 @@
|
|||
this._popper.destroy();
|
||||
this._popper = null;
|
||||
}
|
||||
if (this.tip) {
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
|
@ -5309,11 +5319,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): popover.js
|
||||
* Bootstrap (v5.2.3): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -5389,11 +5400,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): scrollspy.js
|
||||
* Bootstrap (v5.2.3): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -5648,11 +5660,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): tab.js
|
||||
* Bootstrap (v5.2.3): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
@ -5909,11 +5922,12 @@
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.2): toast.js
|
||||
* Bootstrap (v5.2.3): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
47
package.json
47
package.json
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "understrap",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3-beta.1",
|
||||
"description": "WordPress Theme framework",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
@ -32,7 +32,8 @@
|
|||
"extends": "./src/build/babel.config.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=18",
|
||||
"npm": ">=8.6.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
"bootstrap",
|
||||
"underscores"
|
||||
],
|
||||
"author": "The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)",
|
||||
"author": "The Understrap Authors (https://github.com/understrap/understrap/graphs/contributors)",
|
||||
"license": "GPL-3.0",
|
||||
"licenseUrl": "https://www.gnu.org/licenses/gpl-3.0.html",
|
||||
"bugs": {
|
||||
|
|
@ -53,30 +54,30 @@
|
|||
},
|
||||
"homepage": "https://understrap.com",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.19.6",
|
||||
"@babel/preset-env": "^7.19.4",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@rollup/plugin-babel": "^6.0.2",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-multi-entry": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"bootstrap": "^5.2.2",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-commonjs": "^25.0.5",
|
||||
"@rollup/plugin-multi-entry": "^6.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.3",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"bootstrap": "~5.2.3",
|
||||
"bootstrap4": "npm:bootstrap@^4.6.2",
|
||||
"browser-sync": "^2.27.10",
|
||||
"browserslist": "^4.21.4",
|
||||
"caniuse-lite": "^1.0.30001430",
|
||||
"clean-css-cli": "^5.6.1",
|
||||
"browser-sync": "^2.29.3",
|
||||
"browserslist": "^4.22.1",
|
||||
"caniuse-lite": "^1.0.30001547",
|
||||
"clean-css-cli": "^5.6.2",
|
||||
"font-awesome": "^4.7.0",
|
||||
"nodemon": "^2.0.20",
|
||||
"nodemon": "^3.0.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss": "^8.4.18",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"postcss-understrap-palette-generator": "git+https://github.com/understrap/postcss-understrap-palette-generator.git",
|
||||
"rollup": "^3.2.5",
|
||||
"sass": "^1.56.0",
|
||||
"terser": "^5.15.1"
|
||||
"rollup": "^4.0.2",
|
||||
"sass": "^1.69.3",
|
||||
"terser": "^5.21.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<description>Apply WordPress Coding Standards to Understrap</description>
|
||||
|
||||
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
|
||||
<arg name="cache" value=".phpcs-cache"/>
|
||||
<arg name="cache" value=".phpcs-cache.json"/>
|
||||
|
||||
<!-- Strip the filepaths down to the relevant bit. -->
|
||||
<arg name="basepath" value="./"/>
|
||||
|
|
@ -89,12 +89,17 @@
|
|||
<exclude phpcs-only="true" name="Generic.Files.LineEndings"/>
|
||||
</rule>
|
||||
|
||||
<!-- Ignore mixed line-endings warnings -->
|
||||
<rule ref="Internal.LineEndings.Mixed">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Use the WPThemeReview Ruleset -->
|
||||
<rule ref="WPThemeReview" />
|
||||
|
||||
<!--
|
||||
Exclude checking for shortened URLs in Bootstrap's js. files.
|
||||
Also exlude theme.js which includes bootstrap.js.
|
||||
Also exclude theme.js which includes bootstrap.js.
|
||||
-->
|
||||
<rule ref="WPThemeReview.Privacy.ShortenedURLs.Found">
|
||||
<exclude-pattern>/js/theme*\.js</exclude-pattern>
|
||||
|
|
|
|||
|
|
@ -55,3 +55,5 @@ parameters:
|
|||
- '#Function understrap_tags_list\(\) has no return type specified.#'
|
||||
- '#Function understrap_comments_popup_link\(\) has no return type specified.#'
|
||||
- '#Function understrap_offcanvas_admin_bar_inline_styles\(\) has no return type specified.#'
|
||||
# temporary:
|
||||
- '#Parameter \#2 ...\$values of function sprintf expects bool\|float\|int\|string\|null, string\|void given.#'
|
||||
|
|
|
|||
|
|
@ -8,27 +8,25 @@
|
|||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
if ( ! is_active_sidebar( 'footerfull' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'footerfull' ) ) : ?>
|
||||
<!-- ******************* The Footer Full-width Widget Area ******************* -->
|
||||
|
||||
<!-- ******************* The Footer Full-width Widget Area ******************* -->
|
||||
<div class="wrapper" id="wrapper-footer-full" role="complementary">
|
||||
|
||||
<div class="wrapper" id="wrapper-footer-full" role="complementary">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
|
||||
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php dynamic_sidebar( 'footerfull' ); ?>
|
||||
|
||||
</div>
|
||||
<?php dynamic_sidebar( 'footerfull' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- #wrapper-footer-full -->
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
</div><!-- #wrapper-footer-full -->
|
||||
|
|
|
|||
|
|
@ -7,37 +7,36 @@
|
|||
|
||||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! is_active_sidebar( 'hero' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'hero' ) ) : ?>
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">
|
||||
|
||||
<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">
|
||||
<div class="carousel-inner">
|
||||
|
||||
<div class="carousel-inner">
|
||||
<?php dynamic_sidebar( 'hero' ); ?>
|
||||
|
||||
<?php dynamic_sidebar( 'hero' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">
|
||||
|
||||
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>
|
||||
|
||||
<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>
|
||||
</a>
|
||||
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">
|
||||
|
||||
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>
|
||||
|
||||
<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>
|
||||
</a>
|
||||
|
||||
</a>
|
||||
|
||||
</div><!-- .carousel -->
|
||||
|
||||
<?php
|
||||
endif;
|
||||
</div><!-- .carousel -->
|
||||
|
|
|
|||
|
|
@ -8,26 +8,25 @@
|
|||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! is_active_sidebar( 'statichero' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'statichero' ) ) : ?>
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
<div class="wrapper" id="wrapper-static-hero">
|
||||
|
||||
<div class="wrapper" id="wrapper-static-hero">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
|
||||
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php dynamic_sidebar( 'statichero' ); ?>
|
||||
|
||||
</div>
|
||||
<?php dynamic_sidebar( 'statichero' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- #wrapper-static-hero -->
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
</div><!-- #wrapper-static-hero -->
|
||||
|
|
|
|||
|
|
@ -1,22 +1,7 @@
|
|||
const { promises: fs } = require( 'fs' );
|
||||
const path = require( 'path' );
|
||||
|
||||
async function copyDir( src, dest ) {
|
||||
await fs.mkdir( dest, { recursive: true } );
|
||||
const entries = await fs.readdir( src, { withFileTypes: true } );
|
||||
|
||||
for ( let entry of entries ) {
|
||||
let srcPath = path.join( src, entry.name );
|
||||
let destPath = path.join( dest, entry.name );
|
||||
|
||||
entry.isDirectory()
|
||||
? await copyDir( srcPath, destPath )
|
||||
: await fs.copyFile( srcPath, destPath );
|
||||
}
|
||||
}
|
||||
const utils = require( './utils' );
|
||||
|
||||
// Copy all Bootstrap SCSS files.
|
||||
copyDir( './node_modules/bootstrap4/scss', './src/sass/assets/bootstrap4' );
|
||||
copyDir( './node_modules/bootstrap/scss', './src/sass/assets/bootstrap5' );
|
||||
utils.copyDir( './node_modules/bootstrap4/scss', './src/sass/assets/bootstrap4' );
|
||||
utils.copyDir( './node_modules/bootstrap/scss', './src/sass/assets/bootstrap5' );
|
||||
// Copy all Font Awesome SCSS files.
|
||||
copyDir( './node_modules/font-awesome/scss', './src/sass/assets/fontawesome' );
|
||||
utils.copyDir( './node_modules/font-awesome/scss', './src/sass/assets/fontawesome' );
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
const { promises: fs } = require( 'fs' );
|
||||
const path = require( 'path' );
|
||||
const utils = require( './utils' );
|
||||
const pkg = require( '../../package.json' );
|
||||
const ignore = [
|
||||
'dist',
|
||||
'node_modules',
|
||||
'src',
|
||||
'vendor',
|
||||
'composer.json',
|
||||
'composer.lock',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'phpcs.xml.dist',
|
||||
'phpmd.baseline.xml',
|
||||
'phpmd.xml',
|
||||
'phpstan-baseline.neon',
|
||||
'phpstan.neon.dist',
|
||||
];
|
||||
|
||||
async function copyDir( src, dest ) {
|
||||
await fs.mkdir( dest, { recursive: true } );
|
||||
let entries = await fs.readdir( src, { withFileTypes: true } );
|
||||
// Exclude all dot files and directories.
|
||||
entries = entries.filter( dirent => ! dirent.name.startsWith('.') );
|
||||
const ignore = [
|
||||
'dist',
|
||||
'node_modules',
|
||||
'src',
|
||||
'vendor',
|
||||
'composer.json',
|
||||
'composer.lock',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'phpcs.xml.dist',
|
||||
'phpmd.baseline.xml',
|
||||
'phpmd.xml',
|
||||
'phpstan-baseline.neon',
|
||||
'phpstan.neon.dist',
|
||||
];
|
||||
|
||||
for ( const entry of entries ) {
|
||||
if ( ignore.indexOf( entry.name ) != -1 ) {
|
||||
continue;
|
||||
}
|
||||
let srcPath = path.join( src, entry.name );
|
||||
let destPath = path.join( dest, entry.name );
|
||||
|
||||
entry.isDirectory()
|
||||
? await copyDir( srcPath, destPath )
|
||||
: await fs.copyFile( srcPath, destPath );
|
||||
}
|
||||
}
|
||||
|
||||
copyDir( './', `./dist/${ pkg.name }-${ pkg.version }` );
|
||||
utils.copyDir( './', `./dist/${ pkg.name }-${ pkg.version }`, ignore );
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const colors = [
|
|||
|
||||
const BS4 = process.argv[ process.argv.length - 1 ] === 'BS4';
|
||||
const colorInfix = BS4 ? '' : 'bs-';
|
||||
const output = 'inc/editor-color-palette' + ( BS4 ? '-bootstrap4' : '' ) + '.json';
|
||||
|
||||
module.exports = ( ctx ) => {
|
||||
return {
|
||||
|
|
@ -35,6 +36,7 @@ module.exports = ( ctx ) => {
|
|||
},
|
||||
'postcss-understrap-palette-generator': {
|
||||
colors: colors.map( ( x ) => `--${ colorInfix }${ x }` ),
|
||||
output: output,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const replace = require( '@rollup/plugin-replace' );
|
|||
* Internal dependencies
|
||||
*/
|
||||
const banner = require( './banner.js' );
|
||||
const babelConfig = require( './babel.config' );
|
||||
|
||||
// Determine if we want to build for Bootstrap v4 or v5.
|
||||
const BS4 = process.argv[ process.argv.length - 1 ] === 'BS4';
|
||||
|
|
@ -39,6 +40,7 @@ const external = [ 'jquery' ];
|
|||
|
||||
const plugins = [
|
||||
babel( {
|
||||
presets: babelConfig.presets,
|
||||
browserslistEnv: `bs${ bsVersion }`,
|
||||
// Include the helpers in the bundle, at most one copy of each.
|
||||
babelHelpers: 'bundled',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
const { promises: fs } = require( 'fs' );
|
||||
const path = require( 'path' );
|
||||
|
||||
module.exports.copyDir = async function copyDir( src, dest, ignore ) {
|
||||
await fs.mkdir( dest, { recursive: true } );
|
||||
let entries = await fs.readdir( src, { withFileTypes: true } );
|
||||
// Exclude all dot files and directories.
|
||||
entries = entries.filter( dirent => ! dirent.name.startsWith('.') );
|
||||
ignore = ignore || [];
|
||||
|
||||
for ( const entry of entries ) {
|
||||
if ( ignore.indexOf( entry.name ) != -1 ) {
|
||||
continue;
|
||||
}
|
||||
const srcPath = path.join( src, entry.name );
|
||||
const destPath = path.join( dest, entry.name );
|
||||
|
||||
entry.isDirectory()
|
||||
? await copyDir( srcPath, destPath )
|
||||
: await fs.copyFile( srcPath, destPath );
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ use PhpParser\Node\Expr\FuncCall;
|
|||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\FunctionReflection;
|
||||
use PHPStan\Reflection\ParametersAcceptorSelector;
|
||||
use PHPStan\Type\Constant\ConstantStringType;
|
||||
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
|
||||
use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\StringType;
|
||||
|
|
@ -54,14 +53,20 @@ class GetThemeModReturnType implements DynamicFunctionReturnTypeExtension {
|
|||
$functionReflection->getVariants()
|
||||
)->getReturnType();
|
||||
|
||||
if (!$argType instanceof ConstantStringType) {
|
||||
return $defaultType;
|
||||
if (count($argType->getConstantStrings()) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Return the default value if it is not an Understrap specific theme mod.
|
||||
if (!in_array($argType->getValue(), self::$themeMods, true)) {
|
||||
return $defaultType;
|
||||
$returnType = [];
|
||||
foreach ($argType->getConstantStrings() as $constantString) {
|
||||
if (in_array($constantString->getValue(), self::$themeMods, true)) {
|
||||
$returnType[] = new StringType();
|
||||
} else {
|
||||
$returnType[] = $defaultType;
|
||||
}
|
||||
}
|
||||
$returnType = TypeCombinator::union(...$returnType);
|
||||
|
||||
|
||||
// Without second argument the default value is false, but can be filtered.
|
||||
$defaultType = new MixedType();
|
||||
|
|
@ -69,6 +74,6 @@ class GetThemeModReturnType implements DynamicFunctionReturnTypeExtension {
|
|||
$defaultType = $scope->getType($functionCall->getArgs()[1]->value);
|
||||
}
|
||||
|
||||
return TypeCombinator::union(new StringType(), $defaultType);
|
||||
return TypeCombinator::union($returnType, $defaultType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Load PHPStan extensions
|
||||
*
|
||||
* @package Understrap
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/GetThemeModReturnType.php';
|
||||
|
|
@ -42,7 +42,6 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
/* rtl:begin:ignore */
|
||||
.carousel-item-next:not(.carousel-item-start),
|
||||
.active.carousel-item-end {
|
||||
transform: translateX(100%);
|
||||
|
|
@ -53,8 +52,6 @@
|
|||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
/* rtl:end:ignore */
|
||||
|
||||
|
||||
//
|
||||
// Alternate transitions
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|||
// Return opaque color
|
||||
// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
|
||||
@function opaque($background, $foreground) {
|
||||
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
|
||||
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
|
||||
}
|
||||
|
||||
// scss-docs-start color-functions
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
@import "mixins";
|
||||
@import "utilities";
|
||||
|
||||
// Layout & components
|
||||
@import "root";
|
||||
|
||||
// Helpers
|
||||
@import "helpers";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@mixin bsBanner($file) {
|
||||
/*!
|
||||
* Bootstrap #{$file} v5.2.2 (https://getbootstrap.com/)
|
||||
* Bootstrap #{$file} v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$bootstrap4: true; // <--- Do not delete this variable. It is used in theme/_blocks.scss and theme/_understrap.scss.
|
||||
$bootstrap4: true; // <--- Do not delete this variable. It is used in theme/_blocks.scss and theme/_understrap.scss.
|
||||
|
||||
// Add your own editor styles here or import additional files
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ $bootstrap4: true; // <--- Do not delete this variable
|
|||
@import "assets/bootstrap4/root";
|
||||
@import "assets/bootstrap4/tables";
|
||||
@import "assets/bootstrap4/images";
|
||||
@import "assets/bootstrap4/grid";
|
||||
|
||||
// Set up basic typography
|
||||
@import "assets/bootstrap4/type";
|
||||
|
|
@ -24,15 +25,21 @@ $bootstrap4: true; // <--- Do not delete this variable
|
|||
@import "theme/colors";
|
||||
@import "theme/blocks";
|
||||
|
||||
|
||||
|
||||
// Fixes Gutenberg's cover block color picker.
|
||||
.components-circular-option-picker__option {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
// Matches the page title font weight.
|
||||
.editor-post-title .editor-post-title__input{
|
||||
.editor-post-title .editor-post-title__input {
|
||||
font-size: $h1-font-size;
|
||||
font-weight: $headings-font-weight;
|
||||
}
|
||||
|
||||
@each $breakpoint, $container-max-width in $container-max-widths {
|
||||
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
||||
html :where(.wp-block) {
|
||||
max-width: $container-max-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
@import "assets/bootstrap5/root";
|
||||
@import "assets/bootstrap5/tables";
|
||||
@import "assets/bootstrap5/images";
|
||||
@import "assets/bootstrap5/containers";
|
||||
@import "assets/bootstrap5/grid";
|
||||
|
||||
// Set up basic typography
|
||||
@import "assets/bootstrap5/type";
|
||||
|
|
@ -23,15 +25,21 @@
|
|||
@import "theme/colors";
|
||||
@import "theme/blocks";
|
||||
|
||||
|
||||
|
||||
// Fixes Gutenberg's cover block color picker.
|
||||
.components-circular-option-picker__option {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
// Matches the page title font weight.
|
||||
.editor-post-title .editor-post-title__input{
|
||||
.editor-post-title .editor-post-title__input {
|
||||
font-size: $h1-font-size;
|
||||
font-weight: $headings-font-weight;
|
||||
}
|
||||
|
||||
@each $breakpoint, $container-max-width in $container-max-widths {
|
||||
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
||||
html :where(.wp-block) {
|
||||
max-width: $container-max-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Author: Howard Development & Consulting
|
|||
Author URI: https://howarddc.com
|
||||
GitHub Theme URI: https://github.com/understrap/understrap
|
||||
Description: The renowned WordPress starter theme framework that combined Underscores and Bootstrap. Trusted by more than 100,000 developers for building handcrafted, custom WordPress sites.
|
||||
Version: 1.2.2
|
||||
Version: 1.2.3-beta.1
|
||||
Requires at least: 5.0
|
||||
Tested up to: 6.1
|
||||
Requires PHP: 5.2
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
* @version 7.9.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
|
@ -40,6 +40,15 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
/**
|
||||
* Filter the product name.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @param string $product_name Name of the product in the cart.
|
||||
* @param array $cart_item The product in the cart.
|
||||
* @param string $cart_item_key Key for the product in the cart.
|
||||
*/
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
|
|
@ -53,7 +62,8 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
sprintf(
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
esc_html__( 'Remove this item', 'woocommerce' ),
|
||||
/* translators: %s is the product name */
|
||||
esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
),
|
||||
|
|
@ -67,9 +77,9 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $thumbnail; // PHPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
|
@ -77,15 +87,20 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ' );
|
||||
echo wp_kses_post( $product_name . ' ' );
|
||||
} else {
|
||||
/**
|
||||
* This filter is documented above.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
|
||||
|
||||
// Meta data.
|
||||
echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
|
||||
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
|
|
@ -96,35 +111,39 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
$min_quantity = 1;
|
||||
$max_quantity = 1;
|
||||
} else {
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
'product_name' => $_product->get_name(),
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
$min_quantity = 0;
|
||||
$max_quantity = $_product->get_max_purchase_quantity();
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $max_quantity,
|
||||
'min_value' => $min_quantity,
|
||||
'product_name' => $product_name,
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -140,7 +159,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
<?php if ( wc_coupons_enabled() ) { ?>
|
||||
<div class="coupon">
|
||||
<label for="coupon_code"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text form-control" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text form-control" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<?php do_action( 'woocommerce_cart_coupon' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
|
@ -76,7 +76,9 @@ $totals = $order->get_order_item_totals(); // phpcs:ignore WordPress.WP.GlobalVa
|
|||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
|
||||
echo '<li>';
|
||||
wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* Email verification page.
|
||||
*
|
||||
* This displays instead of the thankyou page any time that the customer cannot be identified.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou-verify-email.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer) will need to copy
|
||||
* the new files to your theme to maintain compatibility. We try to do this as little as possible, but it does happen.
|
||||
* When this occurs the version of the template file will be bumped and the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.9.0
|
||||
*
|
||||
* @var bool $failed_submission Indicates if the last attempt to verify failed.
|
||||
* @var string $verify_url The URL for the email verification form.
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$label_class = get_theme_mod( 'understrap_bootstrap_version', 'bootstrap4' )
|
||||
? ''
|
||||
: ' class="form-label"';
|
||||
?>
|
||||
<form name="checkout" method="post" class="woocommerce-form woocommerce-verify-email" action="<?php echo esc_url( $verify_url ); ?>" enctype="multipart/form-data">
|
||||
|
||||
<?php
|
||||
wp_nonce_field( 'wc_verify_email', 'check_submission' );
|
||||
|
||||
if ( $failed_submission ) {
|
||||
wc_print_notice( esc_html__( 'We were unable to verify the email address you provided. Please try again.', 'woocommerce' ), 'error' );
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: opening login link 2: closing login link */
|
||||
esc_html__( 'To view this page, you must either %1$slogin%2$s or verify the email address associated with the order.', 'woocommerce' ),
|
||||
'<a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p class="form-row">
|
||||
<label for="email"<?php echo $label_class; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok ?>>
|
||||
<?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span>
|
||||
</label>
|
||||
<input type="email" class="input-text form-control" name="email" id="email" autocomplete="email" />
|
||||
</p>
|
||||
|
||||
<p class="form-row">
|
||||
<button type="submit" class="woocommerce-button btn btn-outline-primary" name="verify" value="1">
|
||||
<?php esc_html_e( 'Verify', 'woocommerce' ); ?>
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
|
|
@ -12,11 +12,10 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
* @version 8.1.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! wp_doing_ajax() ) {
|
||||
do_action( 'woocommerce_review_order_before_payment' );
|
||||
}
|
||||
|
|
@ -30,7 +29,9 @@ if ( ! wp_doing_ajax() ) {
|
|||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
|
||||
echo '<li>';
|
||||
wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
|
@ -43,15 +44,10 @@ if ( ! wp_doing_ajax() ) {
|
|||
?>
|
||||
<br/><button type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button>
|
||||
</noscript>
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="btn btn-primary" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_submit' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,34 +14,27 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.2.0
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$downloads = WC()->customer->get_downloadable_products();
|
||||
$has_downloads = (bool) $downloads;
|
||||
|
||||
do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
|
||||
|
||||
<?php if ( $has_downloads ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_available_downloads' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_available_downloads', $downloads ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_available_downloads' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
|
||||
<a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php esc_html_e( 'Browse products', 'woocommerce' ); ?>
|
||||
</a>
|
||||
<?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wc_print_notice( esc_html__( 'No downloads available yet.', 'woocommerce' ) . ' <a class="btn btn-outline-primary" href="' . esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ) . '">' . esc_html__( 'Browse products', 'woocommerce' ) . '</a>', 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
do_action( 'woocommerce_after_account_downloads', $has_downloads );
|
||||
<?php
|
||||
do_action( 'woocommerce_after_account_downloads', $has_downloads );
|
||||
|
|
|
|||
|
|
@ -14,15 +14,12 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
||||
|
||||
<?php if ( $has_orders ) : ?>
|
||||
|
||||
<table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -31,7 +28,6 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $customer_orders->orders as $customer_order ) {
|
||||
|
|
@ -43,28 +39,22 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<td class="woocommerce-orders-table__cell woocommerce-orders-table__cell-<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
|
||||
<?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>
|
||||
<?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>
|
||||
|
||||
<?php elseif ( 'order-number' === $column_id ) : ?>
|
||||
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
|
||||
<?php echo esc_html( _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number() ); ?>
|
||||
</a>
|
||||
|
||||
<?php elseif ( 'order-date' === $column_id ) : ?>
|
||||
<time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
|
||||
|
||||
<?php elseif ( 'order-status' === $column_id ) : ?>
|
||||
<?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
|
||||
|
||||
<?php elseif ( 'order-total' === $column_id ) : ?>
|
||||
<?php
|
||||
/* translators: 1: formatted order total 2: total order items */
|
||||
echo wp_kses_post( sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ) );
|
||||
?>
|
||||
|
||||
<?php elseif ( 'order-actions' === $column_id ) : ?>
|
||||
<?php
|
||||
$actions = wc_get_account_orders_actions( $order );
|
||||
|
||||
if ( ! empty( $actions ) ) {
|
||||
foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
|
||||
|
|
@ -80,9 +70,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php do_action( 'woocommerce_before_account_orders_pagination' ); ?>
|
||||
|
||||
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
|
||||
<div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination">
|
||||
<?php if ( 1 !== $current_page ) : ?>
|
||||
|
|
@ -96,10 +84,9 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php endif; ?>
|
||||
|
||||
<?php else : ?>
|
||||
<div class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-Message--info woocommerce-info">
|
||||
<a class="woocommerce-Button btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"><?php esc_html_e( 'Browse products', 'woocommerce' ); ?></a>
|
||||
<?php esc_html_e( 'No order has been made yet.', 'woocommerce' ); ?>
|
||||
</div>
|
||||
|
||||
<?php wc_print_notice( esc_html__( 'No order has been made yet.', 'woocommerce' ) . ' <a class="woocommerce-Button btn btn-outline-primary" href="' . esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ) . '">' . esc_html__( 'Browse products', 'woocommerce' ) . '</a>', 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_account_orders', $has_orders ); ?>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* Order again button
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-again.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<p class="order-again">
|
||||
<a href="<?php echo esc_url( $order_again_url ); ?>" class="btn btn-outline-primary"><?php esc_html_e( 'Order again', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
Loading…
Reference in New Issue