Categories
Technology WordPress

Customizing the Privacy Policy link in Genesis eNews Extended

You put together a brand new fancy Privacy Policy page on your WordPress 4.9.6+ site and are ready to include a link to is using the latest version of Genesis eNews Extended. That’s great!

This is a brand new feature, though, so themes aren’t styling for it yet. What can you do?

Styling

Using the Customizer via Apperarance->Customize within WP-Admin, you can add a small bit of “Additional CSS” to change this link’s styling however you’d like. The link is within a small html tag with a class of enews-privacy  with the a tag itself having the WordPress-wide privacy-policy-link class.

In other words, you can target specifically the eNews privacy link with something like:

.enews-privacy a.privacy-policy-link {
color: green;
}

Other CSS selectors, such as the a:focus and so on can be used too.

Changing the text

The text and the link itself is set by WordPress. You can use the the_privacy_policy_link filter (inline docs) to update the entire HTML block or the privacy_policy_url filter (inline docs) to update the overall link or only the URL. Alternative, you can update only the text by using the gettext filter (docs).

For example:

<?php // do not include in an existing php file

// This one works great if this is a secondary site of a company with one central privacy page. Example: Jetpack's site might want the link to always go to automattic.com/privacy/
function bk_change_the_url_only( $url ) {
return 'https://example.com/privacy/';
}

add_filter( 'privacy_policy_url', 'bk_change_the_url_only' );
Categories
Featured Technology WordPress

Genesis eNews Extended 2.1 Released

Genesis eNews Extended 2.1 is now available on WordPress.org. It has been a couple of years since a new version has been released—frankly, the plugin just works and it hasn’t needed much work.

Please note this version requires WordPress 4.9.6 and will not be offered unless you’re running WordPress 4.9.6+.

The European Union is preparing to implement this week their new data protection law, GDPR, which impacts Genesis eNews Extended and WordPress. If you have WordPress 4.9.6, released last week, you can setup a privacy policy page which Genesis eNews Extended will provide a link to under the subscription form, if you choose.

The feature respects the WordPress setting for the privacy page, as well as the various hooks implemented as part of the new feature for both the text of the link and the link itself. If any themes or plugins filters these value, the widget will use the same values to help site administrators set once and forget.

On a related note, I’ve fielded a few questions about how to add a checkbox to the widget for GDPR compliance. From my best understanding, this is not required. A subscription form that is exclusively for an e-mail subscription does not require a checkbox to confirm the visitor intent, since the action they are doing is the one and the same. If a form exists for any other purpose, then there does need to be a checkbox to confirm the visitor intent to also subscribe to a list.

Because of this, I am not adding an option to add a subscription confirmation checkbox to Genesis eNews Extended. It is meant to be a very simple plugin exclusively for newsletter subscriptions and while site owners are free to use it for other purposes, I’m only building and supporting the intended use as a mailing list subscription form “wrapper” that allow Genesis theme styles to have an easy time theming a “standard” subscription form.

Update: 2.1.1 was also released to fix a small issue with a bit of extra code displaying on the front end.

Categories
Featured WordPress

WordPress Drop-In Plugins?

You know all about WordPress plugins and may have heard of Must-Use plugins, but what about “Drop-Ins”?

In WordPress, there are three types of plugins:

  • Regular plugins – in /wp-content/plugins/ and can (generally) be activated/deactivated/updated via wp-admin’s UI.
  • Must-Use plugins – in /wp-content/mu-plugins/. Only PHP files in the mu-plugins directory itself are detected and they are always loaded—you “must use” them. You can’t deactivate them or update them via UI. You must delete or move the file to deactivate and must manually update via FTP or some other out-of-WordPress method.
  • Drop-Ins plugins – in the wp-content but only specific file names. They replace/augment very specific functionality within WordPress.
File name
Purpose
Loaded
wp-content/advanced-cache.php
Caching functionality
When WP_CACHE is set true.
wp-content/db.php
Replaces WP’s default database handling.
Always.
wp-content/db-error.php
Custom DB error message.
Completely replaces the error page that usually says Error establishing a database connection.
Database Error
wp-content/install.php
Custom install scripts. Allows someone to override wp_install() or any other function in wp-admin/includes/upgrade.php
WordPress installation
wp-content/maintenance.php
Custom maintenance message. Completely replaces the Briefly unavailable for scheduled maintenance. Check back in a minute. error page.
During plugin/theme/etc updates.
wp-content/object-cache.php
Functionality specifically for an object cache.
Always.
wp-content/sunrise.php
Very early loading functions before multisite starts to load.
When SUNRISE is true. Multisite only.
wp-content/blog-deleted.php
Custom error message when loading a deleted subsite.
Attempting to access a deleted subsite. Multisite only.
wp-content/blog-inactive.php
Custom error message when loading an inactive subsite. Attempting to access an inactive subsite. Multisite only.
wp-content/blog-suspended.php
Custom error message when loaded a suspended site.
Attempting to access a suspended subsite. Multisite only.

The list is very specific and, in many cases, providing a quick replacement to an error page where it may not make sense to try to add via hooks or filters.

The kicker is the caching ones—advanced-cache.php or object-cache.php—are often added by the installation/activation functions of caching plugins but are not always removed when uninstalling. If the caching plugin is deleted via the file manager instead of a typical deactivation, it wouldn’t be able to delete the drop-in either.

If you run into situations where you’re trying to debug something and it seems like there is mysteriously cached items. Check out the wp-content directory and try renaming those files to force-deactivate a cache if there are seemingly no normal caching plugins active.

Categories
Microblog Site Info WordPress

Keeping It Clean

I went through my debug log tonight, which had been a bit long mainly due to older plugins throwing warnings in PHP 7.

Of four plugins generating PHP 7 warnings, two had merged-but-unreleased fixes, one has a pending PR that I could apply and confirm working, and wrote a PR for the last one.

Clean logs here I come!

Categories
Featured Microblog Technology WordPress

More blogging and less social media

Entering 2018, I plan on setting a New Years’ resolution of using social media less, and blogging more.

Source: More blogging and less social media

The founder of Drupal, a “competing” CMS to WordPress hits the nail on the head here. I’m planning on doing the same.

I do like that I look up old friends on Facebook. I like it as a directory, but as a content consumption tool, it seldom brings joy to my day. Maybe if it had a filter to only display “life news”—weddings, births, illnesses, deaths, new jobs and the like.

So yeah, here’s to blogging more and owning my own content more in 2018.

Categories
Microblog WordPress

Mobile App UI Fail

This morning, I needed to post a quick note to my team’s p2 about a scheduled standing meeting today I would be missing. I often use the mobile app for posting something short like that (and this post).

This works well until when I post it to this site instead of the p2.

Would an “Are You Sure?” be a good idea for publishing?