Skip to content

Commit 86a94e2

Browse files
committed
Updated to Carbon Fields 2.1.1
1 parent b81b3c9 commit 86a94e2

File tree

133 files changed

+20030
-12422
lines changed

Some content is hidden

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

133 files changed

+20030
-12422
lines changed

vendor/composer/installed.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@
120120
},
121121
{
122122
"name": "htmlburger/carbon-fields",
123-
"version": "2.1.0",
124-
"version_normalized": "2.1.0.0",
123+
"version": "2.1.1",
124+
"version_normalized": "2.1.1.0",
125125
"source": {
126126
"type": "git",
127127
"url": "https://github.com/htmlburger/carbon-fields.git",
128-
"reference": "18b35ce4d1f192ce7b1696e77c6477c6cd34a8b8"
128+
"reference": "bcfb81e12d0e3162609e938efbdd4ae01bd4abde"
129129
},
130130
"dist": {
131131
"type": "zip",
132-
"url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/18b35ce4d1f192ce7b1696e77c6477c6cd34a8b8",
133-
"reference": "18b35ce4d1f192ce7b1696e77c6477c6cd34a8b8",
132+
"url": "https://api.github.com/repos/htmlburger/carbon-fields/zipball/bcfb81e12d0e3162609e938efbdd4ae01bd4abde",
133+
"reference": "bcfb81e12d0e3162609e938efbdd4ae01bd4abde",
134134
"shasum": ""
135135
},
136136
"require": {
@@ -140,9 +140,9 @@
140140
"mockery/mockery": "^0.9.7",
141141
"phpunit/phpunit": "~4.8"
142142
},
143-
"time": "2017-09-25T08:41:27+00:00",
143+
"time": "2017-11-16T15:36:25+00:00",
144144
"type": "library",
145-
"installation-source": "dist",
145+
"installation-source": "source",
146146
"autoload": {
147147
"psr-4": {
148148
"Carbon_Fields\\": "core/"

vendor/htmlburger/carbon-fields/.jest

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"bail": true,
3+
"verbose": true,
4+
5+
"roots": [
6+
"assets/tests"
7+
],
8+
9+
"modulePaths": [
10+
"<rootDir>/assets/",
11+
"<rootDir>/assets/js"
12+
]
13+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
filter:
2+
excluded_paths:
3+
- core/Pimple/*
4+
- assets/*
5+
- languages/*
6+
- tests/*
7+
- templates/*
8+
- tmp/*
9+
- vendor/*
10+
11+
checks:
12+
php:
13+
verify_argument_usable_as_reference: false
14+
verify_property_names: false
15+
no_global_keyword: false
16+
psr2_class_declaration: false
17+
avoid_superglobals: false
18+
one_class_per_file: false
19+
code_rating: true
20+
coding_standard:
21+
name: WordPress
22+
23+
tools:
24+
sensiolabs_security_checker: true
25+
external_code_coverage: true
26+
php_mess_detector:
27+
config:
28+
code_size_rules: { cyclomatic_complexity: true, npath_complexity: true, excessive_method_length: true, excessive_class_length: true, excessive_parameter_list: true, excessive_public_count: true, too_many_fields: true, too_many_methods: true, excessive_class_complexity: true }
29+
design_rules: { number_of_class_children: true, depth_of_inheritance: true, coupling_between_objects: true }
30+
unused_code_rules: { unused_local_variable: true, unused_private_method: true, unused_formal_parameter: true }
31+
naming_rules: { short_variable: true, long_variable: true, short_method: true, boolean_method_name: true }
32+
controversial_rules: { camel_case_class_name: true, camel_case_property_name: true, camel_case_method_name: true, camel_case_parameter_name: true, camel_case_variable_name: true }
33+
php_cs_fixer:
34+
config:
35+
level: all
36+
fixers: { unused_use: true, phpdoc_params: true, braces: true, php_closing_tag: true }
37+
php_analyzer:
38+
config:
39+
suspicious_code: { enabled: true, overriding_parameter: true, overriding_closure_use: true, parameter_closure_use_conflict: true, parameter_multiple_times: true, non_existent_class_in_instanceof_check: true, non_existent_class_in_catch_clause: true, assignment_of_null_return: true, non_commented_switch_fallthrough: true, non_commented_empty_catch_block: true, overriding_private_members: true, use_statement_alias_conflict: true, precedence_in_condition_assignment: true }
40+
verify_php_doc_comments: { enabled: true, parameters: true, return: true, suggest_more_specific_types: true, ask_for_return_if_not_inferrable: true, ask_for_param_type_annotation: true }
41+
loops_must_use_braces: { enabled: true }
42+
simplify_boolean_return: { enabled: true }
43+
phpunit_checks: { enabled: true }
44+
reflection_fixes: { enabled: true }
45+
use_statement_fixes: { enabled: true, order_alphabetically: true, remove_unused: true, preserve_multiple: false, preserve_blanklines: false }
46+
parameter_reference_check: { enabled: false }
47+
checkstyle: { enabled: false, no_trailing_whitespace: true, naming: { enabled: true, local_variable: '^[a-z][a-zA-Z0-9]*$', abstract_class_name: ^Abstract|Factory$, utility_class_name: 'Utils?$', constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$', property_name: '^[a-z][a-zA-Z0-9]*$', method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$', parameter_name: '^[a-z][a-zA-Z0-9]*$', interface_name: '^[A-Z][a-zA-Z0-9]*Interface$', type_name: '^[A-Z][a-zA-Z0-9]*$', exception_name: '^[A-Z][a-zA-Z0-9]*Exception$', isser_method_name: '^(?:is|has|should|may|supports)' } }
48+
unreachable_code: { enabled: false }
49+
check_access_control: { enabled: false }
50+
typo_checks: { enabled: false }
51+
check_variables: { enabled: false }
52+
check_calls: { enabled: true, too_many_arguments: true, missing_argument: true, argument_type_checks: lenient }
53+
dead_assignments: { enabled: false }
54+
check_usage_context: { enabled: true, foreach: { value_as_reference: true, traversable: true } }
55+
reflection_checks: { enabled: false }
56+
precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
57+
basic_semantic_checks: { enabled: false }
58+
unused_code: { enabled: false }
59+
deprecation_checks: { enabled: false }
60+
useless_function_calls: { enabled: false }
61+
metrics_lack_of_cohesion_methods: { enabled: false }
62+
metrics_coupling: { enabled: true, stable_code: { namespace_prefixes: { }, classes: { } } }
63+
doctrine_parameter_binding: { enabled: false }
64+
doctrine_entity_manager_injection: { enabled: false }
65+
symfony_request_injection: { enabled: false }
66+
doc_comment_fixes: { enabled: false }
67+
php_code_sniffer:
68+
config:
69+
standard: WordPress
70+
sniffs: { wordpress: { arrays: { array_declaration_sniff: true }, classes: { valid_class_name_sniff: true }, files: { file_name_sniff: true }, formatting: { multiple_statement_alignment_sniff: true }, functions: { function_call_signature_sniff: true, function_declaration_argument_spacing_sniff: true }, naming_conventions: { valid_function_name_sniff: true }, objects: { object_instantiation_sniff: true }, php: { discouraged_functions_sniff: true }, strings: { double_quote_usage_sniff: true }, white_space: { control_structure_spacing_sniff: true, operator_spacing_sniff: true, php_indent_sniff: true }, xss: { escape_output_sniff: true } } }
71+
php_loc: true
72+
php_pdepend: true
73+
php_sim: true
74+
php_changetracking: true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
dist: precise
2+
3+
language: php
4+
5+
sudo: false
6+
7+
php:
8+
- 5.3
9+
- 5.4
10+
- 5.5
11+
- 5.6
12+
- 7.0
13+
14+
env:
15+
# - WP_VERSION=latest WP_MULTISITE=0
16+
- WP_VERSION=4.7 WP_MULTISITE=0
17+
- WP_VERSION=4.6 WP_MULTISITE=0
18+
- WP_VERSION=4.5 WP_MULTISITE=0
19+
- WP_VERSION=4.4 WP_MULTISITE=0
20+
- WP_VERSION=4.3 WP_MULTISITE=0
21+
22+
matrix:
23+
include:
24+
- php: 5.3
25+
env: WP_VERSION=4.7 WP_MULTISITE=1
26+
27+
before_install:
28+
- composer self-update
29+
30+
before_script:
31+
- mysql -e "create database IF NOT EXISTS carbon_fields_tests;" -uroot
32+
- bash tests/bin/install.sh carbon_fields_tests root '' localhost $WP_VERSION
33+
34+
script: ./vendor/bin/phpunit --coverage-clover=./tmp/clover.xml
35+
36+
after_script:
37+
- wget https://scrutinizer-ci.com/ocular.phar
38+
- php ocular.phar code-coverage:upload --format=php-clover ./tmp/clover.xml
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Release Guide
2+
3+
## `htmlburger/carbon-fields`
4+
5+
1. Merge all changes for the new version into `master`
6+
1. Bump version numbers in `config.php` and `package.json` according to SemVer
7+
1. Commit bumped version changes to `master`
8+
1. Checkout `release`
9+
1. Merge `master` into `release`. NEVER merge `release` into any other branch - only merge branches INTO `release`.
10+
1. Run `npm install && npm run build`
11+
1. You should now have changes ONLY in the /assets/dist/ directory - any changes outside this directory mean that you have a dirty working copy. Never commit anything else into `release` except /assets/dist/ changes.
12+
1. Commit the /assets/dist/ changes to `release`
13+
1. `git push --all`
14+
1. Create a new release in [Github](https://github.com/htmlburger/carbon-fields/releases/new) from the `release` branch
15+
1. Enter the new version you set in `config.php` for `Tag version` and `Title`
16+
1. Add a changelog for `Description`
17+
1. Click `Publish release`
18+
19+
## `htmlburger/carbon-fields-plugin`
20+
21+
1. Update the version in `carbon-fields-plugin.php`, `readme.txt` and `composer.json` for `htmlburger/carbon-fields` to match the newly released version
22+
1. Commit to `master`
23+
1. Create a new release in [Github](https://github.com/htmlburger/carbon-fields-plugin/releases/new) from the `master` branch
24+
1. Enter the new version for `Tag version` and `Title` (you can skip the changelog)
25+
1. Click `Publish release`
26+
27+
# Internal Glossary
28+
29+
## `value_set`
30+
31+
Represents a single field value. `Complex_Field` uses a `value_tree` instead which contains a `value_set` for every child field including the `Complex_Field` itself.
32+
33+
_Note: The `Value_Set` class will always return a fully formatted `value_set` with all of its properties OR `null`_
34+
35+
### Schema
36+
37+
array(
38+
array(
39+
'value' => <mixed>,
40+
property<string> => <mixed>,
41+
...
42+
),
43+
...
44+
)
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
Vagrant.configure(2) do |config|
2+
config.vm.box = "ubuntu/trusty64"
3+
config.vm.box_check_update = false
4+
5+
config.vm.network "forwarded_port", guest: 80, host: 8080
6+
7+
# Fix the DNS resolution speed. This actually slows down the unit tests speed
8+
# (I assume due to base WP test suite)
9+
# See http://serverfault.com/a/496612/80479
10+
config.vm.provider "virtualbox" do |v|
11+
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
12+
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
13+
end
14+
15+
config.vm.synced_folder ".", "/home/vagrant/carbon-fields"
16+
config.vm.synced_folder "../../../", "/var/www/"
17+
18+
# Install some software on the machine and setup unit tests environment
19+
config.vm.provision "shell", inline: <<-SHELL
20+
DBHOST=localhost
21+
DBNAME=wp
22+
DBUSER=wp
23+
DBPASSWD=secret
24+
25+
echo -e "\n--- Update apt ---\n"
26+
sudo apt-get -qq update
27+
28+
echo -e "\n--- Install some base packages ---\n"
29+
sudo apt-get -y install vim curl build-essential python-software-properties nginx git subversion zip > /dev/null 2>&1
30+
31+
echo -e "\n--- Install PHP7 ---\n"
32+
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
33+
sudo apt-get -qq update
34+
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
35+
36+
echo -e "\n--- Install composer ---\n"
37+
sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
38+
39+
echo -e "\n--- Install phpUnit ---\n"
40+
su - vagrant -c 'sudo composer global require "phpunit/phpunit=5.0.*"'
41+
echo 'PATH=$PATH:~/.composer/vendor/bin/' >> ~vagrant/.bash_profile && chown vagrant:vagrant ~vagrant/.bash_profile
42+
43+
echo -e "\n--- Install MySQL ---\n"
44+
echo "mysql-server mysql-server/root_password password $DBPASSWD" | debconf-set-selections
45+
echo "mysql-server mysql-server/root_password_again password $DBPASSWD" | debconf-set-selections
46+
sudo apt-get -y install mysql-server-5.5
47+
48+
echo 'server {
49+
listen 80;
50+
server_name localhost;
51+
52+
root /var/www/;
53+
index index.php index.html;
54+
55+
# Important for VirtualBox
56+
sendfile off;
57+
58+
location / {
59+
try_files $uri $uri/ =404;
60+
}
61+
62+
location ~* \.php {
63+
include fastcgi_params;
64+
65+
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
66+
67+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
68+
fastcgi_cache off;
69+
fastcgi_index index.php;
70+
}
71+
}' > /etc/nginx/sites-available/default
72+
service nginx restart;
73+
74+
echo -e "\n--- Setup MySQL ---\n"
75+
mysql -uroot -p$DBPASSWD -e "CREATE DATABASE $DBNAME"
76+
mysql -uroot -p$DBPASSWD -e "grant all privileges on $DBNAME.* to '$DBUSER'@'localhost' identified by '$DBPASSWD'"
77+
78+
su - vagrant -c "cd /home/vagrant/carbon-fields && ./tests/bin/install.sh $DBNAME $DBUSER $DBPASSWD"
79+
80+
SHELL
81+
end

vendor/htmlburger/carbon-fields/assets/css/modules/_fields.complex.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88

99
/* Sub Container */
1010

11-
.carbon-subcontainer > .carbon-actions { position: relative; display: inline-block; vertical-align: top; }
11+
.carbon-subcontainer > .carbon-actions { position: relative; vertical-align: top; }
1212
.carbon-subcontainer > .carbon-actions .carbon-button { display: inline-block; vertical-align: top; float: none; }
13+
.carbon-subcontainer > .carbon-actions .carbon-button-collapse-all { float: right; }
1314

1415
.carbon-subcontainer > .carbon-empty-row { display: none; }
1516
.carbon-subcontainer > .carbon-empty-row-visible { display: block; }
1617
.carbon-subcontainer > .carbon-empty-row-visible ~ .carbon-actions { display: block; }
1718
.carbon-subcontainer > .carbon-empty-row-visible ~ .groups-wrapper { display: none; }
1819

1920

21+
.carbon-user-container .carbon-group-row,
22+
.carbon-term-container .carbon-group-row { background: #FFFFFF; }
23+
2024
/* Main Components */
2125

2226
.carbon-groups-holder .carbon-row { position: relative; margin-bottom: 10px; box-shadow: 0 1px 0 0 rgba(0,0,0,.05); }
@@ -98,6 +102,8 @@
98102
.carbon-groups-holder .carbon-group-actions-tabbed-horizontal a:hover,
99103
.carbon-groups-holder .carbon-group-actions-tabbed-vertical a:hover { color: $color-label; }
100104

105+
.carbon-subcontainer .layout-tabbed-horizontal .carbon-actions .carbon-button-collapse-all,
106+
.carbon-subcontainer .layout-tabbed-vertical .carbon-actions .carbon-button-collapse-all,
101107
.carbon-groups-holder .carbon-group-actions-tabbed-horizontal .carbon-btn-collapse,
102108
.carbon-groups-holder .carbon-group-actions-tabbed-vertical .carbon-btn-collapse { display: none; }
103109

0 commit comments

Comments
 (0)