Monday, 3 April 2017

Understanding Namespaces in the WordPress Hook System — SitePoint


Get 5 WordPress Themes for the Price of 1 For A Limited Time! Show Me The Themes
Hooks are a fundamental concept for WordPress developers. In previous articles on SitePoint, we’ve learned what hooks are and their importance, the two types of hooks: actions and filters with code examples of how they work, and an alternative way of firing actions and filters events and how to hook static and non-static class methods to actions and filters.
In this article, I will cover how to hook methods of an instantiated class (object) to actions and filters, how to integrate a namespaced class method to a hook, caveats of using namespaces in WordPress hook system and solution to them.
Hooking Object Methods
Assume you were tasked by your employer to build an ad manger plugin for a large news website, to make ad insertion to news content seamless. This is how you might go about building it.
You would create an AdManager class with a number of methods that contain the various ad-networks ad-code.
class AdManager {

/**
* AdSense unit code.
*/
public function adsense() { ?>
//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
Source: https://managewp.org/articles/14759/understanding-namespaces-in-the-wordpress-hook-system-sitepoint




source https://williechiu40.wordpress.com/2017/04/03/understanding-namespaces-in-the-wordpress-hook-system-sitepoint/

WordPress User Registration with Only Email Address


In previous tutorials, we learned how to create WordPress registration forms without requiring users to enter their username and password. Do you know you can also create a custom WordPress registration form with just an email field? where users can register or sign up to your WordPress site with only their email address without a username, password or any other custom field values. This is exactly what we’ll be building in this tutorial.
If you want to jump ahead of the tutorial below, you can view a demo of the email only registration form here and download the form theme here. We have a guide on installing ProfilePress form themes here.
Building the Registration Form
I assume you have ProfilePress installed and activated. If not, do that now.
Navigate to ProfilePress >> Registration Form and click the “Add New” button.
Add the code below to Registration Design.
1234567

Create an Account in Seconds

[reg-email title=”Email Address” placeholder=”Email Address”] [reg-submit value=”Register”]

And the CSS for
Source: https://managewp.org/articles/14758/wordpress-user-registration-with-only-email-address




source https://williechiu40.wordpress.com/2017/04/03/wordpress-user-registration-with-only-email-address/

Sunday, 2 April 2017

We Share Our Biggest Website Mistakes: WP-Tonic #176


This week we look at our most memorable and biggest website mistakes. We’ll talk about what we learned from our experiences, and what we changed in our processes afterwards. Feel free to follow along in the show notes below. Our episode this week is sponsored by Liquid Web. Liquid Web is offering a 33% discount for 6 months. Head over to LiquidWeb.com/wordpress and use the code WPTONIC33 at checkout for your discount.
This Weeks WordPress Expert Panel
David Hayes: from WPShout
Sallie Goetsch: from WP Fangirl
Jackie D’Elia: from Jackie D’Elia Design
Lee Jackson: from Angled Crown
John Locke: from Lockedown Design
Jonathan Denwood: from WP-Tonic.com
Lee’s Website Mistakes
Lee Jackson started a theme in today’s episode by stating one of his biggest website mistakes was updating a Multisite install without backing up everything first. Having backups of your site is important because if an update causes something to break, you can revert to the original state.
How Lee handles this now is using Duplicator Pro to create restorable backups before updating plugins or themes on sites. The other thing they do is create nightly site backups in Google Drive or Dropbox.
Source: https://managewp.org/articles/14757/we-share-our-biggest-website-mistakes-wp-tonic-176




source https://williechiu40.wordpress.com/2017/04/02/we-share-our-biggest-website-mistakes-wp-tonic-176/

Saturday, 1 April 2017

PressBrew Launches to Serve the Growing Beer Needs of the WP Community


It’s estimated that WordPress now powers 28% of the internet – but did you know that beer powers 93% of the WordPress community? (The remaining 7% is divided between whiskey, wine and amphetami… er, coffee.) This staggering figure was the impetus behind Pagely’s quest to quench the thirst of WordPress enthusiasts everywhere, via the bold – and potentially ill-advised – launch of PressBrew.
By harnessing the heat generated from managed servers across the globe, Pagely engineers are able to simultaneously brew a variety of palatable beers while they go about their normal jobs.
“It’s really a match made in heaven. Beer powered by servers that host some of the world’s largest WordPress sites has been a dream of mine since I was 17 – and now we’re making that dream into a delicious reality,” said Kristopher LaGraff, Dir. of Customer Success and Head Beer Meister.
Robert Rowley, Head of Security and Brewery Maintenance Technician, agrees. “After making sure our hosting platform is locked down, my new second priority is on quality hops and a clean finish. We’re there now, but we can always improve on both.”
Source: https://managewp.org/articles/14756/pressbrew-launches-to-serve-the-growing-beer-needs-of-the-wp-community




source https://williechiu40.wordpress.com/2017/04/02/pressbrew-launches-to-serve-the-growing-beer-needs-of-the-wp-community/

Why Developers Hate WordPress


This article is the opinion of the author and does not represent the official stance of Nanobox. I have a feeling that if you’re here, you either strongly agree or disagree with the title of this article. That’s fine. This is an opinion piece, so feel free to feel however you’d like. But I have data to back me up! According to the 2017 Stack Overflow Developer Survey, 64.5% of respondents said they dread WordPress. It’s the 3rd most dreaded platforms of those they included in their survey.
I want to talk about why developers – the people who are knee-deep in the code; who could and would rather build a custom solution; those who are expected to make it work and work well – hate WordPress. This list is by no means exhaustive, but represents common pain-points I’ve found from my own personal experience and experiences others have shared with me.
First, the Redeeming Qualities
Before getting into the pain-points, I feel I have to mention the things WordPress does well.
To start, it’s dead simple to install and setup. With a basic Apache/MySQL/PHP stack in place, you can be up and running in a matter of minutes.
WordPress is really easy to customize. The catalog of themes and
Source: https://managewp.org/articles/14755/why-developers-hate-wordpress




source https://williechiu40.wordpress.com/2017/04/01/why-developers-hate-wordpress/

New WordPress Plugin Repo Surprised Me! – By Ahmad Awais


I am a WordPress plugin developer. While I have written many plugins for WordPress and shared them on GitHub, I also host 12 plugins on the WordPress.org/Plugins repository — with more than 400k total downloads. A few days ago the new WordPress plugin repo went live, and I along with many other developers got surprised by that. I was very public with the feedback, I wrote about it on the Facebook’s Advanced WordPress group, wrote a post about it on WPLift, and in the form of comments on Make blog post.
But I feel like the feedback was either ignored, or the decision to make this new repo live was rushed with a few resources at hand, which could have addressed the feedback.
I Want To Like It!
Don’t get me wrong. I want to really like the new repo. The screenshots slider, the clean and minimal design part of which functions very well, is more than welcomed.
Maybe, we can have the description, screenshots, videos and all that on one page and then have other stuff like the changelog, FAQs, etc. in the form of tabs. Who knows!?
Sadly, there are issues, which we all knew about, from the beta. Those issues, are still there in the live version.
The Confusion
With due respect
Source: https://managewp.org/articles/14754/new-wordpress-plugin-repo-surprised-me-by-ahmad-awais




source https://williechiu40.wordpress.com/2017/04/01/new-wordpress-plugin-repo-surprised-me-by-ahmad-awais/

WordPress Plugin Directory Redesign: Why So Many People Feel Their Feedback Was Ignored


Earlier this week, the WordPress plugin directory relaunched with a new design and an improved search algorithm. Feedback has been rolling in from Tavern readers and members of the Advanced WordPress Facebook group. The improvements to search has received a number of positive comments in addition to people requesting the ability to sort results. The responsive design and aesthetics of the page have also received praise.
There are a number of items that plugin developers and users have reported as downsides to the new design. Some of the most notable include:
Plugin stats are only available to the plugin author by logging into the admin.
Tabbed layout was replaced with a series of Read more links.
Plugin banner images are distorted.
The Installation tab which provided instructions on how to install the plugin is gone.
Screenshots do not open in a lightbox, but open on a new page instead.
Links to download older versions of plugins is missing.
Many of the issues reported above are known and have been known for months. While it may seem like a lot of people are suddenly complaining and didn’t participate in the feedback loop, it’s important to look back to see how the plugin
Source: https://managewp.org/articles/14753/wordpress-plugin-directory-redesign-why-so-many-people-feel-their-feedback-was-ignored




source https://williechiu40.wordpress.com/2017/04/01/wordpress-plugin-directory-redesign-why-so-many-people-feel-their-feedback-was-ignored/