background preloader

Administration Menus

Administration Menus
Administration Menus Languages: English • 中文(简体) • 日本語 • Русский • (Add your language) Introduction Usually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. Function Reference Every Plot Needs a Hook To add an administration menu, you must do three things: Create a function that contains the menu-building code Register the above function using the admin_menu action hook. It is that second step that is often overlooked by new developers. Here is a very simple example of the three steps just described. <? In this example, the function my_plugin_menu() adds a new item to the Settings administration menu via the add_options_page() function. These processes are described in more detail in the sections below. Determining Location for New Menus Before creating a new menu, first decide if the menu should be a top-level menu, or a sub-level menu item. Dashboard Posts Media Links Pages Comments Appearance Plugins Users Tools Related:  WORDPRESS Developpement

Members Members is a plugin that extends your control over your blog. It's a user, role, and content management plugin that was created to make WordPress a more powerful CMS. The foundation of the plugin is its extensive role and capability management system. This is the backbone of all the current features and planned future features. Plugin Features: Role Manager: Allows you to edit, create, and delete roles as well as capabilities for these roles.Content Permissions: Gives you control over which users (by role) have access to post content.Shortcodes: Shortcodes to control who has access to content.Widgets: A login form widget and users widget to show in your theme's sidebars.Private Site: You can make your site and its feed completely private if you want. Professional Support Plugin Development If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's GitHub repository. Donations Yes, I do accept donations.

Creating Options Pages ? WordPress Codex Creating Options Pages Languages: English • 日本語 • Русский • (Add your language) This article is in transition to meet Settings API, which was introduced in Version 2.7. For information prior to 2.7 see this revision. Introduction Creating custom options panels in WordPress is relatively easy. First, to create the menu item and the new page, see Adding Administration Menus. So long as you stick to this structure, WordPress will handle all of the option creation, update, saving, and redirection for you. Several new functions were added in WordPress 2.7. This article only covers the markup of the Settings page itself. Where to Save the Code You can either put the code for your options page in your plugin php file (or, for Themes, in functions.php), or you can create a second file called options.php, for example, and include it using the php include function - Opening the Page <div class="wrap"><h2>Your Plugin Page Title</h2> Form Tag Closing Tags <?

Ultimate Guide to Roles and Capabilities » SolisLab Since Roles and Capabilities are introduced in WordPress 2.0, the User Level approach has been declared deprecated. However, it’s disappointing that a lot of plugins and themes out there still use user levels to control access to admin option pages and other functionalities. This guide shows you how to properly use Roles and Capabilities in your plugins and themes. Note: This article is a long one, therefore you should probably bookmark it so that you can always come back later for reference. Table of Contents What are Roles and Capabilities? As in other CMS and web applications, WordPress has a built-in system to verify whether a particular user has enough privilege to take a certain action. This system of Roles and Capabilities is much more flexible than User Level, since it enables you to add, remove or reassign capabilities among roles. Capabilities and administration menus As you can see, there’s always a required parameter called capability for each of those functions. WP_Role Class

Plugin API 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. 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. For a thorough listing of all action and filter hooks in WP see Adam Brown's WordPress Hooks Database. Function Reference Actions Modify database data. The basic steps to make this happen (described in more detail below) are: where:

Roles and Capabilities Roles and Capabilities Languages: English • Español • Français • 日本語 • Português do Brasil • 中文(简体) • (Add your language) Description WordPress uses a concept of Roles, designed to give the site owner the ability to control what users can and cannot do within the site. WordPress has six pre-defined roles: Super Admin, Administrator, Editor, Author, Contributor and Subscriber. The Super Admin role allows a user to perform all possible capabilities. Summary of Roles Super Admin – somebody with access to the site network administration features and all other features. Upon installing WordPress, an Administrator account is automatically created. The default role for new users can be set in Administration Panels > Settings > General. Roles A Role defines a set of tasks a user assigned the role is allowed to perform. The following sections list the default Roles and their capabilities: Super Admin Multisite Super Admins have, by default, all capabilities. Administrator Additional Admin Capabilities

Writing a Plugin ? WordPress Codex Languages: English • العربية • বাংলা • Español • Italiano • a Plugin 日本語 한국어 • Português do Brasil • Русский • ไทย • 中文(简体) • (Add your language) WordPress Plugins allow you to easily modify, customize, and enhance a WordPress site. Instead of changing the core program code of WordPress, you can add functionality with WordPress Plugins. Here is a basic definition. A WordPress Plugin is a program or a set of one or more functions written in the PHP scripting language, that adds a specific set of features or services to the WordPress site. Wish that WordPress had some new or modified functionality? This article assumes you are already familiar with the basic functionality of WordPress and with PHP programming. Resources To understand how WordPress Plugins work and how to install them on your WordPress blog, see Plugins. This section of the article goes through the steps you need to follow – and some things you need to to consider – when creating a well-structured WordPress Plugin. Plugin Name

Rôles, droits et privilèges des utilisateurs WordPress WordPress utilise un concept de rôles, conçu pour donner au propriétaire du site la possibilité de contrôler ce que les utilisateurs peuvent ou ne peuvent pas faire sur le site. Un propriétaire de site peut donc gérer l'accès des utilisateurs à des tâches telles que l'écriture et l'édition d'articles, la création de pages, la définition des liens, créer des catégories, modérer les commentaires, la gestion des plugins, la gestion des thèmes, et la gestion des autres utilisateurs, en assignant un rôle spécifique à chacun des utilisateurs. Qui a le droit de quoi sur WordPress ? Administrateur : Accès à toutes les fonctionnalités de l'administration WordPressEditeur : Peut publier et gérer les pages ainsi que celles des autres utilisateursAuteur : Peut publier et gérer ses propres articles uniquementContributeur : Peut écrire et gérer ses propres articles mais ne peut pas les publierAbonné : Peut uniquement gérer son profil Récapitulatif des Rôles, droits et privilèges sous WordPress

WordPress hooks database - action and filter hooks for wp plugin developers -- Adam Brown, BYU Political Science What is a hook? In brief, WordPress hooks enable you to change how WordPress behaves without editing any core files. Because you leave the WordPress files untouched, you can painlessly upgrade your blog with each new version of WordPress. If you don't know what WordPress hooks are for, read the Plugin API or this tutorial. What is this directory? If you're a plugin or theme developer, you know how difficult it can be to figure out which hooks are available. What is this good for? See what new hooks are available with each new version of WordPress See which hooks have been deprecated or renamed (use the "view all hooks" option) Easily learn exactly which WP file(s) use each hook. How to help? Update and improve the official action and filter references.

Developer Documentation Developer Documentation Languages: English • Español • Italiano • 한국어 • Русский • 中文(繁體) • (Add your language) Introduction WordPress is fast, lightweight, and easy to use. You may also wish to consult the Developer Documentation FAQ. WARNING: Programming Code Ahead The following articles may use programming terms without offering detailed explanations for non-programmers. Although the alteration of the downloadable files for WordPress is limited to a few distinct programmers, every WordPress user has the ability to effect change in the core WordPress code, making WordPress highly customizable. Plugin Development Writing a Plugin - The best starting place for learning about how to develop plugins WordPress Coding Standards - General information about coding standards for WordPress development Debugging in WordPress - Reference and guide for using the built-in debugging system in WordPress. APIs Contributing to WordPress Forums, Lists, and Blogs Other Information of Interest External Resources

Plugin API/Action Reference Languages: English • Русский • 日本語 • Português do Brasil • (Add your language) This is a (hopefully) comprehensive list of action hooks available in WordPress version 2.1 and above. For more information: To learn more about what filter and action hooks are, see Plugin API. (If you want to add to or clarify this documentation, please follow the style of the existing entries. Actions Run During a Typical Request These actions are called when a logged-in user opens the home page in Version 3.3.1. Actions are called with the function do_action(), except those marked (ref array), which are called with the function do_action_ref_array(). Actions Run During an Admin Page Request These actions are run when a logged-in user opens the Posts page in Version 3.3.1. In these actions, (hookname) depends on the page. Post, Page, Attachment, and Category Actions (Admin) post_submitbox_misc_actions add_attachment Runs when an attached file is first added to the database. add_category Same as create_category. wp

User Switching J’ai parlé récemment du plugin User Admin Password qui permet de se connecter à votre site avec le profil d’un de vos membres. User Switching permet la même manipulation de manière très différente. En allant sur le profil du membre, vous verrez apparaître un nouveau lien « Switch to » qui va vous permettre de vous mettre à la place du membre. Vous pouvez vous reconnecter automatiquement en tant qu’administrateur en cliquant sur le lien « Switch back to » qui apparait sur le tableau de bord du membre. Utilisation - site du plugin: - compatibilité à ce jour: WP 3.1 > WP 3.5.1 - version testée: 0.7.1

Function Reference/wp upload dir Function Reference/wp upload dir Description Returns an array of key => value pairs containing path information on the currently configured uploads directory. Checks the 'upload_path' option, which should be from the web root folder, and if it isn't empty it will be used. The upload URL path is set either by the 'upload_url_path' option or by using the 'WP_CONTENT_URL' constant and appending '/uploads' to the path. If the 'uploads_use_yearmonth_folders' is set to true (checkbox if checked in the administration settings panel), then the time will be used. If the path couldn't be created, then an error will be returned with the key 'error' containing the error message. On success, the returned array will have many indices: Usage Parameters $time (string) (optional) Time formatted in 'yyyy/mm'. Default: null Example Basic example to produce the upload directory URL. More in-depth break down of the data returned. <? Important Note Folder Name define( 'UPLOADS', trailingslashit( WP_CONTENT_DIR ).' Related

Function Reference Languages: English • Español • فارسی • Français • Italiano • 日本語 • ქართული • 한국어 • Português do Brasil • Русский • Türkçe • עברית • 中文(简体) • 中文(繁體) • (Add your language) The files of WordPress define many useful PHP functions. Some of the functions, known as Template Tags, are defined especially for use in WordPress Themes. There are also some functions related to actions and filters (the Plugin API), which are therefore used primarily for developing Plugins. The rest are used to create the core WordPress functionality. Many of the core WordPress functions are useful to Plugin and Theme developers. You can help make this page more complete! Here are some things you can do to help: Add documentation to un-documented functions, by creating sub-pages or at least by adding short comments in the lists below. Read Contributing to WordPress to find out more about how you can contribute to the effort! Functions by category Official and Unofficial References Trac Browser - WordPress source code.

Ten Things Every WordPress Plugin Developer Should Know - Smashing Magazine Advertisement Plugins are a major part of why WordPress powers millions of blogs and websites around the world. The ability to extend WordPress to meet just about any need is a powerful motivator for choosing WordPress over other alternatives. Having written several plugins myself, I’ve come to learn many (but certainly not all) of the ins-and-outs of WordPress plugin development, and this article is a culmination of the things I think every WordPress plugin developer should know. Don’t Develop Without Debugging The first thing you should do when developing a WordPress plugin is to enable debugging, and I suggest leaving it on the entire time you’re writing plugin code. Enabling debugging also turns on WordPress notices, which is important because that’s how you’ll know if you’re using any deprecated functions. How to Enable Debugging define('WP_DEBUG', false); Replace that line with the following: With those lines added to your wp-config.php file, debugging is fully enabled. if (! if (!