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

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.

70 Expert Ideas For Better CSS Coding Advertisement CSS isn’t always easy to deal with. Depending on your skills and your experience, CSS coding can sometimes become a nightmare, particularly if you aren’t sure which selectors are actually being applied to document elements. An easy way to minimize the complexity of the code is as useful as not-so-well-known CSS attributes and properties you can use to create a semantically correct markup. We’ve taken a close look at some of the most useful CSS tricks, tips, ideas, methods, techniques and coding solutions and listed them below. And what has come out of it is an overview of over 70 expert CSS ideas which can improve your efficiency of CSS coding. We’d like to express sincere gratitude to all designers who shared their ideas, techniques, methods, knowledge and experience with their readers. Update (29/05/2007): Brazilian-Portuguese translation of the article2 is also available. 1.1. 1.2. 1.3. Keep containers to a minimum. 1.4.

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:

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

Ultimate Guide to Roles and Capabilities | Gary Cao 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

flickrRSS for WordPress — Eightface This WordPress plugin allows you to display Flickr photos on your weblog. It supports user, set, favorite, group and community photostreams, and is relatively easy to setup and configure via a settings panel. The plugin also has cache support, allowing you to save thumbnails on your own server. Download flickrRSS from WordPress.org Installation Put the flickrRSS files into your plugins directory.Activate the plugin.Configure your options under the Settings tab.To use an image cache, create a writable directory and specify its location in the settings.Add <? Support & Questions At the moment, I’m not using the plugin and don’t have the time to support it. Want to work on the plugin? If you want to improve things, I’ve dropped the code on github, so you can fork it and have a go.

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.

Writing a Plugin 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

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

Event Calendar Inserts a list of the next few upcoming events. The formatting of the list is highly configurable. Simple Example: Add this code to your sidebar.php <li>Events <?php ec3_get_events(5); ? Parameters: $limit The maximum number of future events or days to list. $template_event (OPTIONAL) DEFAULT=”<a xhref=’%LINK%’>%TITLE% (%TIME%)</a>”. %TITLE% - the title of the event. $template_day (OPTIONAL) DEFAULT=”%DATE%:”. %DATE% - The date of the post. $date_format (OPTIONAL) DEFAULT=”j F”. $template_month (OPTIONAL) DEFAULT=”". %MONTH% - The month of the post. $month_format (OPTIONAL) DEFAULT=”F Y”. Example 1. <li>Events <? 2 January: First event. 5 January: Second event. 5 January: Third event. Example 2. <li>Events <? 2 January: First event. (10:00) 5 January: Second event. (09:00) Third event. (12:00) 14 February: Fourth event. Example 3. <li>Events <? January 2006: 2: First event. 5: Second event. 5: Third event.

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

Wordpress Reference Guide 3.0+ Presented by: Get Attachment Link get_attachment_link(); Returns the URI of the page for an attachment. $id Integer • Default: The current post ID, when used in The Loop. (Optional) The numeric ID of the attachment. Is Attachment is_attachment(); This Conditional Tag checks if an attachment is being displayed. The Attachment Link the_attachment_link(); Outputs a hyperlink to the attachment file, or Missing Attachment if the attachment can't be found. Integer • Default: the ID of the current post (Optional) ID of the desired attachment. $fullsize Boolean • Default: false (Optional) For an image attachment, use the original image (true) or Wordpress-generated thumbnail (false). $permalink (Optional) Link to the attachment page (true) or directly to the file/image (false). WP Attachment Is Image wp_attachment_is_image(); This function determines if a post's attachment is an image. $post_id Integer • Default: 0 Integer ID of the post. WP Get Attachment Image wp_get_attachment_image(); $attachment_id $size

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

Fluency Admin 3.2 | Forty Seven Robots Frequently Asked Questions What browsers does this work in? Fluency Admin has been tested in the latest versions of Safari, Firefox. Users of Internet Explorer may experience some display "issues" to to each browsers particular css-handling ability. Only minimal Internet Explorer testing has been done, no compatibility guarantees. I may fix bugs where possible, if they are pointed out - some probably can't be fixed. Why doesn't my plugin work with Fluency? The majority of plugins should work without issue when Fluency is activated, however there are a few that don't for one reason or another. Most common cause of a plugins incompatibility are highly custom admin pages, ie. those that don't follow the standard WordPress admin design. It's worth noting that most issues that other plugins have are due to poorly designed/coded admin pages, some of these issues I can 'hack' around with css, but many should be fixed by the author of the plugin in question.

Related: