Commit Graph

31 Commits

Author SHA1 Message Date
Scott Taylor
cba0e2c8f7 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38470 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 16:30:48 +00:00
Scott Taylor
4225e71a6b Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38411 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 22:31:11 +00:00
Dion Hulse
e353179ce5 Bootstrap: Revert [38399] as it's broken /build/ and subsequently core.svn.wordpress.org.
The generated classmaps reference `/src/` files and operates in the assumption that the base directory is one level above `wp-settings.php`, which it isn't after our build processes are run.

See #36335


git-svn-id: https://develop.svn.wordpress.org/trunk@38402 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 14:36:42 +00:00
Scott Taylor
388690382c Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.
* `wp-admin` and `wp-includes` are scanned for classes to autoload
* Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see `composer.json`: `autoload.exclude-from-classmap`
* `wp-vendor/autoload_52.php` is included at the top of `wp-settings.php` - no changes need to be made to unit tests to include the autoloader
* An avalanche of `require()` and `require_once()` calls that loaded class files have been removed from the codebase.

The following files have been added to `svn:ignore` - they are not 5.2-compatible and fail during pre-commit:
* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

We favor these files instead:
* src/wp-vendor/autoload_52.php
* src/wp-vendor/composer/autoload_real_52.php
* src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run `composer install` or `composer update` from the project root to update the autoloader.

The future is now.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38399 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 09:15:01 +00:00
Drew Jaynes
5a96c219bf Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37491 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:09:59 +00:00
Drew Jaynes
c7bed4f8c6 Docs: Remove inline @see tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37342 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 03:59:56 +00:00
Dominik Schilling (ocean90)
4c8b3511a2 Customizer: Merge two translator comments.
git-svn-id: https://develop.svn.wordpress.org/trunk@36809 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-02 23:09:12 +00:00
Drew Jaynes
e2dd03abd4 Docs: Remove a duplicate @static tag from the WP_Customize_Panel->instance_count property DocBlock.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36568 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 00:13:21 +00:00
Weston Ruter
a2637cf34d Customizer: Hide help toggle button in panel when no description is supplied.
This aligns with the `.customize-panel-description` element which is also excluded if there is no description.

Props drebbits.web.
Fixes #35540.


git-svn-id: https://develop.svn.wordpress.org/trunk@36374 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 22:00:42 +00:00
Scott Taylor
c43245e29d Customize: move WP_Customize_Panel subclass to wp-includes/customize, it loads in the exact same place.
See #34432.


git-svn-id: https://develop.svn.wordpress.org/trunk@35386 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-24 18:24:21 +00:00
Weston Ruter
fd1dbfe003 Customize: Remove redundant aria-label attributes.
Adds an `$options` array argument to `WP_Screen::render_screen_options()` to allow the `div#screen-options-wrap` element to be omitted when `wrap` value is `false`.

Props afercia, westonruter.
Fixes #33182.


git-svn-id: https://develop.svn.wordpress.org/trunk@34093 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-13 06:15:42 +00:00
Dominik Schilling (ocean90)
709cb42ab3 Customizer: Switch buttons to match the focus order with the visual order.
props afercia.
see #33181.

git-svn-id: https://develop.svn.wordpress.org/trunk@33505 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 22:09:24 +00:00
Drew Jaynes
42b2d22710 Fix syntax and add missing @access tags to a variety of methods added to WP_Customize_Nav_Menus_Panel in 4.3.
See [32855]. See #32891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33219 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 20:43:51 +00:00
Scott Taylor
550763988b ob_get_contents() followed by ob_end_clean() can be replaced by ob_get_clean().
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32965 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 01:11:45 +00:00
Scott Taylor
713a547aad Add missing access modifier to WP_Customize_Nav_Menus_Panel::wp_nav_menu_manage_columns().
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32876 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 22:04:24 +00:00
Konstantin Obenland
bfb8734652 Keep WP_Customize_Nav_Menus_Panel with other panels rather than controls.
Accidentally merged into the wrong file in [32806].
H/t celloexpressions for noticing.

See https://wordpress.slack.com/archives/core-customize/p1434696254000258.
See #32576.



git-svn-id: https://develop.svn.wordpress.org/trunk@32855 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 08:36:37 +00:00
Dominik Schilling (ocean90)
cedda9aef1 Customizer: Decode HTML entities of panel/section titles.
Titles are now passed into Underscore templates but HTML-escaped, see #30737.

fixes #32670.

git-svn-id: https://develop.svn.wordpress.org/trunk@32822 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 19:47:58 +00:00
Weston Ruter
cc19680774 Add JS templates for Customizer Panels and Sections.
This extends the approach taken for Customizer Controls in #29572.

Props celloexpressions, westonruter, ocean90.
See #30737.


git-svn-id: https://develop.svn.wordpress.org/trunk@32658 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-30 00:02:13 +00:00
Scott Taylor
c8a44d437a Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 15:42:40 +00:00
Dominik Schilling (ocean90)
cced199188 Customizer: Replace accordion behavior of sections with a slide-in navigation.
This allows users to focus on the contents of the active section more easily and separating the navigation from the content/controls in the Customizer.

props valendesigns, celloexpressions.
see #31336.

git-svn-id: https://develop.svn.wordpress.org/trunk@32649 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 13:56:39 +00:00
Drew Jaynes
0f6ea391ab Add a missing file header to wp-includes/class-wp-customize-panel.php, separate out the class DocBlock for WP_Customize_Panel.
See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31541 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:08:48 +00:00
Scott Taylor
349e5cb318 Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value. Constructors do not have meaningful return values, anything that is returned from here is discarded.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31126 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:53:48 +00:00
Scott Taylor
101e00314d In Customizer classes:
* `public final function` methods should be `final public function` - confusing Hack and aligns with PSR2
* Some methods were missing access modifiers

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31083 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:01:08 +00:00
Dominik Schilling (ocean90)
104b31ae54 Customizer: Add panel/section type as CSS class to the HTML container.
see #28709.

git-svn-id: https://develop.svn.wordpress.org/trunk@30714 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-02 22:15:33 +00:00
Drew Jaynes (DrewAPicture)
e587324180 Docs Formatting: Backtick-escape inline code for all remaining dynamic hook docs in wp-includes/*.
Affects DocBlocks for the following hooks:
* `auth_post_meta_{$meta_key}`
* `term_links-$taxonomy`
* `customize_render_control_ . $this->id`
* `customize_render_panel_{$this->id}`
* `customize_render_section_{$this->id}`
* `customize_preview_{$this->id}`
* `customize_save_ . $this->id_data[ 'base' ]`
* `customize_update_ . $this->type`
* `customize_value_ . $this->id_data[ 'base' ]`
* `customize_sanitize_js_{$this->id}`
* `comment_form_field_{$name}`
* `comment_{$old_status}_to_{$new_status}`
* `comment_{$new_status}_{$comment->comment_type}`
* `extra_{$context}_headers`
* `get_template_part_{$slug}`
* `get_the_generator_{$type}`
* `get_{$adjacent}_post_join`
* `get_{$adjacent}_post_where`
* `get_{$adjacent}_post_sort`
* `{$adjacent}_post_rel_link`
* `{$adjacent}_post_link`
* `{$adjacent}_image_link`
* `blog_option_{$option}`
* `$permastructname . _rewrite_rules`
* `{$type}_template`
* `theme_mod_{$name}`
* `pre_set_theme_mod_$name`
* `current_theme_supports-{$feature}`
* `get_user_option_{$option}`
* `edit_user_{$field}`
* `pre_user_{$field}`
* `user_{$field}`

See #30552.


git-svn-id: https://develop.svn.wordpress.org/trunk@30656 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 12:09:56 +00:00
Drew Jaynes (DrewAPicture)
28072f473a 4.1 Docs Audit: Improve inline documentation for various properties and methods in the WP_Customize_Panel class.
See #30469.


git-svn-id: https://develop.svn.wordpress.org/trunk@30607 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-28 11:02:49 +00:00
Dominik Schilling (ocean90)
507243a3e2 Customizer: Add stable sorting for panels, sections and controls in JS. Improve sorting in PHP.
props westonruter.
fixes #30225.

git-svn-id: https://develop.svn.wordpress.org/trunk@30214 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 21:34:44 +00:00
Dominik Schilling (ocean90)
90182015e7 Improve/introduce Customizer JavaScript models for Controls, Sections, and Panels.
* Introduce models for panels and sections.
* Introduce API to expand and focus a control, section or panel.
* Allow deep-linking to panels, sections, and controls inside of the Customizer.
* Clean up `accordion.js`, removing all Customizer-specific logic.
* Add initial unit tests for `wp.customize.Class` in `customize-base.js`.

https://make.wordpress.org/core/2014/10/27/toward-a-complete-javascript-api-for-the-customizer/ provides an overview of how to use the JavaScript API.

props westonruter, celloexpressions, ryankienstra.
see #28032, #28579, #28580, #28650, #28709, #29758.
fixes #29529.



git-svn-id: https://develop.svn.wordpress.org/trunk@30102 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:50:21 +00:00
Dominik Schilling (ocean90)
061226df73 Customizer: Extract content markup for panels to its own method, WP_Customize_Panel::render_content().
This allows to override the behavior of a panel, or even to completely replace its contents with something other than controls or sections.

props celloexpressions.
fixes #29324.

git-svn-id: https://develop.svn.wordpress.org/trunk@29950 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:24:32 +00:00
Helen Hou-Sandi
bcba1996fe Customizer panels: use a single back button for all panels.
This also ensures the back button is visible on iOS devices.

props celloexpressions.
fixes #29135.


git-svn-id: https://develop.svn.wordpress.org/trunk@29610 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-25 23:04:43 +00:00
Andrew Nacin
112f9e9cc7 Separate WP_Customize_Panel from WP_Customize_Section.
props celloexpressions.
fixes #29197.


git-svn-id: https://develop.svn.wordpress.org/trunk@29487 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-14 04:39:42 +00:00