Skip to content

Commit ff8c132

Browse files
Release 1.5.0 (PR #303) from Getbeans/release/1.5.0
2 parents 8faa874 + dd21ca3 commit ff8c132

File tree

368 files changed

+10257
-6887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+10257
-6887
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.DS_Store
2+
composer.lock
3+
/node_modules/
4+
/vendor/
5+
/logs/
6+
/reports/

404.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/**
3-
* This core file should strictly be overwritten via your child theme.
3+
* This core file should only be overwritten via your child theme.
44
*
5-
* We strongly recommend to read Beans documentation to find out more how to
6-
* customize Beans theme.
5+
* We strongly recommend to read the Beans documentation to find out more about
6+
* how to customize the Beans theme.
77
*
88
* @author Beans
9-
* @link http://www.getbeans.io
9+
* @link https://www.getbeans.io
10+
* @package Beans\Framework
1011
*/
1112

1213
beans_load_document();

CHANGELOG.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Beans Changelog
2+
3+
## 2018.07.10 - version 1.5.0
4+
5+
This release candidate includes security, web accessibility, code quality improvements, performance improvements, and bug fixes. The entire framework is now WPCS compliant. The APIs are now fully and thoroughly well-tested. All found issues are resolved. New functionality is added.
6+
7+
### Improved
8+
* Improved web accessibility by adding skip links, ARIA, labels, tabs, and more.
9+
* Improved the performance of the APIs by reducing expensive processes, memory usage, and execution time.
10+
* Improved the APIs by adding thorough unit and integration test suites.
11+
* Improved the APIs by adding type hinting, reducing redundant code, and removing unused code.
12+
* Improved Beans by making it WPCS compliant.
13+
* Improved CSS compiler to have one block of declarations per line.
14+
* Improved security by auditing and applying escaping and sanitizing best practices.
15+
* Improved the Actions API by no longer storing actions in encoded strings.
16+
* Improved code documentation and readability.
17+
18+
### Updated
19+
* Updated the language's tm-beans.pot file.
20+
* Updated UIkit to version 2.27.5 (see [UIkit changelog](https://github.com/uikit/uikit/blob/v2/master/CHANGELOG.md#2275) for more information).
21+
22+
### Added
23+
* Added `beans_str_ends_with()` to check if the given string ends with the given substring(s).
24+
* Added `beans_str_starts_with()` to check if the given string starts with the given substring(s).
25+
* Added `beans_multi_array_key_exists()` to check if a key or index exists in a multi-dimensional array.
26+
* Added `beans_join_arrays()` to join two arrays together.
27+
* Added `beans_array_unique()` to remove duplicate values and re-index the array.
28+
* Added `beans_join_arrays_clean()` to join two arrays, remove the duplicate values and empties, and provide an option to re-index the clean array.
29+
* Added `beans_scandir()` to scan the given directory path, list all the files and directories, and remove the `.` and `..` files.
30+
* Added `beans_uikit_get_all_components()` to check all of the UIkit components for the given type.
31+
* Added `beans_uikit_get_all_dependencies()` to check all of the UIkit dependencies for the given component(s).
32+
* Added `beans_get_widget_area_output()` to replace `beans_get_widget_area()`.
33+
* Added `beans_add_compiler_options_to_settings()` to instantiate `_Beans_Compiler_Options` through a hook instead of on file load.
34+
* Added `beans_add_page_assets_compiler()` to instantiate `__Beans_Page_Compiler` through a hook instead of on file load.
35+
* Added `beans_add_image_options_to_settings()` to instantiate `___Beans_Image_Options` through a hook instead of on file load.
36+
* Added `beans_has_primary_sidebar()` to check if the given layout has a primary sidebar.
37+
* Added `beans_has_secondary_sidebar()` to check if the given layout has a secondary sidebar.
38+
* Added `beans_skip_links_list()` to filter the skip links.
39+
* Added `beans_output_skip_links()` to render the skip links.
40+
* Added `beans_accessibility_skip_link_fix()` to enqueue skip link fix script for IE 11.
41+
* Added many new private functions.
42+
43+
### Changes
44+
* `beans_add_action()` returns `false` when the action is not added via `add_action`.
45+
* `beans_add_smart_action()` returns `false` when the action is not added via `add_action`.
46+
* `beans_modify_action()` returns `false` when hook, callback, priority, and args are not given.
47+
* `beans_modify_action_hook()` returns `false` when the hook is empty or not a string.
48+
* `beans_modify_action_callback()` returns `false` when the callback is empty.
49+
* `beans_replace_action()` returns `false` when hook, callback, priority, and args are not given.
50+
* `beans_replace_action_hook()` returns `false` when the hook is empty or not a string.
51+
* `beans_replace_action_callback()` returns `false` when the callback is empty.
52+
* `beans_remove_action()` sets "removed" to the default when no current action exists.
53+
* `beans_reset_action()` bails out if the action does not need to be reset.
54+
* Unset the global variable in `beans_selfclose_markup()` to reduce memory usage.
55+
* `beans_wrap_markup()` bails out and returns `false` if the given `$tag` is empty.
56+
* `beans_wrap_inner_markup()` bails out and returns `false` if the given `$tag` is empty.
57+
* `beans_add_attribute()` returns an instance of `_Beans_Attribute`.
58+
* `beans_replace_attribute()` replaces all values when the `value` argument is empty.
59+
* `beans_replace_attribute()` returns an instance of `_Beans_Attribute`.
60+
* `beans_remove_attribute()` returns an instance of `_Beans_Attribute`.
61+
* Moved the API's HTML to view files to improve code quality.
62+
* Changes to private functions and methods are not noted here.
63+
64+
### Fixed
65+
* Fixed `depedencies` typo in Compiler's configuration (now `dependencies`). Provided fallback.
66+
* Fixed Customizer Preview Tools.
67+
* Fixed UIkit API bug when not returning all dependency components.
68+
* Fixed Beans Image Editor for ARRAY_A.
69+
* Fixed `beans_get_post_meta()`.
70+
* Fixed `beans_get_term_meta()`.
71+
* Fixed Compiler to recompile when a fragment changes and not in development mode.
72+
* Fixed replacing action to remove from WordPress.
73+
* Fixed Actions API to allow priority of 0 to be modified.
74+
* Fixed Actions API double subhook calls.
75+
* Fixed `beans_path_to_url()` to bail out when relative URL.
76+
* Fixed count for `beans_count_recursive()`.
77+
* Fixed removing tilde from `beans_url_to_path()`.
78+
* Fixed processing relative URLs in `beans_url_to_path()`.
79+
* Fixed altering of non-internal URLs in `beans_url_to_path()`.
80+
* Fixed `beans_get_layout_class()` not returning correct classes when secondary is no longer registered.
81+
* Fixed 'Next Post' icon close markup ID.
82+
* Fixed 'Read More' icon markup IDs.
83+
* Fixed `beans_get_widget_area()` to return `false` on fail.
84+
* Fixed `beans_get_widget()` to return `false` on fail.
85+
* Fixes to private functions and methods are not noted here.
86+
87+
### Deprecated
88+
* Deprecated `beans_count_recursive()` as it is unused in Beans.
89+
* Deprecated `beans_widget_area()` by replacing it with a renamed function `beans_get_widget_area_output()` that better describes the expected behavior.
90+
* Deprecated the image toolbar's dashicons' class attributes.
91+
92+
## 2016.10.12 - version 1.4.0
93+
94+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.4.0) for more information.
95+
96+
## 2016.10.10 - version 1.4.0-rc
97+
98+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.4.0-rc) for more information.
99+
100+
## 2016.09.30 - version 1.4.0-beta
101+
102+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.4.0-beta) for more information.
103+
104+
## 2016.04.28 - version 1.3.1
105+
106+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.1) for more information.
107+
108+
## 2016.04.25 - version 1.3.1-rc2
109+
110+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.1-rc2) for more information.
111+
112+
## 2016.04.22 - version 1.3.1-rc
113+
114+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.1-rc) for more information.
115+
116+
## 2016.04.09 - version 1.3.1-beta
117+
118+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.1-beta) for more information.
119+
120+
## 2016.02.18 - version 1.3.0
121+
122+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.0) for more information.
123+
124+
## 2016.02.15 - version 1.3.0-rc
125+
126+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.0-rc) for more information.
127+
128+
## 2016.02.10 - version 1.3.0-beta
129+
130+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.3.0-beta) for more information.
131+
132+
## 2016.01.05 - version 1.2.5
133+
134+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.5) for more information.
135+
136+
## 2015.12.13 - version 1.2.4
137+
138+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.4) for more information.
139+
140+
## 2015.11.30 - version 1.2.3
141+
142+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.3) for more information.
143+
144+
## 2015.11.28 - version 1.2.2
145+
146+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.2) for more information.
147+
148+
## 2015.11.11 - version 1.2.1
149+
150+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.1) for more information.
151+
152+
## 2015.09.28 - version 1.2.0
153+
154+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.0) for more information.
155+
156+
## 2016.01.15 - version 1.2.0-rc
157+
158+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.0-rc) for more information.
159+
160+
## 2016.01.15 - version 1.2.0-beta
161+
162+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.2.0-beta) for more information.
163+
164+
## 2015.09.08- version 1.1.2
165+
166+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.1.2) for more information.
167+
168+
## 2015.09.08- version 1.1.1
169+
170+
See the [release changelog](https://github.com/Getbeans/Beans/releases/tag/1.1.1) for more information.

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Beans WordPress theme framework
2-
[Beans](http://www.getbeans.io/) is an incredibly powerful and flexible WordPress theme, yet light weight and unbelievably fast. Whether you are a pro or a beginner, you will enjoy the simplicity of it. The magic is under the hood!
2+
3+
[![Build Status](https://travis-ci.org/Getbeans/Beans.svg?branch=development)](https://travis-ci.org/Getbeans/Beans)
4+
5+
[Beans](https://www.getbeans.io/) is an incredibly powerful and flexible WordPress theme, yet light weight and unbelievably fast. Whether you are a pro or a beginner, you will enjoy the simplicity of it. The magic is under the hood!
36
# Documentation
4-
Whether you are looking how to get started or how to use Beans API, you will find your answers in the [documentation](http://www.getbeans.io/documentation/). If your don't find what your are looking for, don't hesitate to [contact us](http://getbeans.io/contact/).
7+
Whether you are looking how to get started or how to use Beans API, you will find your answers in the [documentation](https://www.getbeans.io/documentation/). If your don't find what your are looking for, don't hesitate to [contact us](https://www.getbeans.io/contact/).
58
# Code snippets
6-
[Code snippets](http://www.getbeans.io/code-snippets/) are ready to be pasted straight into your child theme functions.php.
9+
[Code snippets](https://www.getbeans.io/code-snippets/) are ready to be pasted straight into your child theme functions.php.
710
# Code reference
8-
Developers this is made for you! You will find all the hooks and functions available in Beans under the [Code reference](http://www.getbeans.io/code-reference/).
11+
Developers this is made for you! You will find all the hooks and functions available in Beans under the [Code reference](https://www.getbeans.io/code-reference/).
912
# Community
1013
Beans is the achievement of two years of work and was launched the 26th of August 2015. The response has been incredible so far and we hope the community will grow around Beans.
1114
We just opened the [Twitter account](https://twitter.com/BeansPress) so if you would like to say hello, use twitter @BeansPress handle.
@@ -18,11 +21,6 @@ Beans community is growing rapidly and a lot of people are asking how they can c
1821
* Build extensions
1922
* Contribute to Beans core
2023

21-
If you are a Beans superstar and you want to contribute to Beans core, here are a few house rules:
22-
23-
* Commits must start with a **capital** letter and end with a **dot** (unless it ends with a version number).
24-
* Commits must start with one of the following key words **Added**, **Fixed**, **Updated**, **Improved**, **Modified** or **Removed**.
25-
* Commits must be split into specific tasks and kept small so that other developers can easily see what it's about.
26-
* Code format must be strictly similar to the rest of the theme framework.
24+
If you are a Beans superstar and you want to contribute to Beans core, please see the [Beans Contributor's Wiki](https://github.com/Getbeans/Beans/wiki).
2725

2826
Thanks for making Beans such a great theme which is loved and used by truly passionate people.

comments.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
3-
* This file content is situated in /lib/templates/structure/comments.php and should
4-
* strictly be overwritten via your child theme.
3+
* This file's content is located in /lib/templates/structure/comments.php and should
4+
* only be overwritten via your child theme.
55
*
6-
* We strongly recommend to read Beans documentation to find out more how to
7-
* customize Beans theme.
6+
* We strongly recommend to read the Beans documentation to find out more about
7+
* how to customize the Beans theme.
88
*
99
* @author Beans
10-
* @link http://www.getbeans.io
10+
* @link https://www.getbeans.io
11+
* @package Beans\Framework
1112
*/
1213

13-
// Template situated in /lib/templates/structure/comments.php
1414
beans_load_default_template( __FILE__ );

composer.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "beans/beans",
3+
"description": "The most innovative theme for WordPress. The real magic is under the hood.",
4+
"type": "wordpress-theme",
5+
"license": "GPL-2.0+",
6+
"homepage": "http://www.getbeans.io/",
7+
"support": {
8+
"issues": "https://github.com/GetBeans/Beans/issues",
9+
"source": "https://github.com/GetBeans/Beans"
10+
},
11+
"minimum-stability": "dev",
12+
"prefer-stable": true,
13+
"autoload": {
14+
"exclude-from-classmap": [
15+
"/tests/"
16+
]
17+
},
18+
"autoload-dev": {
19+
"psr-4": {
20+
"Beans\\Framework\\Tests\\Unit\\": "tests/phpunit/unit/",
21+
"Beans\\Framework\\Tests\\Integration\\": "tests/phpunit/integration/"
22+
}
23+
},
24+
"repositories": [
25+
{
26+
"type": "package",
27+
"package": {
28+
"name": "xwp/wp-dev-lib",
29+
"version": "1.0.1",
30+
"source": {
31+
"url": "https://github.com/xwp/wp-dev-lib.git",
32+
"type": "git",
33+
"reference": "master"
34+
}
35+
}
36+
}
37+
],
38+
"require": {
39+
"php": "^5.2|^7",
40+
"composer/installers": "^1.4",
41+
"roave/security-advisories": "dev-master"
42+
},
43+
"require-dev": {
44+
"php": "^5.6|^7",
45+
"brain/monkey": "^2.2",
46+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
47+
"mikey179/vfsStream": "^1.6",
48+
"phpunit/phpunit": "~5.7.9",
49+
"sirbrillig/phpcs-variable-analysis": "^2.0",
50+
"squizlabs/php_codesniffer": "^3.2",
51+
"wimg/php-compatibility": "^8.0",
52+
"wp-coding-standards/wpcs": "^0.14.1",
53+
"xwp/wp-dev-lib": "^1.0.1"
54+
},
55+
"config": {
56+
"sort-order": true
57+
},
58+
"scripts": {
59+
"install-codestandards": [
60+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
61+
],
62+
"phpcs-src": "\"vendor/bin/phpcs\"",
63+
"phpcs-tests": "\"vendor/bin/phpcs\" --runtime-set testVersion 5.6 tests/phpunit/",
64+
"run-phpcs": [
65+
"@phpcs-src",
66+
"@phpcs-tests"
67+
],
68+
"test-unit": "\"vendor/bin/phpunit\" --testsuite unit --color=always",
69+
"test-integration": "\"vendor/bin/phpunit\" --testsuite integration --configuration tests/phpunit/integration/phpunit.xml.dist --color=always",
70+
"run-tests": [
71+
"@test-unit",
72+
"@test-integration"
73+
]
74+
}
75+
}

footer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
3-
* This file content is situated in /lib/templates/structure/footer.php and should
4-
* strictly be overwritten via your child theme.
3+
* This file's content is located in /lib/templates/structure/footer.php and should
4+
* only be overwritten via your child theme.
55
*
6-
* We strongly recommend to read Beans documentation to find out more how to
7-
* customize Beans theme.
6+
* We strongly recommend to read the Beans documentation to find out more about
7+
* how to customize the Beans theme.
88
*
99
* @author Beans
10-
* @link http://www.getbeans.io
10+
* @link https://www.getbeans.io
11+
* @package Beans\Framework
1112
*/
1213

13-
// Template situated in /lib/templates/structure/footer.php
1414
beans_load_default_template( __FILE__ );

functions.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
<?php
2+
/**
3+
* Beans Framework.
4+
* This core file should only be overwritten via your child theme.
5+
*
6+
* We strongly recommend to read the Beans documentation to find out more about
7+
* how to customize the Beans theme.
8+
*
9+
* @author Beans
10+
* @link https://www.getbeans.io
11+
* @package Beans\Framework
12+
*/
13+
214
/**
315
* Initialize Beans theme framework.
416
*
517
* @author Beans
6-
* @link http://www.getbeans.io
18+
* @link https://www.getbeans.io
719
*/
820

9-
require_once( dirname( __FILE__ ) . '/lib/init.php' );
21+
require_once dirname( __FILE__ ) . '/lib/init.php';

header.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
/**
3-
* This file content is situated in /lib/templates/structure/header.php and should
4-
* strictly be overwritten via your child theme.
3+
* This file's content is located in /lib/templates/structure/header.php and should
4+
* only be overwritten via your child theme.
55
*
6-
* We strongly recommend to read Beans documentation to find out more how to
7-
* customize Beans theme.
6+
* We strongly recommend to read the Beans documentation to find out more about
7+
* how to customize Beans theme.
88
*
99
* @author Beans
10-
* @link http://www.getbeans.io
10+
* @link https://www.getbeans.io
11+
* @package Beans\Framework
1112
*/
1213

13-
// Template situated in /lib/templates/structure/header.php
1414
beans_load_default_template( __FILE__ );

0 commit comments

Comments
 (0)