The 10 commandments of the WordPress developer

Being WordPress developer does not require special abilities, different from those of programming in PHP or CSS, but if there is tips that can make a difference and develop solid developments and, above all, without problems for him or his clients.

That is why I thought it convenient, because the tips are right, translate this list prepared by Floris P. Lof :

1. Always define WP_DEBUG to true during development

You can not imagine the number of code error notifications that you will receive from plugins and themes. All these low level warnings can cause memory failures, which will reduce the performance of the site by consuming more memory than necessary. WP_DEBUG is also a very useful tool to discover if you are using obsolete functionality.

2. Stay tuned to the WordPress code and CSS standards

The WordPress standards have been established after years of experience. If you abide by these rules you will get a clean and easily readable code for yourself and others. Hence the slogan "the code is poetry" ..

3. Comment your code

Your code should not only be easy to read by others but you should be able to let the rest understand why you chose to write a code in this or that mode. There are many ways to dress a saint, but explain your choice following the instructions in Codex .

4. Learn how the WordPress "core" works, read the actual lines of code

You should know how WordPress works internally. When are the plugins loaded in mulsitis? When are requests made to the database? When are the files loaded? and all that. You can learn a lot from reading the "core" of WordPress.

5. Use the functions and internal WordPress APIs whenever you can

Do not dwell on the wheel, before writing code learn if there is a function or procedure that is already in the "core". Learn from the "core", as I have pointed out before, and discover how everything works. You will be surprised by everything you will find there. Some examples would be these utility functions .

6. Put pommery to your code

There are many people who write code for WordPress in themes and plugins. And it's quite possible that your function name, or variable class, is the same as someone else's. For that reason you should always put pomp, like your initials or your website. For example (AW):

aw_display name ();

7. Never trust the user's action! Sanitiza & escape!

This is a major problem, now and maybe forever. WordPress is loaded with tools that allow you to write secure sites. A good idea would be the chapter 6 of this book . You already had it, right?

8. Use nonces

This would be an extension of the previous commandment. Using "nonces" ensures all the functionality your forms need. Review this Codex page

9. Locate your code

In Europe, unlike in America, we are very used to writing in several languages, so it is not surprising that a client asks you to have a theme or plugin available in another language or dialect. [19659003] So write your code thinking that it is "internationalizable". This will make adding another language in the future easier.

10. Performance, performance, performance

You have to develop high performance sites. In all the code that you write or include, be it a request to the database, PHP code, HTML, CSS, JavaScript or attachments as images, always bear in mind the performance. Every nanosecond counts.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

faster, lighter • WordPress Help

For a change, when we have not yet gotten used to the news from WordPress 3.1 the development of the following version is already underway: WordPress 3.2 and according to Mark Jaquith will be a powerful review like few, namely …

It seems that Mark has very clear things and we are in a very good direction to make WordPress remain the CMS par excellence.

Personally I love the line of development proposed, something that we had been asking for a long time: leave ornaments and make a WordPress lighter and faster .

WP Bundle

WP Bundle is a pack of WordPress themes that, for $ 80, will offer 10 "core" themes with a huge number of features. The project, still in progress, promises really interesting topics so it can be seen in the captures of them.

A peculiarity is that the themes will be Open Source, so you can modify and improve them to your liking once acquired. It is an interesting project, of which we must be aware …

Export in WordPress 3.0 – WordPress Help

Following the development of the updates of WordPress 3.0 I find in the latest version that the export utility has been completely remodeled, turning it into something – finally – really useful.

What it has been added is the possibility of exporting the content of your WordPress but can be selected by …

Does it sound like ?, Well yes, it seems that it has been integrated into the core functionality of Advanced Export for WP / WPMU a great plugin that, from WordPress 3.0 you can do without.

WorPress MU – Goodbye WordPress MU

So from now on all the notice tickets for new functionalities, solutions to failures, etc., will go on the WordPress trac which is already aimed at the integration of the WordPress version 3.0. [19659002] Soon we will have to stop using the WordPress label MU . It seems that WordPress 2.9.1 is already the latest version of WordPress MU, which has been with us for years, giving good service and offering communities. Thanks WordPress MU!

Removing menus from the WordPress desktop • WordPress Help

If you manage customer sites and want remove access to administration menus even if the user is an administrator, you can do so in a very simple way and, most importantly, without touching the ' core ' files of WordPress, so you will not have to redo the modifications after an update.

As you will be imagining, we will make use of it of the file functions.php of your active theme – and if it does not exist, create it right now – and we'll add this code:

What do you get with this? ?, so that you only see the custom menus – usually the ones that add the plugins – and those that you remove from the list of $ restricted . In the previous example you would only see the desktop and those menus of the plugins that you have active and to which, by your user profile, you have access, just what you see above in the capture.

If you also want to remove access to the desktop only you would have to add it to the ista __ ('Dashboard'), .

Now, a seasoned user can still access the different sections by typing the URL, that is, even if you remove the menu, if someone types will have access. If you also want to eliminate that possibility, for the menus that you define, then the code should be complicated a bit more, something like this:

With this code you eliminate the visualization and the access to the menus. And in the list of $ restricted you can add or remove menus at will.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

WordPress 2010 • WordPress Help

One of the ideas that emerged in the talk among the feeds of the WordPress "core" code has been that in 2010 there will be a new theme by default in WordPress, leaving the already veteran ] Kubrick to move on to another one that will be called … 2010 theme (a lot has not yet been squeaked out.)

Personally I think it's okay to change it all at once, but I do not know what theme style I would like it by default, what about you?

WordPress MU will be activated as if it were a plugin

One of the details that I forgot to comment yesterday and that the good friend ejner69 has reminded me in his reference is the way in which WordPress MU will be activated when the integration between WordPress and WordPress Mu is carried out, we still do not know if for WordPress 2.9 or for WordPress 3.0 .

What he has told us today José Fontainhas is that we will install "the" version of WordPress and, after doing so, and within our Board, we can activate (or not) the multi-user option (or multiblogs, as you prefer) as an additional functionality ]only if you need it … as if it were an internal plugin of the core of WordPress.

Do not you think it's a great way to integrate it ?, I personally think it's the best possible option. It's like, to say something, if you installed a Windows of the before and, with a click, you could turn it into a Windows NT … if you're worth the comparison (which is hateful as all).

Be a WordPress BetaTester in a simple way? • WordPress Help

If you want to participate in the development of WordPress, and improve the future versions of this CMS with your bug warnings, or even suggestions for improvement, you should know that you can do it, and it's not difficult. [19659002] As you can see, you can help in the WordPress development in many ways, you only need to launch yourself if you feel capable of supporting the future of this CMS.

If you are animated but do not have your own space where try WordPress you can do it on the site of Beta Testing WordPress that I created, which will always be updated to the " bleeding edge " version.


Do not update anything! • WordPress Help

 wordpress installation "title =" wordpress installation "width =" 208 "height =" 193 "class =" aligncenter size-full wp-image -5763 "/> </a></p>
<p> If you are <strong> webmaster </strong> from several installations of WordPress, especially if you have <strong> personalized themes or plugins </strong> for some client or yourself, or do not want to be given the can every time you see an update notice of the theme, plugin or even WordPress do not miss this post. </p>
<p> It has happened to me more than once that, after customizing a plugin or theme for a client, he has seen the available update, and then the relevant call (or impertinent, depending on how you look at it) … </p>
<p> "Fernando, the web does not work for me!" </p>
<p> And hala, to pull back to solve the disaster Fortunately there are solutions … </p>
<p> There is a magic trio, created by <a href= John Blackbo urn – to which I will never be grateful enough – that will help you in this task of leaving you the decision to update, without WordPress having to warn you. You choose which are active, they are:

  1. Disable WordPress Plugin Updates – Remove the available update notifications, including the counter in the form of "sandwich".
  2. Disable WordPress Theme Updates – Your client already will not be tempted to update that theme to which you made so many customizations.
  3. Disable WordPress Core Update – If you do not want to compromise the installation of your WordPress with hasty updates with this plugin you can remove the update notifications. Then, when you read in WordPress Help that the update is safe, you can do it safely and in a controlled environment.

If you want to refine the shot even more, we have already talked about how cancel announcements update of translations of concrete plugins or of WordPress even though they require a "touch" manual.

Now, you must bear in mind that these plugins do not have pages of options, nor can you control that it warns you of some plugins if and others do not, it is global: it deactivates the update notices. So do not give up on your obligation to keep up to date and informed of the security updates necessary for you and your clients. Here we will try to keep you up to date.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you: