Welcome to ManageWP.org

Register to share, discuss and vote for the best WordPress stories every day, find new ideas and inspiration for your business and network with other members of the WordPress community. Join the #1 WordPress news community!

×

6 min read Ben Gillbanks
Editorials | wp-includes.org | Oct. 10, 2016

Everything cool and wrong about upcoming WordPress 4.7

A look at some of the core changes coming to WordPress 4.7 - including some refactored code, and a few breaking changes that could affect backwards compatibility for some themes and plugins.

Everything cool and wrong about upcoming WordPress 4.7

Editorials | wp-includes.org | Oct. 10, 2016

WordPress 4.7 has been announced for christmas this year and it will have great changes for developers. It finally cleans up some things and not only have a hyped Twentyseventeen theme. I reviewed the commits and like to share with you what is new and what might break your site. Nice shiny code in the upcoming WordPress 4.7
Some in the community complain about bad code and sometimes it really hurts my eyes too. But while reading the commits I found some interesting approaches to clean up everything. Read on to see how the code gets better.
WordPress wants to get rid of global variables
Usually you and the whole WordPress-Core-Team does this whenever they need a query:
global $wpdb;
Scott Taylor on 18.08.16 at 20:20
Query: add a `protected` field, `$db`, (composition, as it were) to `WP_*_Query` classes to hold the value for the database abstraction, instead of importing the `global $wpdb` into every method that uses it. Reduces the number of global imports by 32.
So after WordPress 4.7 on you can use the protected $db field
$this->db->posts // to get the name of the posts table
I hope for a getter because right now this field is protected and does not really have any advantage

12 min read Ahmad Awais
Development | wp-includes.org | Oct. 7, 2016

WordPress 4.7 - What is new and what might break my site?

Read what's coming! Some site breaking changes in there. Must read for WP devs.

WordPress 4.7 - What is new and what might break my site?

Development | wp-includes.org | Oct. 7, 2016

WordPress 4.7 brought a lot of new features in September and there are more to come. Again there are great things like custom bulk actions, better theme inheritance and many more. But there are also things that might break your customers site which I want to show you. Go to
New goodies in the WordPress Core
This blog is all about the WordPress Core – no plugins, no themes. So I am always happy when the core has some new features I can play with. Below you’ll find the latest changes and some nerdy examples.
Theme inheritance made easier
Those who read this blog know that theme inheritance is possible for ages using the locate_template function. With WordPress 4.7 there will be additional functions which do the same:
get_theme_file_uri
get_parent_theme_file_uri
get_theme_file_path (almost like locate_template)
get_parent_theme_file_path
The names speak for themselves. A call like get_theme_file_uri('inc/foo.php') will look up the file “inc/foo.php” in the child-theme and afterwards in the parent theme. Once found it will return the URL to this file or the path in case of the get_theme_file_path function.
If this is not enough then filters like theme_file_path can