Alain Schlesser introduced a feature project to work on the next iteration of the WordPress load process. Thereby, the bootstrap component should, for example, become better documented and more performant.
Continue reading "WordPress weekly recap #8: nextgen bootstrap/load feature project and more"Blog
Multilingual WordPress site with MultilingualPress
You can use various plugins to create a multilingual WordPress website. This post is a short introduction into MultilingualPress, which I use here on my site.
Continue reading "Multilingual WordPress site with MultilingualPress"WordPress weekly recap #7: Polyglots plans for the community summit and more
Before WordCamp Europe, in Paris, there is the community summit on June 13 and 14. The polyglots team already thought about aspects they can work on inside the team and with the other make teams.
Continue reading "WordPress weekly recap #7: Polyglots plans for the community summit and more"Displaying admin notice when update for specific plugin is available
I use the German Market plugin for generating invoices and use a custom font which is not integrated into the plugin by default, so I have to re-upload it after updating the plugin. So I do not forget this, I implemented an admin notice which is displayed if a German Market update is available. That is not very difficult, and this is the complete code:
/**
* Display admin notice so I remember uploading the Clavo font after updating German Market
*/
function fbn_german_market_typography_notice() {
$update_plugins_transient = get_site_transient( 'update_plugins' );
if ( $update_plugins_transient->response['woocommerce-german-market/WooCommerce-German-Market.php'] ) {
add_action( 'all_admin_notices', function () { ?>
<div class="notice notice-warning">
<p><strong>Nach dem »German Market«-Update den Clavo-Font für Rechnungen wieder hochladen!</strong></p>
</div>
<?php } );
}
}
add_action( 'admin_init', 'fbn_german_market_typography_notice' );
Code language: JavaScript (javascript)
I hook fbn_german_market_typography_notice()
to admin_init
. First, the function saves the value of the update_plugins
transient, which stores information about available plugin updates. If $update_plugins_transient->response['woocommerce-german-market/WooCommerce-German-Market.php']
is not empty, an update is available.
In this case, the admin notice is displayed (I use all_admin_notices
, so the notice is not only showed in the network admin), which hopefully will remind me to upload the font for the invoices … 🙂
Of course, the array key is different for every plugin. You can take a look at the value of the transient via var_dump( $update_plugins_transient );
to find the correct key.
PS: More on admin notices in the post »Admin Notices in Plugin UIs« by Caspar Hübinger.
WordPress weekly recap #6: editor prototypes and more
In the design team, two first prototypes for the new editor were introduced, which wants to be tested.
Continue reading "WordPress weekly recap #6: editor prototypes and more"Lazy loading images in a masonry grid
With lazy loading, you only load images when they are in the visible area of the visitor. Combining this method with a masonry grid can cause problems because the images are not loaded yet when the position of the grid items is calculated. Here I show you how to solve that.
Continue reading "Lazy loading images in a masonry grid"WordPress weekly recap #5: Plugin guideline changes and more
The plugin team introduced two changes for the plugin guidelines. The topics are spam and the usage of libraries which are bundled with WordPress.
Continue reading "WordPress weekly recap #5: Plugin guideline changes and more"Automatic updates for WordPress themes which are not in the theme directory
You can install automatic updates for themes from the WordPress.org directory. Here I show you how you can provide these automatic updates for themes, which are not in the directory.
Continue reading "Automatic updates for WordPress themes which are not in the theme directory"WordPress weekly recap #4: Improving the settings API and more
The core team works on improvements for the settings API. It should become easier for developers to use the API and the accessibility of the generated markup should be improved.
Continue reading "WordPress weekly recap #4: Improving the settings API and more"Modifying robots.txt for individual sites of a multisite install
WordPress creates a robots.txt
dynamically. To overwrite it in a normal non-multisite installation, you can just upload a static robots.txt
to the server. On a multisite install, this would overwrite the robots.txt
for all sites, which is not always the wanted behavior. This post explains how you can modify robots.txt
for individual sites of a multisite.