forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes most uses of extract() #1565
Merged
Conversation
This file contains 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
…rom the widget rather than from inc/enqueue
benlk
added
type: bug
priority: high
Either blocks work on a priority-normal task or a solution here informs other work.
labels
Nov 8, 2018
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority: high
Either blocks work on a priority-normal task or a solution here informs other work.
type: bug
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.
Changes
Removes
extract()
calls from most places in Largo:./inc/users.php
./homepages/homepage-class.php: extract($vars);
./inc/editor.php: extract( shortcode_atts( array(
./inc/helpers.php: * @return string the Facebook username or id extracted from the input string
./inc/helpers.php: * @return string the twitter username extracted from the input string
./inc/pagination.php: extract( $r, EXTR_SKIP );
./inc/widgets/largo-about.php: extract( $args );
./inc/widgets/largo-author-bio.php: extract( $args );
./inc/widgets/largo-disclaimer-widget.php: extract( $args );
./inc/widgets/largo-donate.php: extract( $args );
./inc/widgets/largo-facebook.php: extract( $args );
./inc/widgets/largo-follow.php: extract( $args );
./inc/widgets/largo-image-widget.php: extract( $args );
./inc/widgets/largo-image-widget.php: // Using extracted vars now
./inc/widgets/largo-image-widget.php: extract( $instance );
./inc/widgets/largo-post-series-links.php: extract( $args );
./inc/widgets/largo-prev-next-post-links.php: extract( $args );
./inc/widgets/largo-recent-comments.php: extract( $args );
./inc/widgets/largo-recent-posts.php: extract( $args );
./inc/widgets/largo-related-posts.php: extract( $args );
./inc/widgets/largo-series-posts.php: extract( $args );
./inc/widgets/largo-tag-list.php: extract( $args );
./inc/widgets/largo-taxonomy-list.php: extract( $args );
./inc/widgets/largo-twitter.php: extract( $args );
./js/tinymce/plugins/largo/window.php: <li><input type="radio" name="mod_width" value="extract" id="extract"> Extract from Embed (non-responsive)</li>
./lib/class-tgm-plugin-activation.php: * Helper function to extract the file path of the plugin file from the
./lib/class-tgm-plugin-activation.php: * Constructor. Parses default args with new ones and extracts them for use.
./lib/navis-media-credit/navis-media-credit.php: extract( $atts );
The remaining places:
Also:
largo_footer_js()
; instead being enqueued directly from the widget.undefined index
errors in widget form and update functions.Why
Because
extract()
is risky.