February 15, 2016

i0.wp.com

Responsive preview in the Customizer! http://i0.wp.com/wptavern.com/wp-content/uploads/2016/02/customize-device-preview.gif



Originally posted at The WP Guy - WordPress Web Design

Customizer Responsive Preview and Selective Refresh to be Merged Into WordPress 4.5

Responsive previews are coming to the Customizer in 4.5. Very cool! http://wptavern.com/customizer-responsive-preview-and-selective-refresh-to-be-merged-into-wordpress-4-5

Last week the feature plugin decision deadline closed and WordPress core contributors approved Responsive Preview and Selective Refresh for merge. The merge deadline is Wednesday, February 17, foll…

Originally posted at The WP Guy - WordPress Web Design

Video: How to Setup Automatic WordPress Backup with CodeGuard



WPBeginner - WordPress Tutorials originally appeared at http://www.youtube.com/watch?v=6i50juow8ps

February 12, 2016

PHP Unit Test Discussion (Feb. 12) Recap

We had a lively discussion about our PHP unit tests today.

Our goal here is to make writing unit tests a straight-forward, understandable experience by updating the PHP Unit Test handbook page.

During the meeting, we landed on some practical changes for the handbook page we can make soon.

  • VVV has out-of-the-box support for running WP PHP unit tests. We should suggest using it without giving it an obvious endorsement, as it is not officially endorsed by the project.
  • Getting phpunit running with MAMP (the application) is hard. We should link to Boone’s tutorial on the topic.

The rest of the meeting moved towards outlining our current approach to unit tests, especially in structure. We should discuss if these are best practices, and develop agreed upon standards for the project.

  • Our tests are organized into folders based on component. (browse the phpunit/tests folder)
  • There are a good number of top-level test files in the /tests folder. New tests should not go in these files.
  • We should consider migrating top-level test files into their respective component folders.
  • Tests for a specific function should go inside a single file within a component directory.
  • Generally the test file path has taken the form /tests/phpunit/tests/{component}/{functionInCamelCase}.php
  • Generally a file’s test class has taken the form Tests_{Component}_{FunctionInCamelCase}
  • Test method names should take the format test_{{description_of_what_is_expected}}. For example, test_termmeta_cache_should_be_primed_by_default.

Please leave a comment here if you have any thoughts.

I’ll schedule a meeting next week to continue our discussion.

Thanks to everyone who attended, this was a great meeting.



PHP Unit Test Discussion (Feb. 12) Recap by Eric Andrew Lewis was originally posted at https://make.wordpress.org/core/2016/02/12/php-unit-test-discussion-feb-12-recap/

Facebook’s move to lure video ad bucks from Google

Facebook is taking on Google in the video ad arena. http://www.cnbc.com/2016/02/12/instagram-will-show-video-views-as-facebook-challenges-youtube.html

Instagram is to show how many views a video has received in a bid by the Facebook-owned service to compete with rivals such a Google.

Originally posted at The WP Guy - WordPress Web Design

Call for Trac Tickets and Recap of 2/5/2016 Bug Scrub

On Friday, February 5th at 17:00 UTC, we had our regularly scheduled bug scrub. As a reminder, for the 4.5 release, trac bug scrubs will be held weekly each Friday at 17:00 UTC. Bug scrubs are held in the #core channel of WordPress Slack.

The Slack archive for last week’s meeting begins here: https://wordpress.slack.com/archives/core/p1454691785001716

During the bug scrub, the following tickets were covered:

#25247, #34722, #27272, #22198, #14393, #19627, #34521, #35630, #35692, #20419, #35737, #34887, #34996, #33045, #30352, #35624, #15448, #35736

Today, on Friday, February 12 2016 at 17:00 UTC the bug scrub will run approximately 1 hour. Participants need not be present for the full duration, and everyone is welcome to attend.

We’ll start with a list of pre-submitted tickets, before going to an open floor.

If you would like to submit a ticket for consideration for the bug scrub, please comment below with the ticket number. If you have extensive knowledge of the ticket, attending or adding accompanying text which provides a brief description of each ticket, its current status, and what needs to happen for the ticket would be appreciated. Bug scrubs are a great way to get extra eyes on tickets, feedback on patches, or suggestions on future routes.

Note: this will be the last pre-submitted tickets/open-floor style bug scrub for this release. All bug scrubs after this will focus exclusively on tickets currently milestoned for this major release in order to help expedite the betas and release candidates of the 4.5 release. Normal open-floor/pre-submitted ticket bug scrubs will resume after the stable release of 4.5.



Call for Trac Tickets and Recap of 2/5/2016 Bug Scrub by Chris Christoff (chriscct7) was originally posted at https://make.wordpress.org/core/2016/02/12/call-for-trac-tickets-and-recap-of-252016-bug-scrub/

February 10, 2016

Week in Core, Feb. 2-9 2016

Hi everybody! Welcome back to the latest issue of Week in Core, covering changes from February 2nd [36471] – February 9th [36504], changesets [36471-36504]. Here are the highlights:

  • 34 commits
  • 19 contributors with props
  • 114 tickets created
  • 13 tickets reopened
  • 52 tickets closed

Ticket numbers based on trac timeline for the period above.

Note: If you want to help write the next WordPress Core Weekly summary, check out the schedule over at make/docs and get in touch in the #core-weekly-update Slack channel.

Code Updates

Accessibility

  • Simplify the Plugins and Themes tables on the Updates screen. [36477] #34780

Administration

  • In login_header(), use correct separator for RTL locales. [36487] #35737

Comments

Database

  • Use the new wpdb::close() method for closing the DB connection. [36478] #34903

Docs

Posts

  • Make the $post param optional in get_post_field(). When $post is null, the current post object will be returned. [36481] #35683

Taxonomy

  • Allow get_terms() results to ordered by metadata. […] This brings order-by-meta support for terms in line with post, comment, and user queries. [36485] #34996
  • WP_Query taxonomy query vars should be set to first of multiple taxonomies […] for better parity with get_queried_object(), which will return the first taxonomy/term matched by the current query. [36484] #35619

Themes

  • Pass information about the old theme in the form of a WP_Theme object when the switch_theme action is fired. [36502] #22401

TinyMCE

Users

  • Display the new user email notice in user admin too. Also […], use the global $pagenow and add a translators comment for the placeholder. [36504] #35767
  • Use self_admin_url() for the email change confirmation link – prevents sending users to wp-admin/profile.php if they only have access to wp-admin/user/profile.php. [36503] #35766
  • When updating a user, invalidate its ‘userslugs’ cache. [36482] #35750

Props

Thanks to @afercia, @azaozz, @boonebgorges, @Chouby, @danielbachhuber, @DrewAPicture, @eherman24, @finnj, @Frozzare, @jadpm, @kouratoras, @markoheijnen, @MikeHansenMe, @ocean90, @pento, @ramiy, @sebastianpisula, @SergeyBiryukov, and @thebrandonallen for their contributions!



Week in Core, Feb. 2-9 2016 by Grant Palin was originally posted at https://make.wordpress.org/core/2016/02/11/week-in-core-feb-2-9-2016/

Core Dev chat notes for Feb 10

Agenda:

Schedule Notes, Status Updates, Open Floor

Schedule Notes

  • Today is the feature plugin decision deadline: Responsive Preview and Selective Refresh will be merged.
  • Next Wednesday (Feb 17) is the deadline for merge for these, with beta scheduled for the week after, on Feb 24.
  • Reminder: once beta ships, no more enhancements can be committed, so anything that is left or close to finished needs to be shored up in the next two weeks. Enhancements mile-stoned for 4.5 need attention to make it into the release in time.
  • Any help triaging the 4.5 milestone is definitely appreciated.
  • The REST API team’s proposal is to merge the four main endpoints when they are ready, and they are not ready for 4.5. As such, no endpoints are targeted for WordPress 4.5. A summary of last week’s chat is on make/core: leave feedback there or in the #core-restapi Slack channel.

Status Updates:

  • Image Improvements: @joemcgill
    •  Cache output of `wp_upload_dir()` to improve performance (#34359) is about ready to go in after some unit test updates )
    • Making progress on Improving Imagick file sizes (#33642) and Better animated GIF handling (#28474)
    • @markoheijnen made some interesting progress on generating thumbnails of PDFs in the media library and could use some feedback if you’re interested #31050.
  • HTTPS Improvements: @johnbillion
    • Plan is enforcing HTTPS on a per-feature basis (eg. enqueued assets, post content, redirects, canonical, links).
    • HTTPS-by-default on install will be something to aim for for 4.6, but we’ll see what happens over this next week.
  • Customizer: @westonruter, @celloexpressions
    • Pushed out the new version of the Customize Partial Refresh plugin. Needs testing!
    • Introduces a framework for registering partials (refreshable regions) with complete rewrites of nav menu partial refresh and re-implementation of widget partial refresh to use the new framework.
    • Going to write a Make Core post about it, documenting the API.
    • Biggest question is whether widgets should opt-in for selective refresh by default. Widgets that use JavaScript for their display will need get updated to work with selective refresh.
    • Responsive Preview (#31995) @valendesigns:  need to add unit tests and address any remaining issues
  • Multisite/WP_Site: @jeremyfelt
    • 15 tickets on the 4.5 milestone. Hoping to establish readiness for these over the next week and get some stuff in.
    • Going to start focusing more multisite related energy toward the REST API’s site (and meta) endpoints.
  • Editor: @azaozz, @iseulde
    • No updates this week: planning to get paste shortcuts in and work on mce views.

Open Floor



Core Dev chat notes for Feb 10 by Adam Silverstein was originally posted at https://make.wordpress.org/core/2016/02/11/core-dev-chat-notes-for-feb-10/

February 9, 2016

WP REST API: Version 2.0 Beta 12

Happy Tuesday 🙂 The WP REST API team is proud to bring you: 2.0 Beta 12 “Canyonero”. Download it from the plugin repository or from GitHub.

Here are some highlightsbreaking changes from the changelog:

  • Removes meta endpoints from primary plugin. If your project depends on post meta endpoints, please install WP REST API Meta Endpoints. For the gory history of meta, read #1425 and linked issues. At this time, we recommend using register_rest_field() to expose meta (docs).
  • Returns original resource when deleting PTCU. Now that all resources require the force param, we don’t need to wrap delete responses with the trash state.
  • Uses roles rather than role in the Users controller. Building the REST API gives us the opportunity to standardize on roles, instead of having both roles and role.
  • Moves to consistent use of context throughout controllers. Contexts limit the data present in the response. Here’s how to think of them: embed correlates with sidebar representation, view represents the primary public view, and edit is the data expected for an editor.
  • Removes post_* query param support for GET /wp/v2/comments. The proper pattern is to use GET /wp/v2/posts to fetch the post IDs to limit the request to.
  • Introduces rest_validate_request_arg()/rest_sanitize_request_arg(). Dedicated functions means we can use them for validating / sanitizing query args too. Removes WP_REST_Controller::validate_schema_property() and WP_REST_Controller::sanitize_schema_property().

As always, we have a detailed changelog as well as the full set of changes if you’re interested.

What’s the future of the WP REST API? I’d like to leave you with this final thought:

What came first, the chicken or the egg?
I egged the chicken, and then I ate his leg



WP REST API: Version 2.0 Beta 12 by Daniel Bachhuber was originally posted at https://make.wordpress.org/core/2016/02/09/wp-rest-api-version-2-0-beta-12/

February 8, 2016

PHP Unit Test Documentation Meeting

Writing unit tests is absolutely necessary when modifying functionality in WordPress core. Unit tests assure us that our code does what we expect it to do, and that changes we make don’t produce collateral damage.

How do you write these oh-so-important unit tests? Well, we have documentation on the topic, but it just reads “TODO”. Let’s do!

We’ll meet in #core on Friday, February 12th 7pm UTC for a working session to discuss and document PHP unit test authoring practices. Come!



PHP Unit Test Documentation Meeting by Eric Andrew Lewis was originally posted at https://make.wordpress.org/core/2016/02/08/php-unit-test-documentation-meeting/