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

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 <?

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/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

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

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 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.

Plugin API ? WordPress Codex 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:

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.

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

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 (!

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.

Template Hierarchy Languages: English • Français • Italiano • 日本語 • 한국어 • Русский • Español • Português do Brasil • 中文(简体) • (Add your language) Introduction WordPress Templates fit together like the pieces of a puzzle to generate the web pages on your WordPress site. What this article is about This article seeks to answer the following question: Which template file(s) will WordPress use when it displays a certain type of page? Who might find this useful Since the introduction of Themes in WordPress 1.5, Templates have become more and more configurable. Using Conditional Tags WordPress provides more than one way to match templates to query types. The Template File Hierarchy The General Idea WordPress uses the Query String — information contained within each link on your website — to decide which template or set of templates will be used to display the page. With the exception of the basic index.php template file, Theme developers can choose whether they want to implement a particular template file or not. Examples

WordPress Debug Bar Plugin | BlackBox Here is something that WordPress developers might find very useful. Recently when working with symfony i figured out it would awesome to have debug bar in WordPress, similar like symfony has since version 1.0. After Googling WordPress debug plugin it turned out there was no such solution so i decided to developed one myself. Here is why you will find it helpful: instantly inspect global variables (GET, POST, COOKIE, SERVER)debug both frontend and admin areaexecuted MySQL queries and time it took to execute each query (useful for finding slow queries)profiler for measuring performance of your plugins and themeserrors occurred when loading WordPress page If you will decide to use the plugin please remember it’s not a perfect solution, it uses some workarounds, but it’s gets the job done, is lightweight and unobstrusive which i think is most important. Basically the debug bar is attached to the top of the browser window. Globals BTW. Profiler This is probably most useful feature of all. Errors

Gridlock 1.5 — archives dot eston bond dot com This theme has a theme of its own: being perpetually late. Originally released a year after I took it down as hyalineskies 6 in 2005, I’ve been completely plastered with multiple bug fixes, feature requests and other such development-related work since June 2007 when I stopped actively developing it. Since then, the Web has changed a lot. Gridlock, well, didn’t. I’ve got something to say, though: Gridlock’s back. One of the first magazine-style themes for WordPress When Gridlock was originally released, WordPress themes were still primitive, Blogger-like themes. Connected to social media. I love social media and design, so Gridlock should too. No messy code edits. Gridlock has been built to integrate its advanced features directly into the WordPress administration panel, so absolutely no editing of the Gridlock source code is required. An open project Gridlock is also an open project, licenced under a Creative Commons licence.