Fix the options page issue in WP prior to 4.7#1166
Merged
jtsternberg merged 3 commits intoCMB2:trunkfrom Sep 5, 2018
manzoorwanijk:patch-3
Merged
Fix the options page issue in WP prior to 4.7#1166jtsternberg merged 3 commits intoCMB2:trunkfrom manzoorwanijk:patch-3
jtsternberg merged 3 commits intoCMB2:trunkfrom
manzoorwanijk:patch-3
Conversation
jtsternberg
requested changes
Sep 4, 2018
Member
jtsternberg
left a comment
There was a problem hiding this comment.
Thank you so much for contributing! I left a suggestion in the review. Is it safe to say you've tested this in WP < 4.7 and this fixes it for you?
includes/CMB2_Options_Hookup.php
Outdated
| * @see https://core.trac.wordpress.org/ticket/37885 | ||
| */ | ||
| global $wp_version; | ||
| if ( version_compare( $wp_version, '4.7', '<' ) ) { |
Member
There was a problem hiding this comment.
Let's use if ( ! CMB2_Utils::wp_at_least( '4.7' ) && ! function_exists( 'register_setting' ) ) {, but this looks good.
Contributor
Author
There was a problem hiding this comment.
yes, that's off course better :)
Contributor
Author
There was a problem hiding this comment.
Yes, I tested it for all: WP < 4.7, = 4.7 > 4.7.
jtsternberg
approved these changes
Sep 5, 2018
jtsternberg
added a commit
that referenced
this pull request
Sep 5, 2018
Member
|
Thanks again for your contribution. We very much appreciate it! |
lipemat
added a commit
to lipemat/CMB2
that referenced
this pull request
Nov 12, 2018
* trunk: Fix PR urls in changelog Add props for CMB2#1179 Qa/phpcs cleanup (CMB2#1179) add our minimum required php version to the readme Update changelong to give props for CMB2#1177 Another instance where we should use call_user_func() instead of direct call use call_user_func() instead of direct call. Add 3 custom field types from @scottsawyer to readme resources. Closes CMB2#1171 update some more 3rd party resource items cleanup phpdocs for `php_to_js_dateformat` update 3rd party resources to include Leaflet Map field type. Props @villeristi Minor correction in URL Added new custom field type Tweak inline comments, and update changelog to give props for CMB2#1166 Add CMB2_Field::get_rest_value method for sending value through several filters before sending to REST request WP_Http class constants were added in WP 4.5 Doing it CMB2 way Fix the issue in WP prior to 4.7 Add Switch Button field type to resources. Closes CMB2#1151
lipemat
added a commit
to lipemat/CMB2
that referenced
this pull request
Nov 12, 2018
* master: Fix PR urls in changelog Add props for CMB2#1179 Qa/phpcs cleanup (CMB2#1179) add our minimum required php version to the readme Update changelong to give props for CMB2#1177 Another instance where we should use call_user_func() instead of direct call use call_user_func() instead of direct call. Add 3 custom field types from @scottsawyer to readme resources. Closes CMB2#1171 update some more 3rd party resource items cleanup phpdocs for `php_to_js_dateformat` update 3rd party resources to include Leaflet Map field type. Props @villeristi Minor correction in URL Added new custom field type Tweak inline comments, and update changelog to give props for CMB2#1166 Add CMB2_Field::get_rest_value method for sending value through several filters before sending to REST request WP_Http class constants were added in WP 4.5 Doing it CMB2 way Fix the issue in WP prior to 4.7 Add Switch Button field type to resources. Closes CMB2#1151 make remove_default_tax_metaboxes method public so it may be called by hooks Call remove_default_tax_metaboxes from any type of post_hooks Call remove_default_tax_metaboxes from any type of post_hooks Add Props for CMB2#1142 Update the draggable state's border style support drag sorting for groups Fix docblock for CMB2_Type_Base::__call
lipemat
added a commit
to lipemat/CMB2
that referenced
this pull request
Jul 19, 2019
…ng-for-groups * upstream/trunk: Add props for CMB2#1147 Some additional cleanup on CMB2#1147 Add props for CMB2#1187 Pull in the nodename, and default to div Make field description color accessible (fix color contrast ratio). h/t @rianrietveld. Fixes CMB2#1193 Add optional mb_callback_args box property which allows defining args for add_meta_box. Closes CMB2#1191 Update changelong to give @staurand props for CMB2#1190 (Fixes CMB2#1156) Revert file changes from CMB2#1190 and move gutenberg compatibility callback to main cmb JS file Update assets Fix tests: add cmb2-wysiwyg-gutenberg-fix as js dependency Fix CMB2#1156 / Update Gruntfile Fix CMB2#1156 Updates 1187 - explicitly specifiy closing bracket when adding a new row to group support any type of markup when repeating group row Fix PR urls in changelog Add props for CMB2#1179 Qa/phpcs cleanup (CMB2#1179) add our minimum required php version to the readme Update changelong to give props for CMB2#1177 Another instance where we should use call_user_func() instead of direct call use call_user_func() instead of direct call. Add 3 custom field types from @scottsawyer to readme resources. Closes CMB2#1171 update some more 3rd party resource items cleanup phpdocs for `php_to_js_dateformat` update 3rd party resources to include Leaflet Map field type. Props @villeristi Minor correction in URL Added new custom field type Tweak inline comments, and update changelog to give props for CMB2#1166 Add CMB2_Field::get_rest_value method for sending value through several filters before sending to REST request WP_Http class constants were added in WP 4.5 Doing it CMB2 way Fix the issue in WP prior to 4.7 Add Switch Button field type to resources. Closes CMB2#1151 make remove_default_tax_metaboxes method public so it may be called by hooks Call remove_default_tax_metaboxes from any type of post_hooks Add Props for CMB2#1142 Update the draggable state's border style Fix docblock for CMB2_Type_Base::__call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1095 and adds options page support for WP prior to 4.7, which otherwise crashed because of
register_settingfunction been moved to/wp-includes/option.phpin WP 4.7 because of this.