background preloader

Wordpress

Facebook Twitter

Plugin API « WordPress Codex (Navigation privée) Plugin API Languages: বাংলা • English • Español • Français • 日本語 • 한국어 • Português do Brasil • ไทย • 中文(简体) • Русский • (Add your language) Introduction This page documents the API (Application Programming Interface) hooks available to WordPress plugin developers, and how to use them. This article assumes you have already read Writing a Plugin, which gives an overview (and many details) of how to develop a plugin. This article is specifically about the API of "Hooks", also known as "Filters" and "Actions", that WordPress uses to set your plugin in motion. These hooks may also be used in themes, as described here. Hooks, Actions and Filters Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion.

You can sometimes accomplish the same goal with either an action or a filter. Function Reference Actions Modify database data. Create an Action Function Hook to WordPress. Wordpress Security Tips and Hacks - Noupe (Navigation privée) Feb 17 2008 We all agree that having a secure wordpress weblog should be our first priorities when keeping a successful blog. In this post we’d like you to share your knowledge and help us create the WordPress Security guide to keep the bad guys out. Below are 10 security tips that you can easily implement on your WordPress blog. Please share one or more life-savers you use permanently to help protect yourself from WordPress security issues. 1) Nobody should be allowed to search your entire server. WPdesigner advices us to NOT use this search code in the search.php<?

2) Directories should not be left open for public browsing There is a potential problem letting people know what plugins you have, or what versions they are. Options All -Indexes 3) Drop the version string in your Meta Tags This tag is in the header.php file that displays your current version of wordpress. 4) Protecting your WordPress wp-admin folder 5) Stay up to date 6) Take regular backups of your site and Database Homepage. Function Reference/wpdb Class « WordPress Codex (Navigation priv. Languages: English • Italiano • 日本語 • Русский • 中文(简体) • 中文(繁體) • (Add your language) Talking to the Database: The wpdb Class WordPress defines a class called wpdb, which contains a set of functions used to interact with a database. Its primary purpose is to provide an interface with the WordPress database, but can be used to communicate with any other appropriate database. The class source code is loosely based on the ezSQL class; written and maintained by Justin Vincent Using the $wpdb Object Warning: Methods in the wpdb() class should not be called directly.

WordPress provides a global object variable, $wpdb, which is an instantiation of the wpdb class defined in /wp-includes/wp-db.php. // 1st Method - Declaring $wpdb as global and using it to execute an SQL query statement that returns a PHP object global $wpdb; $results = $wpdb->get_results( 'SELECT * FROM wp_options WHERE option_id = 1', OBJECT ); // 2nd Method - Utilizing the $GLOBALS superglobal. A Warning SELECT a Variable <? Query <? Function Reference/in category « WordPress Codex (Navigation pri. Function Reference/in category Languages: English • 日本語 • (Add your language) Description Tests if the current post (or any specified post) is assigned to any of the specified categories. in_category() considers only the categories a post is directly assigned to (the checked categories in Write/Edit Post panel), not the parents of the assigned categories (but see Testing if a post is in a descendant category below).

This tag can be used to test the current post within The Loop or (since Version 2.7) outside the Loop during a single post request. Usage Parameters $category (mixed) (required) One or more categories specified by ID (integer), name or slug (string), or an array of these Default: None $_post (mixed) (optional) The post (integer ID or object). Return Values (boolean) Whether the post is assigned to any of the specified categories. Notes Since Version 2.5, you can specify categories by name.

Examples Testing the current post within the Loop Testing the current post outside the Loop Change Log. Wordpress : de l’usage créatif des widgets | Fantablog (Navigati. L’excellent Smashing Magazine à publié récemment un article très détaillé sur l’utilisation des Widgets de WordPress. Ces petites briques fonctionnelles que l’on ajoute à son gré dans un menu permettent d’apporter des fonctionnalités, sans devoir faire du développement. Mais au delà de cet utilisation classique et simple, les widgets de WordPress permettent beaucoup plus, comme d’ajouter de nouvelles zones dynamiques, de gérer la page d’erreur 404 , insérer des widgets entre des articles ou de personnaliser l’affichage des articles. 1.

Utiliser plusieurs zones pour afficher des Widgets iNove propose en standard quatre zones Un thème « Widget -ready » devient incontournable aujourd’hui. Déclarer les zone de Widgets Pour avoir plusieurs zones de Widgets, la première chose à faire est de déclarer ces zones dans le fichier functions.php de votre thème WordPress. Par exemple, le thème iNove utilise quatre zone de Widgets, déclarés comme ci-dessous. Activer les zones de Widgets 2. Exemples 3. 4. <? Support » Tags — term_relationships (Navigation privée) Support » MySQL query to search posts and change categories? (Na. Support » How to do a Custom Query for all posts NOT in an array.

Well, I can't see the code you have from the description, but if $exclude is in an array, then it won't recognize that. An array is a list of key=> value pairs that there would be no post match to (I've never seen a single post ID looks like "Array ([0]=>2 [1]=>6)" and so on. Usually it's just one digit). But like I said, you're not showing the code on how you come up with $exclude - but it sounds like if you print_r('exclude'); you 'll end up with a list of key=>value pairs 9as mentioned above) - and it won't exclude them because there's no match for it.

You'd have to explode and do a foreach to pull in comparisons to flag the ones you don't want to include. For example eave you the $exclude line, then your query will pull in all the posts using your query. If(have_post()) : while(have_posts(): the_post(); if(post->ID == '2') continue; // skips over any posts that have the id of "2" Support » Custom Post Select (tagged post within a category) (Na. Blog Tool and Publishing Platform (Navigation privée. Make WordPress Obey: List Posts on Static Pages (Navigation priv. By Published:August 21, 2009Posted in: Develop, WebTags: php, plugin, posts, static pages, WordPress WordPress is a great tool with ton of community support.

But sometimes, when you just can’t make it do your bidding, nobody has written a plugin to do what you want, and Google reveals no acceptable hacks, you just have to fire up Notepad and summon your inner PHP hacker. Coaxing WordPress into displaying certain posts on a static page is just one of those times. WordPress static pages are not supposed to show dynamic stuff. But, sometimes, you want them to anyway. Here’s a plugin that does just that. This plugin adds the ability to put a shortcode tag in any static page or post and have it display a list of posts using the get_posts template tag.

By default it will show the 5 most recent posts ordered in reverse date order, but it will accept any of the options provided by the get_posts template tag. [get_posts] ul_class. A couple of examples: About the Author Author Profile: sam. Tech Projects » Adding additional fields to wordpress/phplist pl. Nick from www.NicksJourney.com asked the following question regarding my wordpress/phplist plugin: How can I add more attributes other than Name and Email? (like Zip code, for example) – see my phpList Capture page at www.nickdaugherty.com/lists/ This is a common request from users, many want the ability to add additional customizable fields to wordpress/phplist plugin.

By default the plugin only offers one customizable field in addition to the default email field. The following hack provides a fairly easy way to extend the script to support more fields. Instructions on how to add additional fields to wordpress/phplist plugin: 1. 2. "" method="post">class="contactleft">for="email">‘ . Note: The key is to ensure the name attribute of the input tag corresponds with the correct name in phplist. 3.

Subscribe, Email Mailing List, Blog Update Alerts, and Newslette. Asking someone to “subscribe” to your blog used to mean signing them up on an email list. On a regular basis you would send out an email from that list with news about your site or blog encouraging them to return for a visit. Today’s notion of subscribing to a blog goes way beyond an email newsletter. When you ask someone to subscribe to your blog, you need to be specific.

Blog subscriptions now consist of: Email announcementsEmail alerts of new posts or activityEmail monitoring of comments on the blogEmail monitoring of comments on a specific postEmail newsletter subscriptionsSubmission to social bookmarking site submission servicesFull site feedSite comments feedCategory feedsAuthor feeds With so many ways to “subscribe” to a blog, I’ll do my best to cover some of the most popular subscription methods for each of these types of communication. If you have a favorite WordPress Plugin for handling your various subscriptions, please let us know in the comments below. Email Mailing Lists. 5 Essential Tips for Overcoming WordPress 2.8 Performance Proble. Sorry, but we couldn’t find anything matching your request.

What Happened? We’re sorry, but there’s been a problem accessing the page you requested. We’ve been doing some remodelling lately, moving the furniture around, and we’re sorry if we accidentally relocated something without leaving a redirect in place. If you would like to let us know about the error via the contact pages , that would be great. (We may be able to help you find the information you were looking for, and we can also fix the problem so it won’t occur again.)

Some Alternatives You can always use the navigation tabs at the top of the page to get around the site or the search box at the top right to find what you’re after. Other things to try: Search counsellingresource.com : Our Categories and Topics Here’s a list of the categories available in this section of the site: Plus a list of tags in this section: Last but not least, please feel free to return to the site’s front page .

Thank you!