<node>constants
<node>directory
<node>example
<node>hooks
<node>SESSIONS
<node>html5
<node>reserved words
<node>Settings
<node>Upgrades
<node>uploads
<node>urls
<node>How to Include a WordPress Page
<node>Stupid WordPress Tricks
<node>Ten Things Every WordPress Plugin Developer Should Know
<node>WARNINGS
<Treepad version 3.0>
dt=
<node>cheat sheets
0
http://www.buildyourownblog.net/blog/time-saving-copypaste-wordpress-cheat-sheet/The Time Saving Copy/Paste WordPress Cheat Sheet
while(have_posts()) {
the_post();
}
Use this WordPress Cheat Sheet page for a quick, categorized list of WordPress functions that are commonly used when building, updating and maintaining templates. Simple, Easy, Copy-Paste. The quick guide to common WordPress > Template functions. Pdf Icon
——————————————————————————–
Basic Template Files
File Name
Description
style.css style sheet file
index.php home page file
header.php header content file
single.php single post page file
archive.php archive/category file
searchform.php search form file
search.php search content file
404.php error page file
comments.php comments template file
footer.php footer content file
sidebar.php sidebar content file
page.php single page file
front-page.php latest posts or static page
tag.php display tags in archive format
category.php display categories in archive format
Header Functions
Function
Description
<?php site_url(); ?> root url for website
<?php wp_title(); ?> title of specific post/page
<?php bloginfo('name'); ?> title of site
<?php bloginfo('description'); ?> site description
<?php get_stylesheet_directory(); ?> stylesheet folder location
<?php bloginfo('stylesheet_url'); ?> style.css file location
<?php bloginfo('pingback_url'); ?> pingback url
<?php bloginfo('template_url'); ?> template folder path
<?php bloginfo('version'); ?> wordpress blog version
<?php bloginfo('atom_url'); ?> atom url
<?php bloginfo('rss2_url'); ?> rss2 url
<?php bloginfo('url'); ?> root url for website
<?php bloginfo('html_type'); ?> html version
<?php bloginfo('charset'); ?> charset parameter
Navigation Menu
Default Navigation Menu
<?php wp_nav_menu(); ?>
Specific Navigation Menu
<?php wp_nav_menu( array('menu' => 'Project Nav' )); ?>
Category Based Navigation
<ul id="menu">
<li <?php if(is_home()) { ?> class="current-cat" <?php } ?>>
<a href="<?php bloginfo('home'); ?>">Home</a></li>
<?php wp_list_categories('title_li=&orderby=id');?>
</ul>
Page Based Navigation
<ul id="menu">
<li <?php if(is_home()) { ?> class="current-page-item" <?php } ?>>
<a href="<?php bloginfo('home'); ?>">Home</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>
</ul>
——————————————————————————–
Template Functions
Function
Description
<?php the_content(); ?> content of posts/pages
<?php if(have_posts()): ?> check if there are posts
<?php while(have_posts()): the_post(); ?> shows posts
<?php endwhile; ?> closes loop
<?php endif; ?> closes if
<?php get_header(); ?> header.php file contents
<?php get_sidebar(); ?> sidebar.php file contents
<?php get_footer(); ?> footer.php file contents
<?php the_time('m-d-y'); ?> the date is ’08-18-07'
<?php comments_popup_link(); ?> link to comments of post
<?php the_title(); ?> title of post/page
<?php the_permalink(); ?> url of post/page
<?php the_category(); ?> category of post/page
<?php the_author(); ?> author of post/page
<?php the_ID(); ?> id of post/page
<?php edit_post_link(); ?> edit link of post/page
<?php wp_list_bookmarks(); ?> links from blogroll
<?php comments_template(); ?> comment.php file contents
<?php wp_list_pages(); ?> list all pages
<?php wp_list_categories(); ?> list all categories
<?php next_post_link('%link'); ?> url to next post
<?php previous_post_list('%link'); ?> url to previous post
<?php get_calendar(); ?> show post calendar
<?php wp_get_archives(); ?> list of archive urls
<?php posts_nav_link(); ?> next and previous post link
<?php rewind_posts(); ?> rewinds post for a second loop
The Loop
Basic Loop
<?php if(have_posts()) { ?>
<?php while(have_posts()) { ?>
<?php the_post(); ?>
<?php // custom post content code for title, excerpt and featured image ?>
<?php } // end while ?>
<?php } // end if ?>
Extra Functions
Function
Description
/%postname%/ custom permalinks
<?php include(TEMPLATEPATH . '/x'); ?> include file from template folder
<?php the_search_query(); ?> value returned from search from
<?php _e('Message'); ?> return translated text from translate()
<?php wp_register(); ?> register link
<?php wp_loginout(); ?> login/logout link
<!–nextpage–> divide content into pages
<!–more–> cut off content and create link to full post
<?php wp_meta(); ?> admin meta data
<?php timer_start(); ?> start page timer (header.php)
<?php timer_stop(1); ?> time to load the page (footer.php)
<?php echo get_num_queries(); ?> show queries executed to generate page
<end node> 5P9i0s8y19Z
dt=
<node>constants
1
get_site_url()
get_theme_root_uri(), get_stylesheet(), get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo()
WordPress Directories:
home_url() Home URL http://www.example.com
site_url() Site directory URL http://www.example.com or http://www.example.com/wordpress
admin_url() Admin directory URL http://www.example.com/wp-admin
includes_url() Includes directory URL http://www.example.com/wp-includes
content_url() Content directory URL http://www.example.com/wp-content
plugins_url() Plugins directory URL http://www.example.com/wp-content/plugins
theme_url() Themes directory URL (#18302) http://www.example.com/wp-content/themes
wp_upload_dir() Upload directory URL (returns an array) http://www.example.com/wp-content/uploads
Categories:
WordPress Constants
Here are some of the constants and how they are used. There are probably a few that I missed. I’ll add to this as I find more.
Security Constants
These constants are declared in wp-config.php and are required for the normal operation of WordPress. All of these constants are 64 character random strings and are used for hashes, nonces and other security purposes. Each installation of WordPress should use different strings to ensure that your site is harder to “hack.” If you haven’t already changed your security keys, you can use WordPress’s online security key generator.
AUTH_KEY – Used for authenticating a user and setting cookies.
SECURE_AUTH_KEY – Used for authenticating a user and setting cookies under the https protocol.
LOGGED_IN_KEY – Used for marking a user’s cookie data as logged in.
NONCE_KEY – Used for creating Nonces, which are used as one-time values to ensure that humans are entering data in forms.
AUTH_SALT – Used to “salt” the authentication data. Salts are random data added to passwords, keys and other data to make them harder to guess.
SECURE_AUTH_SALT – Used to “salt” the secure authentication data.
LOGGED_IN_SALT – Used to “salt” the logged in cookie data.
NONCE_SALT – Used to “salt” the nonce data.
Database Constants
These are used to declare your database connection information. If you ever need to change your database password or location, you can effect this by editing your wp-config.php file and change these values:
DB_NAME – The name of your database.
DB_USER – The user name for your database connection.
DB_PASSWORD – The password for your database connection.
DB_HOST – The host name, or computer name where your database server is located.
DB_CHARSET – The character set used when creating tables in your database. Unless you have a specific requirement for something else, this should have a value of ‘utf8?.
DB_COLLATE – The collation (sorting) type to use for indexed data in your tables. This should be left empty unless you have a specific requirement otherwise.
Other wp-config.php Constants
These are the last few constants that are normally declared in wp-config.php:
COOKIE_DOMAIN – Specifies the domain set in cookies for those with unusual domain configurations. This can help to prevent cookies being sent with requests for static content. Example: define(‘COOKIE_DOMAIN’, ‘www.staticdomain.com’);.
WP_DEBUG – Sets WordPress’s “debug” mode on or off. Normally, this is set to false. Changing it to define(‘WP_DEBUG’, true); will turn on debug mode. This can be useful if you need to track down errors.
WP_HOME – This overrides the configuration setting for the home url, but doesn’t change it permanently. This should include the http:// prefix, as in: define(‘WP_HOME’, ‘http://domain.com/optionalsubdirectory’);.
WP_SITEURL – Declares the site’s URL. This defines the address where your WordPress code files reside. It should include the http:// prefix. An example would be: define(‘WP_SITEURL’, ‘http://mydomain.com’);.
WPLANG – Used to localize your WordPress install. This should be left empty for a default language of American English. If you need to localize your WordPress installation, you need to change this and install a corresponding MO file for your language. For example, changing this to: define(‘WPLANG’, ‘de_DE’); will set your language to German.
DISABLE_WP_CRON – Used to turn off WP Cron tasks that are initiated y a page load. When this is disabled, it is recommended to set up a separate Cron job to run the wp-cron.php script on a regular basis in order to still have cron-related operations run.
System Constants
These constants are set to describe the state of how WordPress handles various requests.
APP_REQUEST – Set within wp-app.php to indicate that WordPress is handling an Atom Publishing Protocol request.
Default Constants
These values are declared in the wp-includes/default-constants.php file. You to change these settings, add them to your wp-config.php file so they are declared before the wp-includes/default-constants.php file is loaded.
ADMIN_COOKIE_PATH – Sets the cookie path for admin-based cookies. If not already defined, this will take the value: define(‘ADMIN_COOKIE_PATH’, SITECOOKIEPATH . ‘wp-admin’);
AUTH_COOKIE – Sets the authentication cookie name. If not already set, will be: define(‘AUTH_COOKIE’, ‘wordpress_’ . COOKIEHASH);
COOKIEHASH – Defines an MD5 hash of the site’s domain name for use in user and password cookie names.
COOKIEPATH – Defines the path name to be used in setting and retrieving cookies. If not already set, will be the domain name in which WordPress is installed. On MultiSite installs, will be the subdomain name, or the domain name including the directory of the Site.
FORCE_SSL_ADMIN – Enforces the use of SSL for Admin access. Normally, this is disabled. To force SSL for all Admin pages, you can: define(‘FORCE_SSL_ADMIN’, true);
FORCE_SSL_LOGIN – Enforces the use of SSL for site logins. Normally, this is disabled. To force SSL for login requests, you can: define(‘FORCE_SSL_LOGIN’, true);
SITECOOKIEPATH – Sets the cookie path for normal site cookies. If not set, this will take the value define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_option(‘siteurl’) . ‘/’ ) );
WP_CONTENT_DIR – Sets the name of the content directory. Normally, this is ‘wp-content’. To change this, you can: define(‘WP_CONTENT_DIR’, ‘mycontentdirectory’); This can also be obtained by using plugin_dir_path()
WP_CONTENT_URL – Sets the URL for the content directory references. if you change the WP_CONTENT_DIR, you will also need to change this to match the directory name for http requests.
WP_DEBUG_DISPLAY – Controls display of errors. The default is to use the display_errors setting and not force errors to be displayed. To force errors to display, you can: define(‘WP_DEBUG_DISPLAY’, true);
WP_DEBUG_LOG – Controls error logging to the file wp-content/debug.log. The default is no logging. To change this, you can: define(‘WP_DEBUG_LOG’, true);
WP_DEFAULT_THEME – Sets the default theme. The current version of WordPress assumes a default theme of ‘twentyeleven’. If you want to change this, you can: define(‘WP_DEFAULT_THEME’, ‘mydefaulttheme’);
WP_PLUGIN_DIR – Sets the directory for plugin files. The default is ‘plugins’. To change this, you can: define(‘WP_PLUGIN_DIR’, ‘/newplugindir’);
WP_PLUGIN_URL – Sets the URL for the plugin directory. If you change the WP_PLUGIN_DIR, you will also need to change this to match the directory name for http requests. If you have compatibility issues with some plugins, you can set an additional value, as in: define(‘PLUGINDIR’, ‘/wpdir/wp-content/plugins’);.
WPMU_PLUGIN_DIR – Sets the directory to store the Must Use plugins. The default location is /mu-plugins. To change this, you can: define(‘WPMU_PLUGIN_DIR’, ‘/requiredplugins’);
WPMU_PLUGIN_URL – Sets the URL for the Must Use plugin directory. If you change the WPMU_PLUGIN_DIR, you will also need to change this to match the directory name for http requests.
Capability Settings
These can be used to control certain behaviors that users are allowed to perform. Some of these are confusing because you are turning “on” the ability to “disallow” a feature. So be careful on how you’re declaring these values. Most of these are used in the wp-includes/capabilities.php file, but if you want to change the settings, you should add your settings to your wp-config.php file.
ALLOW_UNFILTERED_UPLOADS – Allows unfiltered uploads. You can: define(‘ALLOW_UNFILTERED_UPLOADS’, true); to enable users to upload files without filtering. Be careful: this is a potential security risk.
DISALLOW_FILE_EDIT – Allows users to edit theme and plugin files. If you do not want your users to be able to edit these files, you can change this: define(‘DISALLOW_FILE_EDIT’, true);
DISALLOW_FILE_MODS – Allows users to update theme and plugin files via the WordPress Repository. If you do not want your users to be able to update their WordPress install, you can change this: define(‘DISALLOW_FILE_MODS’, true);
DISALLOW_UNFILTERED_HTML – Disables the ability to allow unfiltered HTML. Using define(‘DISALLOW_UNFILTERED_HTML’, false); will turn off the ability to allow unfiltered HTML.
WP_CACHE – Enables the built-in WordPress caching capability. If you want to enable this caching, you can: define(‘WP_CACHE’, true);
WP_USE_THEMES – Declared in /index.php. Tells WordPress whether or not use load it’s template engine. If you want access to WordPress APIs but don’t want or need the overhead of the template engine, define this to false: define(‘WP_USE_THEMES’, false);
Script Control
These settings control how scripts (Javascript and CSS) are handled by the system.
COMPRESS_CSS – Compresses CSS. To enable CSS compression, you can: define(‘COMPRESS_CSS’, true);
COMPRESS_SCRIPTS – Compresses scripts. To enable compression, you can: define(‘COMPRESS_SCRIPTS’, true);
CONCATENATE_SCRIPTS – Concatenates Javascript and CSS files. To enable, you can define(‘CONCATENATE_SCRIPTS’, true);
ENFORCE_GZIP – Forces gzip for compressoin of data sent to browsers. The default setting is to use the mod_deflate Apache module. If your host does not have this installed, you can: SCRIPT_DEBUG – Include the development (or non-minified) versions of all Javascript and CSS files. It also disabled compression and concatenation. To enable, you can: define(‘SCRIPT_DEBUG’, true);
Optimization Settings
These values can be used to control and optimize your WordPress install.
AUTOSAVE_INTERVAL – Sets the interval for saving revisions while editing posts.
CORE_UPGRADE_SKIP_NEW_BUNDLED – Enables skipping of theme and plugin updates when upgrading WordPress.
DOING_AJAX – Set to TRUE when processing an AJAX request.
EMPTY_TRASH_DAYS – Sets the number of days before trashed items are removed.
IMAGE_EDIT_OVERWRITE – Allows overwriting images when editing them.
MEDIA_TRASH – Enables the trash function for Media files.
WP_MEMORY_LIMIT – Sets the memory limit used.
WP_MAX_MEMORY_LIMIT – Controls the maximum memory size used. Some WordPress processes require more memory. This setting controls the upper limit used by these high memory use procedures.
SHORTINIT – Turns on only the core WordPress functions. Often used when interfacing to other platforms.
WP_POST_REVISIONS – Sets the maximum number of revisions to save. If set to FALSE it will be unlimited, an integer set the maximum number of revisions to save.
MultiSite Settings
These values control how WordPress MultiSite behaves.
NOBLOGREDIRECT – Sets the URL to redirect visitors to when they request a non-existent MultiSite blog. The default is ‘%siteurl%’, which is the default site. If you wish to use a different location, you can: define(‘NOBLOGREDIRECT’, ‘mynewdomain.com’);
WP_ALLOW_MULTISITE – Turns on MultiSite. Just enabling this using define(‘WP_ALLOW_MULTISITE’, true); does not by itself make your WordPress install a MultiSite install. It just starts the process. When you add this to your wp-config.php file, it turns on the Network menu in the Admin. This allows you to make certain choices and continue the setup process for your MultiSite install.
WPMU_ACCEL_REDIRECT – When using Apache X-Sendfile for quicker loading, this helps you turn it on natively in WordPress for MultiSites. To enable, you can: define(‘WPMU_ACCEL_REDIRECT’, true);
ABSPATH Definitions: 5 References: 597
ADMIN_COOKIE_PATH Definitions: 3 References: 8
AKISMET_DELETE_LIMIT Definitions: 1 References: 3
AKISMET_VERSION Definitions: 1 References: 8
AKISMET__MINIMUM_WP_VERSION Definitions: 1 References: 3
AKISMET__PLUGIN_DIR Definitions: 1 References: 7
AKISMET__PLUGIN_URL Definitions: 1 References: 5
ARRAY_A Definitions: 1 References: 71
ARRAY_N Definitions: 1 References: 16
ATOM Definitions: 1 References: 10
AUTH_COOKIE Definitions: 1 References: 12
AUTH_KEY Definitions: 1 References: 4
AUTH_SALT Definitions: 1 References: 3
AUTOSAVE_INTERVAL Definitions: 1 References: 3
BACKGROUND_COLOR Definitions: 1 References: 3
BACKGROUND_IMAGE Definitions: 1 References: 3
BLOGUPLOADDIR Definitions: 1 References: 5
BLOG_ID_CURRENT_SITE Definitions: 1 References: 3
COMMENTS_TEMPLATE Definitions: 1 References: 2
COOKIEHASH Definitions: 2 References: 29
COOKIEPATH Definitions: 2 References: 17
COOKIE_DOMAIN Definitions: 3 References: 28
CRLF Definitions: 1 References: 37
CUSTOM_TAGS Definitions: 1 References: 3
DAY_IN_SECONDS Definitions: 1 References: 33
DB_CHARSET Definitions: 1 References: 3
DB_COLLATE Definitions: 1 References: 6
DB_HOST Definitions: 2 References: 4
DB_NAME Definitions: 2 References: 5
DB_PASSWORD Definitions: 2 References: 4
DB_USER Definitions: 2 References: 4
DOING_AJAX Definitions: 2 References: 34
DOING_AUTOSAVE Definitions: 1 References: 4
DOING_CRON Definitions: 1 References: 24
DOMAIN_CURRENT_SITE Definitions: 1 References: 3
EBML_ID_ASPECTRATIOTYPE Definitions: 1 References: 3
EBML_ID_ATTACHEDFILE Definitions: 1 References: 3
EBML_ID_ATTACHMENTLINK Definitions: 1 References: 2
EBML_ID_ATTACHMENTS Definitions: 1 References: 3
EBML_ID_AUDIO Definitions: 1 References: 4
EBML_ID_BITDEPTH Definitions: 1 References: 3
EBML_ID_CHANNELPOSITIONS Definitions: 1 References: 3
EBML_ID_CHANNELS Definitions: 1 References: 3
EBML_ID_CHAPCOUNTRY Definitions: 1 References: 3
EBML_ID_CHAPLANGUAGE Definitions: 1 References: 3
EBML_ID_CHAPPROCESS Definitions: 1 References: 2
EBML_ID_CHAPPROCESSCODECID Definitions: 1 References: 2
EBML_ID_CHAPPROCESSCOMMAND Definitions: 1 References: 2
EBML_ID_CHAPPROCESSDATA Definitions: 1 References: 2
EBML_ID_CHAPPROCESSPRIVATE Definitions: 1 References: 2
EBML_ID_CHAPPROCESSTIME Definitions: 1 References: 2
EBML_ID_CHAPSTRING Definitions: 1 References: 3
EBML_ID_CHAPTERATOM Definitions: 1 References: 4
EBML_ID_CHAPTERDISPLAY Definitions: 1 References: 4
EBML_ID_CHAPTERFLAGENABLED Definitions: 1 References: 3
EBML_ID_CHAPTERFLAGHIDDEN Definitions: 1 References: 3
EBML_ID_CHAPTERPHYSICALEQUIV Definitions: 1 References: 2
EBML_ID_CHAPTERS Definitions: 1 References: 3
EBML_ID_CHAPTERSEGMENTEDITIONUID Definitions: 1 References: 3
EBML_ID_CHAPTERSEGMENTUID Definitions: 1 References: 3
EBML_ID_CHAPTERTIMEEND Definitions: 1 References: 3
EBML_ID_CHAPTERTIMESTART Definitions: 1 References: 3
EBML_ID_CHAPTERTRACK Definitions: 1 References: 4
EBML_ID_CHAPTERTRACKNUMBER Definitions: 1 References: 3
EBML_ID_CHAPTERTRANSLATE Definitions: 1 References: 3
EBML_ID_CHAPTERTRANSLATECODEC Definitions: 1 References: 3
EBML_ID_CHAPTERTRANSLATEEDITIONUID Definitions: 1 References: 3
EBML_ID_CHAPTERTRANSLATEID Definitions: 1 References: 3
EBML_ID_CHAPTERUID Definitions: 1 References: 3
EBML_ID_CLUSTER Definitions: 1 References: 5
EBML_ID_CLUSTERBLOCK Definitions: 1 References: 5
EBML_ID_CLUSTERBLOCKADDID Definitions: 1 References: 2
EBML_ID_CLUSTERBLOCKADDITIONAL Definitions: 1 References: 2
EBML_ID_CLUSTERBLOCKADDITIONID Definitions: 1 References: 2
EBML_ID_CLUSTERBLOCKADDITIONS Definitions: 1 References: 2
EBML_ID_CLUSTERBLOCKDURATION Definitions: 1 References: 3
EBML_ID_CLUSTERBLOCKGROUP Definitions: 1 References: 4
EBML_ID_CLUSTERBLOCKMORE Definitions: 1 References: 2
EBML_ID_CLUSTERBLOCKVIRTUAL Definitions: 1 References: 2
EBML_ID_CLUSTERCODECSTATE Definitions: 1 References: 3
EBML_ID_CLUSTERDELAY Definitions: 1 References: 2
EBML_ID_CLUSTERDURATION Definitions: 1 References: 2
EBML_ID_CLUSTERENCRYPTEDBLOCK Definitions: 1 References: 2
EBML_ID_CLUSTERFRAMENUMBER Definitions: 1 References: 2
EBML_ID_CLUSTERLACENUMBER Definitions: 1 References: 2
EBML_ID_CLUSTERPOSITION Definitions: 1 References: 3
EBML_ID_CLUSTERPREVSIZE Definitions: 1 References: 3
EBML_ID_CLUSTERREFERENCEBLOCK Definitions: 1 References: 3
EBML_ID_CLUSTERREFERENCEPRIORITY Definitions: 1 References: 3
EBML_ID_CLUSTERREFERENCEVIRTUAL Definitions: 1 References: 2
EBML_ID_CLUSTERSILENTTRACKNUMBER Definitions: 1 References: 3
EBML_ID_CLUSTERSILENTTRACKS Definitions: 1 References: 4
EBML_ID_CLUSTERSIMPLEBLOCK Definitions: 1 References: 7
EBML_ID_CLUSTERSLICES Definitions: 1 References: 2
EBML_ID_CLUSTERTIMECODE Definitions: 1 References: 3
EBML_ID_CLUSTERTIMESLICE Definitions: 1 References: 2
EBML_ID_CODECDECODEALL Definitions: 1 References: 3
EBML_ID_CODECDOWNLOADURL Definitions: 1 References: 2
EBML_ID_CODECID Definitions: 1 References: 3
EBML_ID_CODECINFOURL Definitions: 1 References: 2
EBML_ID_CODECNAME Definitions: 1 References: 3
EBML_ID_CODECPRIVATE Definitions: 1 References: 4
EBML_ID_CODECSETTINGS Definitions: 1 References: 2
EBML_ID_COLOURSPACE Definitions: 1 References: 3
EBML_ID_CONTENTCOMPALGO Definitions: 1 References: 3
EBML_ID_CONTENTCOMPRESSION Definitions: 1 References: 4
EBML_ID_CONTENTCOMPSETTINGS Definitions: 1 References: 3
EBML_ID_CONTENTENCALGO Definitions: 1 References: 3
EBML_ID_CONTENTENCKEYID Definitions: 1 References: 3
EBML_ID_CONTENTENCODING Definitions: 1 References: 3
EBML_ID_CONTENTENCODINGORDER Definitions: 1 References: 3
EBML_ID_CONTENTENCODINGS Definitions: 1 References: 4
EBML_ID_CONTENTENCODINGSCOPE Definitions: 1 References: 3
EBML_ID_CONTENTENCODINGTYPE Definitions: 1 References: 3
EBML_ID_CONTENTENCRYPTION Definitions: 1 References: 4
EBML_ID_CONTENTSIGALGO Definitions: 1 References: 3
EBML_ID_CONTENTSIGHASHALGO Definitions: 1 References: 3
EBML_ID_CONTENTSIGKEYID Definitions: 1 References: 3
EBML_ID_CONTENTSIGNATURE Definitions: 1 References: 3
EBML_ID_CRC32 Definitions: 1 References: 3
EBML_ID_CUEBLOCKNUMBER Definitions: 1 References: 3
EBML_ID_CUECLUSTERPOSITION Definitions: 1 References: 3
EBML_ID_CUECODECSTATE Definitions: 1 References: 3
EBML_ID_CUEPOINT Definitions: 1 References: 3
EBML_ID_CUEREFCLUSTER Definitions: 1 References: 2
EBML_ID_CUEREFCODECSTATE Definitions: 1 References: 2
EBML_ID_CUEREFERENCE Definitions: 1 References: 2
EBML_ID_CUEREFNUMBER Definitions: 1 References: 2
EBML_ID_CUEREFTIME Definitions: 1 References: 2
EBML_ID_CUES Definitions: 1 References: 3
EBML_ID_CUETIME Definitions: 1 References: 3
EBML_ID_CUETRACK Definitions: 1 References: 3
EBML_ID_CUETRACKPOSITIONS Definitions: 1 References: 4
EBML_ID_DATEUTC Definitions: 1 References: 3
EBML_ID_DEFAULTDURATION Definitions: 1 References: 3
EBML_ID_DISPLAYHEIGHT Definitions: 1 References: 3
EBML_ID_DISPLAYUNIT Definitions: 1 References: 3
EBML_ID_DISPLAYWIDTH Definitions: 1 References: 3
EBML_ID_DOCTYPE Definitions: 1 References: 3
EBML_ID_DOCTYPEREADVERSION Definitions: 1 References: 3
EBML_ID_DOCTYPEVERSION Definitions: 1 References: 3
EBML_ID_DURATION Definitions: 1 References: 3
EBML_ID_EBML Definitions: 1 References: 3
EBML_ID_EBMLMAXIDLENGTH Definitions: 1 References: 3
EBML_ID_EBMLMAXSIZELENGTH Definitions: 1 References: 3
EBML_ID_EBMLREADVERSION Definitions: 1 References: 3
EBML_ID_EBMLVERSION Definitions: 1 References: 3
EBML_ID_EDITIONENTRY Definitions: 1 References: 3
EBML_ID_EDITIONFLAGDEFAULT Definitions: 1 References: 3
EBML_ID_EDITIONFLAGHIDDEN Definitions: 1 References: 3
EBML_ID_EDITIONFLAGORDERED Definitions: 1 References: 3
EBML_ID_EDITIONUID Definitions: 1 References: 3
EBML_ID_FILEDATA Definitions: 1 References: 4
EBML_ID_FILEDESCRIPTION Definitions: 1 References: 3
EBML_ID_FILEMIMETYPE Definitions: 1 References: 3
EBML_ID_FILENAME Definitions: 1 References: 3
EBML_ID_FILEREFERRAL Definitions: 1 References: 2
EBML_ID_FILEUID Definitions: 1 References: 3
EBML_ID_FLAGDEFAULT Definitions: 1 References: 3
EBML_ID_FLAGENABLED Definitions: 1 References: 3
EBML_ID_FLAGFORCED Definitions: 1 References: 3
EBML_ID_FLAGINTERLACED Definitions: 1 References: 3
EBML_ID_FLAGLACING Definitions: 1 References: 3
EBML_ID_GAMMAVALUE Definitions: 1 References: 3
EBML_ID_INFO Definitions: 1 References: 3
EBML_ID_LANGUAGE Definitions: 1 References: 3
EBML_ID_MAXBLOCKADDITIONID Definitions: 1 References: 3
EBML_ID_MAXCACHE Definitions: 1 References: 3
EBML_ID_MINCACHE Definitions: 1 References: 3
EBML_ID_MUXINGAPP Definitions: 1 References: 3
EBML_ID_NAME Definitions: 1 References: 3
EBML_ID_NEXTFILENAME Definitions: 1 References: 3
EBML_ID_NEXTUID Definitions: 1 References: 3
EBML_ID_OLDSTEREOMODE Definitions: 1 References: 3
EBML_ID_OUTPUTSAMPLINGFREQUENCY Definitions: 1 References: 3
EBML_ID_PIXELCROPBOTTOM Definitions: 1 References: 3
EBML_ID_PIXELCROPLEFT Definitions: 1 References: 3
EBML_ID_PIXELCROPRIGHT Definitions: 1 References: 3
EBML_ID_PIXELCROPTOP Definitions: 1 References: 3
EBML_ID_PIXELHEIGHT Definitions: 1 References: 3
EBML_ID_PIXELWIDTH Definitions: 1 References: 3
EBML_ID_PREVFILENAME Definitions: 1 References: 3
EBML_ID_PREVUID Definitions: 1 References: 3
EBML_ID_SAMPLINGFREQUENCY Definitions: 1 References: 3
EBML_ID_SEEK Definitions: 1 References: 3
EBML_ID_SEEKHEAD Definitions: 1 References: 3
EBML_ID_SEEKID Definitions: 1 References: 3
EBML_ID_SEEKPOSITION Definitions: 1 References: 3
EBML_ID_SEGMENT Definitions: 1 References: 3
EBML_ID_SEGMENTFAMILY Definitions: 1 References: 3
EBML_ID_SEGMENTFILENAME Definitions: 1 References: 3
EBML_ID_SEGMENTUID Definitions: 1 References: 3
EBML_ID_SIMPLETAG Definitions: 1 References: 5
EBML_ID_STEREOMODE Definitions: 1 References: 3
EBML_ID_TAG Definitions: 1 References: 3
EBML_ID_TAGATTACHMENTUID Definitions: 1 References: 3
EBML_ID_TAGBINARY Definitions: 1 References: 3
EBML_ID_TAGCHAPTERUID Definitions: 1 References: 3
EBML_ID_TAGDEFAULT Definitions: 1 References: 3
EBML_ID_TAGEDITIONUID Definitions: 1 References: 3
EBML_ID_TAGLANGUAGE Definitions: 1 References: 3
EBML_ID_TAGNAME Definitions: 1 References: 3
EBML_ID_TAGS Definitions: 1 References: 3
EBML_ID_TAGSTRING Definitions: 1 References: 3
EBML_ID_TAGTRACKUID Definitions: 1 References: 3
EBML_ID_TARGETS Definitions: 1 References: 3
EBML_ID_TARGETTYPE Definitions: 1 References: 3
EBML_ID_TARGETTYPEVALUE Definitions: 1 References: 3
EBML_ID_TIMECODESCALE Definitions: 1 References: 3
EBML_ID_TITLE Definitions: 1 References: 3
EBML_ID_TRACKENTRY Definitions: 1 References: 3
EBML_ID_TRACKNUMBER Definitions: 1 References: 3
EBML_ID_TRACKOFFSET Definitions: 1 References: 2
EBML_ID_TRACKOVERLAY Definitions: 1 References: 2
EBML_ID_TRACKS Definitions: 1 References: 3
EBML_ID_TRACKTIMECODESCALE Definitions: 1 References: 3
EBML_ID_TRACKTRANSLATE Definitions: 1 References: 2
EBML_ID_TRACKTRANSLATECODEC Definitions: 1 References: 2
EBML_ID_TRACKTRANSLATEEDITIONUID Definitions: 1 References: 2
EBML_ID_TRACKTRANSLATETRACKID Definitions: 1 References: 2
EBML_ID_TRACKTYPE Definitions: 1 References: 3
EBML_ID_TRACKUID Definitions: 1 References: 3
EBML_ID_VIDEO Definitions: 1 References: 4
EBML_ID_VOID Definitions: 1 References: 3
EBML_ID_WRITINGAPP Definitions: 1 References: 3
EMPTY_TRASH_DAYS Definitions: 1 References: 28
EP_ALL Definitions: 1 References: 1
EP_ALL_ARCHIVES Definitions: 1 References: 2
EP_ATTACHMENT Definitions: 1 References: 3
EP_AUTHORS Definitions: 1 References: 3
EP_CATEGORIES Definitions: 1 References: 3
EP_COMMENTS Definitions: 1 References: 3
EP_DATE Definitions: 1 References: 3
EP_DAY Definitions: 1 References: 3
EP_MONTH Definitions: 1 References: 3
EP_NONE Definitions: 1 References: 6
EP_PAGES Definitions: 1 References: 4
EP_PERMALINK Definitions: 1 References: 5
EP_ROOT Definitions: 1 References: 4
EP_SEARCH Definitions: 1 References: 3
EP_TAGS Definitions: 1 References: 3
EP_YEAR Definitions: 1 References: 3
EZSQL_VERSION Definitions: 1 References: 1
FORCE_SSL_ADMIN Definitions: 1 References: 3
FORCE_SSL_LOGIN Definitions: 1 References: 3
FS_CHMOD_DIR Definitions: 1 References: 17
FS_CHMOD_FILE Definitions: 1 References: 21
FS_CONNECT_TIMEOUT Definitions: 1 References: 5
FS_TIMEOUT Definitions: 2 References: 8
FTP_ASCII Definitions: 1 References: 21
FTP_AUTOASCII Definitions: 1 References: 9
FTP_BINARY Definitions: 1 References: 19
FTP_FORCE Definitions: 1 References: 3
GETID3_FLV_TAG_AUDIO Definitions: 1 References: 2
GETID3_FLV_TAG_META Definitions: 1 References: 2
GETID3_FLV_TAG_VIDEO Definitions: 1 References: 2
GETID3_FLV_VIDEO_H263 Definitions: 1 References: 3
GETID3_FLV_VIDEO_H264 Definitions: 1 References: 3
GETID3_FLV_VIDEO_SCREEN Definitions: 1 References: 2
GETID3_FLV_VIDEO_SCREENV2 Definitions: 1 References: 2
GETID3_FLV_VIDEO_VP6FLV Definitions: 1 References: 2
GETID3_FLV_VIDEO_VP6FLV_ALPHA Definitions: 1 References: 2
GETID3_HELPERAPPSDIR Definitions: 1 References: 11
GETID3_INCLUDEPATH Definitions: 1 References: 24
GETID3_MP3_VALID_CHECK_FRAMES Definitions: 1 References: 4
GETID3_OS_ISWINDOWS Definitions: 1 References: 7
GETID3_TEMP_DIR Definitions: 1 References: 6
H264_AVC_SEQUENCE_HEADER Definitions: 1 References: 2
H264_PROFILE_BASELINE Definitions: 1 References: 1
H264_PROFILE_EXTENDED Definitions: 1 References: 1
H264_PROFILE_HIGH Definitions: 1 References: 2
H264_PROFILE_HIGH10 Definitions: 1 References: 2
H264_PROFILE_HIGH422 Definitions: 1 References: 2
H264_PROFILE_HIGH444 Definitions: 1 References: 2
H264_PROFILE_HIGH444_PREDICTIVE Definitions: 1 References: 2
H264_PROFILE_MAIN Definitions: 1 References: 1
HEADER_IMAGE Definitions: 3 References: 5
HEADER_IMAGE_HEIGHT Definitions: 3 References: 7
HEADER_IMAGE_WIDTH Definitions: 3 References: 10
HEADER_TEXTCOLOR Definitions: 3 References: 7
HOUR_IN_SECONDS Definitions: 1 References: 45
IFRAME_REQUEST Definitions: 8 References: 12
IS_PROFILE_PAGE Definitions: 2 References: 24
LANGDIR Definitions: 2 References: 4
LOGGED_IN_COOKIE Definitions: 1 References: 12
LOGGED_IN_KEY Definitions: 1 References: 3
LOGGED_IN_SALT Definitions: 1 References: 3
MAGPIE_CACHE_AGE Definitions: 1 References: 3
MAGPIE_CACHE_DIR Definitions: 1 References: 3
MAGPIE_CACHE_FRESH_ONLY Definitions: 1 References: 2
MAGPIE_CACHE_ON Definitions: 1 References: 4
MAGPIE_DEBUG Definitions: 1 References: 10
MAGPIE_FETCH_TIME_OUT Definitions: 1 References: 3
MAGPIE_INITALIZED Definitions: 1 References: 2
MAGPIE_USER_AGENT Definitions: 2 References: 3
MAGPIE_USE_GZIP Definitions: 1 References: 2
MEDIA_TRASH Definitions: 1 References: 13
MINUTE_IN_SECONDS Definitions: 1 References: 9
MULTISITE Definitions: 2 References: 12
MUPLUGINDIR Definitions: 1 References: 2
NONCE_KEY Definitions: 1 References: 3
NONCE_SALT Definitions: 1 References: 3
NO_HEADER_TEXT Definitions: 2 References: 4
OBJECT Definitions: 1 References: 44
OBJECT_K Definitions: 1 References: 4
PASS_COOKIE Definitions: 1 References: 4
PATH_CURRENT_SITE Definitions: 1 References: 3
PCLZIP_ATT_FILE_COMMENT Definitions: 1 References: 4
PCLZIP_ATT_FILE_CONTENT Definitions: 1 References: 4
PCLZIP_ATT_FILE_MTIME Definitions: 1 References: 4
PCLZIP_ATT_FILE_NAME Definitions: 1 References: 6
PCLZIP_ATT_FILE_NEW_FULL_NAME Definitions: 1 References: 4
PCLZIP_ATT_FILE_NEW_SHORT_NAME Definitions: 1 References: 4
PCLZIP_CB_POST_ADD Definitions: 1 References: 7
PCLZIP_CB_POST_DELETE Definitions: 1 References: 2
PCLZIP_CB_POST_EXTRACT Definitions: 1 References: 13
PCLZIP_CB_POST_LIST Definitions: 1 References: 2
PCLZIP_CB_PRE_ADD Definitions: 1 References: 7
PCLZIP_CB_PRE_DELETE Definitions: 1 References: 2
PCLZIP_CB_PRE_EXTRACT Definitions: 1 References: 13
PCLZIP_CB_PRE_LIST Definitions: 1 References: 2
PCLZIP_ERROR_EXTERNAL Definitions: 1 References: 6
PCLZIP_ERR_ALREADY_A_DIRECTORY Definitions: 1 References: 2
PCLZIP_ERR_BAD_CHECKSUM Definitions: 1 References: 3
PCLZIP_ERR_BAD_EXTENSION Definitions: 1 References: 3
PCLZIP_ERR_BAD_EXTRACTED_FILE Definitions: 1 References: 3
PCLZIP_ERR_BAD_FORMAT Definitions: 1 References: 14
PCLZIP_ERR_DELETE_FILE_FAIL Definitions: 1 References: 3
PCLZIP_ERR_DIRECTORY_RESTRICTION Definitions: 1 References: 4
PCLZIP_ERR_DIR_CREATE_FAIL Definitions: 1 References: 4
PCLZIP_ERR_FILENAME_TOO_LONG Definitions: 1 References: 3
PCLZIP_ERR_INVALID_ARCHIVE_ZIP Definitions: 1 References: 8
PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE Definitions: 1 References: 11
PCLZIP_ERR_INVALID_OPTION_VALUE Definitions: 1 References: 11
PCLZIP_ERR_INVALID_PARAMETER Definitions: 1 References: 24
PCLZIP_ERR_INVALID_ZIP Definitions: 1 References: 3
PCLZIP_ERR_MISSING_FILE Definitions: 1 References: 8
PCLZIP_ERR_MISSING_OPTION_VALUE Definitions: 1 References: 12
PCLZIP_ERR_NO_ERROR Definitions: 1 References: 6
PCLZIP_ERR_READ_OPEN_FAIL Definitions: 1 References: 16
PCLZIP_ERR_RENAME_FILE_FAIL Definitions: 1 References: 3
PCLZIP_ERR_UNSUPPORTED_COMPRESSION Definitions: 1 References: 4
PCLZIP_ERR_UNSUPPORTED_ENCRYPTION Definitions: 1 References: 5
PCLZIP_ERR_USER_ABORTED Definitions: 1 References: 7
PCLZIP_ERR_WRITE_OPEN_FAIL Definitions: 1 References: 7
PCLZIP_OPT_ADD_COMMENT Definitions: 1 References: 5
PCLZIP_OPT_ADD_PATH Definitions: 1 References: 14
PCLZIP_OPT_ADD_TEMP_FILE_OFF Definitions: 1 References: 1
PCLZIP_OPT_ADD_TEMP_FILE_ON Definitions: 1 References: 1
PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD Definitions: 1 References: 1
PCLZIP_OPT_BY_EREG Definitions: 1 References: 4
PCLZIP_OPT_BY_INDEX Definitions: 1 References: 23
PCLZIP_OPT_BY_NAME Definitions: 1 References: 21
PCLZIP_OPT_BY_PREG Definitions: 1 References: 11
PCLZIP_OPT_COMMENT Definitions: 1 References: 10
PCLZIP_OPT_EXTRACT_AS_STRING Definitions: 1 References: 10
PCLZIP_OPT_EXTRACT_DIR_RESTRICTION Definitions: 1 References: 7
PCLZIP_OPT_EXTRACT_IN_OUTPUT Definitions: 1 References: 5
PCLZIP_OPT_NO_COMPRESSION Definitions: 1 References: 8
PCLZIP_OPT_PATH Definitions: 1 References: 8
PCLZIP_OPT_PREPEND_COMMENT Definitions: 1 References: 5
PCLZIP_OPT_REMOVE_ALL_PATH Definitions: 1 References: 15
PCLZIP_OPT_REMOVE_PATH Definitions: 1 References: 14
PCLZIP_OPT_REPLACE_NEWER Definitions: 1 References: 7
PCLZIP_OPT_SET_CHMOD Definitions: 1 References: 6
PCLZIP_OPT_STOP_ON_ERROR Definitions: 1 References: 14
PCLZIP_OPT_TEMP_FILE_OFF Definitions: 1 References: 13
PCLZIP_OPT_TEMP_FILE_ON Definitions: 1 References: 10
PCLZIP_OPT_TEMP_FILE_THRESHOLD Definitions: 1 References: 17
PCLZIP_READ_BLOCK_SIZE Definitions: 1 References: 34
PCLZIP_SEPARATOR Definitions: 1 References: 4
PCLZIP_TEMPORARY_DIR Definitions: 1 References: 7
PCLZIP_TEMPORARY_FILE_RATIO Definitions: 1 References: 3
PHP_INT_MIN Definitions: 1 References: 3
PLUGINDIR Definitions: 1 References: 2
PLUGINS_COOKIE_PATH Definitions: 1 References: 5
PO_MAX_LINE_LEN Definitions: 1 References: 2
RSS Definitions: 1 References: 33
SCRIPT_DEBUG Definitions: 2 References: 14
SECURE_AUTH_COOKIE Definitions: 1 References: 12
SECURE_AUTH_KEY Definitions: 1 References: 3
SECURE_AUTH_SALT Definitions: 1 References: 3
SERVICES_JSON_IN_ARR Definitions: 1 References: 10
SERVICES_JSON_IN_CMT Definitions: 1 References: 3
SERVICES_JSON_IN_OBJ Definitions: 1 References: 10
SERVICES_JSON_IN_STR Definitions: 1 References: 4
SERVICES_JSON_LOOSE_TYPE Definitions: 1 References: 4
SERVICES_JSON_SLICE Definitions: 1 References: 7
SERVICES_JSON_SUPPRESS_ERRORS Definitions: 1 References: 3
SERVICES_JSON_USE_TO_JSON Definitions: 1 References: 2
SHORTINIT Definitions: 2 References: 4
SIMPLEPIE_BUILD Definitions: 1 References: 6
SIMPLEPIE_CONSTRUCT_ALL Definitions: 1 References: 1
SIMPLEPIE_CONSTRUCT_BASE64 Definitions: 1 References: 5
SIMPLEPIE_CONSTRUCT_HTML Definitions: 1 References: 18
SIMPLEPIE_CONSTRUCT_IRI Definitions: 1 References: 60
SIMPLEPIE_CONSTRUCT_MAYBE_HTML Definitions: 1 References: 18
SIMPLEPIE_CONSTRUCT_NONE Definitions: 1 References: 5
SIMPLEPIE_CONSTRUCT_TEXT Definitions: 1 References: 258
SIMPLEPIE_CONSTRUCT_XHTML Definitions: 1 References: 8
SIMPLEPIE_FILE_SOURCE_CURL Definitions: 1 References: 2
SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS Definitions: 1 References: 2
SIMPLEPIE_FILE_SOURCE_FSOCKOPEN Definitions: 1 References: 2
SIMPLEPIE_FILE_SOURCE_LOCAL Definitions: 1 References: 3
SIMPLEPIE_FILE_SOURCE_NONE Definitions: 1 References: 2
SIMPLEPIE_FILE_SOURCE_REMOTE Definitions: 1 References: 11
SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY Definitions: 1 References: 19
SIMPLEPIE_LINKBACK Definitions: 1 References: 1
SIMPLEPIE_LOCATOR_ALL Definitions: 1 References: 4
SIMPLEPIE_LOCATOR_AUTODISCOVERY Definitions: 1 References: 2
SIMPLEPIE_LOCATOR_LOCAL_BODY Definitions: 1 References: 3
SIMPLEPIE_LOCATOR_LOCAL_EXTENSION Definitions: 1 References: 3
SIMPLEPIE_LOCATOR_NONE Definitions: 1 References: 2
SIMPLEPIE_LOCATOR_REMOTE_BODY Definitions: 1 References: 3
SIMPLEPIE_LOCATOR_REMOTE_EXTENSION Definitions: 1 References: 3
SIMPLEPIE_LOWERCASE Definitions: 1 References: 1
SIMPLEPIE_NAME Definitions: 1 References: 5
SIMPLEPIE_NAMESPACE_ATOM_03 Definitions: 1 References: 79
SIMPLEPIE_NAMESPACE_ATOM_10 Definitions: 1 References: 89
SIMPLEPIE_NAMESPACE_DC_10 Definitions: 1 References: 21
SIMPLEPIE_NAMESPACE_DC_11 Definitions: 1 References: 21
SIMPLEPIE_NAMESPACE_GEORSS Definitions: 1 References: 7
SIMPLEPIE_NAMESPACE_ITUNES Definitions: 1 References: 24
SIMPLEPIE_NAMESPACE_MEDIARSS Definitions: 1 References: 116
SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG Definitions: 1 References: 2
SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG2 Definitions: 1 References: 2
SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG3 Definitions: 1 References: 2
SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG4 Definitions: 1 References: 2
SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG5 Definitions: 1 References: 2
SIMPLEPIE_NAMESPACE_RDF Definitions: 1 References: 20
SIMPLEPIE_NAMESPACE_RSS_090 Definitions: 1 References: 23
SIMPLEPIE_NAMESPACE_RSS_10 Definitions: 1 References: 23
SIMPLEPIE_NAMESPACE_RSS_20 Definitions: 1 References: 50
SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO Definitions: 1 References: 10
SIMPLEPIE_NAMESPACE_XHTML Definitions: 1 References: 3
SIMPLEPIE_NAMESPACE_XML Definitions: 1 References: 5
SIMPLEPIE_PCRE_HTML_ATTRIBUTE Definitions: 1 References: 4
SIMPLEPIE_PCRE_XML_ATTRIBUTE Definitions: 1 References: 3
SIMPLEPIE_SAME_CASE Definitions: 1 References: 1
SIMPLEPIE_TYPE_ALL Definitions: 1 References: 2
SIMPLEPIE_TYPE_ATOM_03 Definitions: 1 References: 3
SIMPLEPIE_TYPE_ATOM_10 Definitions: 1 References: 3
SIMPLEPIE_TYPE_ATOM_ALL Definitions: 1 References: 2
SIMPLEPIE_TYPE_NONE Definitions: 1 References: 3
SIMPLEPIE_TYPE_RSS_090 Definitions: 1 References: 4
SIMPLEPIE_TYPE_RSS_091 Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_091_NETSCAPE Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_091_USERLAND Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_092 Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_093 Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_094 Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_10 Definitions: 1 References: 4
SIMPLEPIE_TYPE_RSS_20 Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_ALL Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_RDF Definitions: 1 References: 2
SIMPLEPIE_TYPE_RSS_SYNDICATION Definitions: 1 References: 7
SIMPLEPIE_UPPERCASE Definitions: 1 References: 1
SIMPLEPIE_URL Definitions: 1 References: 3
SIMPLEPIE_USERAGENT Definitions: 1 References: 4
SIMPLEPIE_VERSION Definitions: 1 References: 4
SITECOOKIEPATH Definitions: 2 References: 20
SITE_ID_CURRENT_SITE Definitions: 1 References: 3
STYLESHEETPATH Definitions: 1 References: 8
SUBDOMAIN_INSTALL Definitions: 3 References: 13
TEMPLATEPATH Definitions: 1 References: 9
TEST_COOKIE Definitions: 1 References: 5
UPLOADBLOGSDIR Definitions: 1 References: 5
UPLOADS Definitions: 1 References: 7
USER_COOKIE Definitions: 1 References: 4
VHOST Definitions: 2 References: 11
WEEK_IN_SECONDS Definitions: 1 References: 6
WPINC Definitions: 5 References: 204
WPLANG Definitions: 1 References: 22
WPMU_ACCEL_REDIRECT Definitions: 1 References: 3
WPMU_PLUGIN_DIR Definitions: 1 References: 20
WPMU_PLUGIN_URL Definitions: 1 References: 3
WPMU_SENDFILE Definitions: 1 References: 3
WP_ADMIN Definitions: 4 References: 10
WP_ALLOW_REPAIR Definitions: 2 References: 3
WP_BLOG_ADMIN Definitions: 1 References: 3
WP_CACHE Definitions: 1 References: 6
WP_CONTENT_DIR Definitions: 3 References: 95
WP_CONTENT_URL Definitions: 1 References: 10
WP_CRON_LOCK_TIMEOUT Definitions: 1 References: 4
WP_DEBUG Definitions: 3 References: 26
WP_DEBUG_DISPLAY Definitions: 1 References: 5
WP_DEBUG_LOG Definitions: 1 References: 5
WP_DEFAULT_THEME Definitions: 1 References: 19
WP_IMPORTING Definitions: 1 References: 7
WP_INSTALLING Definitions: 5 References: 37
WP_INSTALLING_NETWORK Definitions: 2 References: 9
WP_LANG_DIR Definitions: 2 References: 32
WP_LOAD_IMPORTERS Definitions: 2 References: 3
WP_MAIL_INTERVAL Definitions: 1 References: 3
WP_MAX_MEMORY_LIMIT Definitions: 1 References: 8
WP_MEMORY_LIMIT Definitions: 2 References: 7
WP_NETWORK_ADMIN Definitions: 2 References: 9
WP_PLUGIN_DIR Definitions: 1 References: 58
WP_PLUGIN_URL Definitions: 1 References: 4
WP_POST_REVISIONS Definitions: 1 References: 3
WP_REPAIRING Definitions: 1 References: 4
WP_SETUP_CONFIG Definitions: 1 References: 5
WP_UNINSTALL_PLUGIN Definitions: 1 References: 1
WP_USER_ADMIN Definitions: 2 References: 9
WP_USE_THEMES Definitions: 1 References: 6
WXR_VERSION Definitions: 1 References: 1
XMLRPC_REQUEST Definitions: 1 References: 8
YEAR_IN_SECONDS Definitions: 1 References: 21
Generated: Mon May 12 03:55:47 2014 Hosted by follow the white rabbit.
<end node> 5P9i0s8y19Z
dt=
<node>directory
1
Available Functions
WordPress includes many other functions for determining paths and URLs to files or directories within plugins, themes, and WordPress itself. See the individual Codex pages for each function for complete information on their use.
ABSPATH – from wpconfig.php
Plugins
plugins_url()
plugin_dir_url()
plugin_dir_path()
plugin_basename()
Themes
get_template_directory_uri()
get_stylesheet_uri()
get_theme_root_uri()
get_theme_root()
get_theme_roots()
Site Home
home_url()
WordPress
admin_url()
site_url()
content_url()
includes_url()
wp_upload_dir()
Multisite
get_admin_url()
get_home_url()
get_site_url()
network_admin_url()
network_site_url()
network_home_url()
Constants
WordPress makes use of the following constants when determining the path to the content and plugin directories. These should not be used directly by plugins or themes, but are listed here for completeness.
WP_CONTENT_DIR // no trailing slash, full paths only
WP_CONTENT_URL // full url
WP_PLUGIN_DIR // full path, no trailing slash
WP_PLUGIN_URL // full url, no trailing slash
// Available per default in MS, not set in single site install
// Can be used in single site installs (as usual: at your own risk)
UPLOADS // uploads folder, relative to ABSPATH (for e.g.: /wp-content/uploads)
<end node> 5P9i0s8y19Z
dt=
<node>example
2
$PATH1=site_url()."/images/directory/$img"; $PATH0=ABSPATH."/images/directory/$img";
if(file_exists($PATH0)){
$dimen=sizepicture($PATH0,75,75);
$dis.="<td><a href='$PATH1' rel='lightbox'><img src='$PATH1' width=".$dimen[0]." height=".$dimen[1]."></a></td>";
}else $dis.="<td class=view> </td>";
<end node> 5P9i0s8y19Z
dt=
<node>hooks
1
http://adambrown.info/p/wp_hooks/version/3.9
// Remove old copyright text
add_action( 'init' , 'mh_remove' , 15 );
function mh_remove() {
remove_action('wp_footer','footer-2',30);
}
<?php remove_action( $tag, $function_to_remove, $priority ); ?>
Parameters
$tag
(string) (required) The action hook to which the function to be removed is hooked.
Default: None
$function_to_remove
(string) (required) The name of the function which should be removed.
Default: None
$priority
(int) (optional) The priority of the function (as defined when the function was originally hooked).
Default: 10
Return
add_action( 'widgets_init', 'my_widget' );
All plugin hooks in WordPress 3.9
Important! Some WordPress hooks get applied in multiple PHP files. If you are trying to figure out what a specific WordPress hook does, sort the table by "hook" and make sure you are looking in all the files where it occurs.
To sort the table, click on a column title.
Click a hook name to see details about the hook.
Click a file name to see only hooks used in that file.
Hook Type New? Instances
1 activated_plugin action no 1
2 activate_blog action no 1
3 activate_header action no 1
4 activate_plugin action no 1
5 activate_wp_head action no 1
6 activate_{$plugin} note action no 2
7 activity_box_end action no 1
8 added_existing_user action no 1
9 added_option action no 1
10 added_term_relationship action no 1
11 added_usermeta action no 1
12 added_{$meta_type}_meta note action no 1
13 additional_capabilities_display filter no 1
14 add_admin_bar_menus action no 1
15 add_attachment action no 1
16 add_category_form_pre action no 1
17 add_link action no 1
18 add_link_category_form_pre action no 1
19 add_menu_classes filter no 1
20 add_meta_boxes action no 3
21 add_meta_boxes_comment action no 1
22 add_meta_boxes_link action no 1
23 add_meta_boxes_{$post_type} note action no 1
24 add_option action no 1
25 add_option_{$option} note action no 1
26 add_ping filter no 1
27 add_signup_meta filter no 3
28 add_site_option action no 1
29 add_site_option_{$option} note action no 1
30 add_tag_form action no 1
31 add_tag_form_fields action no 1
32 add_tag_form_pre action no 1
33 add_term_relationship action no 1
34 add_user_to_blog action no 1
35 add_{$meta_type}_meta note action no 1
36 add_{$meta_type}_metadata note filter no 1
37 adminmenu action no 1
38 admin_action_{$action} note action no 1
39 admin_bar_init action no 1
40 admin_bar_menu action no 1
41 admin_body_class filter no 2
42 admin_color_scheme_picker action no 1
43 admin_comment_types_dropdown filter no 1
44 admin_enqueue_scripts action no 5
45 admin_footer action no 3
46 admin_footer-widgets-php action YES 1
47 admin_footer-{$hook_suffix} note action no 1
48 admin_footer_text filter no 1
49 admin_head action no 4
50 admin_head-media-upload-popup action no 1
51 admin_head-press-this-php action no 1
52 admin_head-{$hook_suffix} note action no 2
53 admin_head_{$content_func} note action no 1
54 admin_init action no 3
55 admin_memory_limit filter no 3
56 admin_menu action no 1
57 admin_notices action no 1
58 admin_page_access_denied action no 1
59 admin_post_thumbnail_html filter no 1
60 admin_print_footer_scripts action no 5
61 admin_print_scripts action no 5
62 admin_print_scripts-media-upload-popup action no 1
63 admin_print_scripts-press-this-php action no 1
64 admin_print_scripts-widgets-php action YES 1
65 admin_print_scripts-{$hook_suffix} note action no 2
66 admin_print_styles action no 5
67 admin_print_styles-media-upload-popup action no 1
68 admin_print_styles-press-this-php action no 1
69 admin_print_styles-widgets-php action YES 1
70 admin_print_styles-{$hook_suffix} note action no 2
71 admin_title filter no 1
72 admin_url filter no 1
73 admin_xml_ns action no 2
74 after-{$taxonomy}-table note action no 1
75 after_db_upgrade action no 1
76 after_delete_post action no 1
77 after_menu_locations_table action no 1
78 after_mu_upgrade action no 2
79 after_plugin_row action no 1
80 after_plugin_row_{$plugin_file} note action no 1
81 after_setup_theme action no 1
82 after_signup_form action no 1
83 after_switch_theme action no 2
84 after_theme_row action no 1
85 after_theme_row_{$stylesheet} note action no 1
86 after_wp_tiny_mce action no 1
87 ajax_query_attachments_args filter no 1
88 akismet_comment_check_response action no 1
89 akismet_comment_nonce filter no 2
90 akismet_delete_commentmeta_interval filter no 1
91 akismet_optimize_table filter no 2
92 akismet_show_user_comments_approved filter no 1
93 akismet_spam_caught action no 1
94 akismet_spam_count_incr filter no 2
95 akismet_submit_nonspam_comment action no 1
96 akismet_submit_spam_comment action no 1
97 akismet_ua filter no 1
98 akismet_view_arguments filter YES 1
99 allowed_http_origin filter no 1
100 allowed_http_origins filter no 1
101 allowed_redirect_hosts filter no 1
102 allowed_themes filter no 1
103 allow_dev_auto_core_updates filter no 1
104 allow_major_auto_core_updates filter no 1
105 allow_minor_auto_core_updates filter no 1
106 allow_password_reset filter no 1
107 allow_subdirectory_install filter no 1
108 all_admin_notices action no 1
109 all_plugins filter no 1
110 all_themes filter no 1
111 archive_blog action no 2
112 async_upload_{$type} note filter no 1
113 atom_author action no 1
114 atom_comments_ns action no 1
115 atom_enclosure filter no 1
116 atom_entry action no 1
117 atom_head action no 1
118 atom_ns action no 2
119 attachment_fields_to_edit filter no 2
120 attachment_fields_to_save filter no 3
121 attachment_icon filter no 1
122 attachment_innerHTML filter no 1
123 attachment_link filter no 1
124 attachment_max_dims filter no 1
125 attachment_submitbox_misc_actions action no 1
126 attachment_thumbnail_args filter YES 1
127 attribute_escape filter no 1
128 audio_submitbox_misc_sections filter no 1
129 authenticate filter no 1
130 author_email filter no 1
131 author_feed_link filter no 1
132 author_link filter no 1
133 author_rewrite_rules filter no 1
134 auth_cookie filter no 1
135 auth_cookie_bad_hash action no 1
136 auth_cookie_bad_username action no 1
137 auth_cookie_expiration filter no 2
138 auth_cookie_expired action no 1
139 auth_cookie_malformed action no 1
140 auth_cookie_valid action no 1
141 auth_post_meta_{$meta_key} note filter no 1
142 auth_redirect action no 1
143 auth_redirect_scheme filter no 1
144 autocomplete_users_for_site_admins filter no 2
145 automatic_updater_disabled filter no 1
146 automatic_updates_complete action no 1
147 automatic_updates_debug_email filter no 1
148 automatic_updates_is_vcs_checkout filter no 1
149 automatic_updates_send_debug_email filter no 1
150 auto_core_update_email filter no 1
151 auto_core_update_send_email filter no 1
152 auto_update_{$type} note filter no 1
153 avatar_defaults filter no 1
154 before_delete_post action no 1
155 before_signup_form action no 1
156 before_wp_tiny_mce action no 1
157 begin_fetch_post_thumbnail_html action no 1
158 block_local_requests filter no 1
159 bloginfo filter no 1
160 bloginfo_rss filter no 1
161 bloginfo_url filter no 1
162 blog_details filter no 1
163 blog_option_{$option} note filter no 1
164 blog_privacy_selector action no 1
165 blog_redirect_404 filter no 1
166 body_class filter no 1
167 browse-happy-notice filter no 1
168 bulk_actions-{$this->screen->id} note filter no 1
169 bulk_edit_custom_box action no 1
170 bulk_post_updated_messages filter no 1
171 cancel_comment_reply_link filter no 1
172 can_edit_network filter no 1
173 category_description filter no 1
174 category_feed_link filter no 1
175 category_link filter no 1
176 check_admin_referer action no 1
177 check_ajax_referer action no 1
178 check_comment_flood action no 1
179 check_is_user_spammed filter no 1
180 check_password filter no 2
181 check_passwords action no 1
182 clean_attachment_cache action no 1
183 clean_object_term_cache action no 1
184 clean_page_cache action no 1
185 clean_post_cache action no 1
186 clean_term_cache action no 1
187 clean_url filter no 1
188 clear_auth_cookie action no 1
189 close_comments_for_post_types filter no 2
190 commentrss2_item action no 1
191 commentsrss2_head action no 1
192 comments_array filter no 1
193 comments_atom_head action no 1
194 comments_clauses filter no 1
195 comments_link_feed filter no 1
196 comments_number filter no 1
197 comments_open filter no 1
198 comments_per_page filter no 2
199 comments_popup_link_attributes filter no 1
200 comments_rewrite_rules filter no 1
201 comments_template filter no 1
202 comment_add_author_url action no 1
203 comment_atom_entry action no 1
204 comment_author filter no 1
205 comment_author_rss filter no 1
206 comment_class filter no 1
207 comment_closed action no 1
208 comment_cookie_lifetime filter no 1
209 comment_duplicate_trigger action no 1
210 comment_edit_pre filter no 2
211 comment_edit_redirect filter no 1
212 comment_email filter no 1
213 comment_excerpt filter no 1
214 comment_feed_groupby filter no 2
215 comment_feed_join filter no 2
216 comment_feed_limits filter no 2
217 comment_feed_orderby filter no 2
218 comment_feed_where filter no 2
219 comment_flood_filter filter no 1
220 comment_flood_trigger action no 1
221 comment_form action no 3
222 comment_form_after action no 1
223 comment_form_after_fields action no 1
224 comment_form_before action no 1
225 comment_form_before_fields action no 1
226 comment_form_comments_closed action no 1
227 comment_form_defaults filter no 1
228 comment_form_default_fields filter no 1
229 comment_form_field_comment filter no 1
230 comment_form_field_{$name} note filter no 1
231 comment_form_logged_in filter no 1
232 comment_form_logged_in_after action no 1
233 comment_form_must_log_in_after action no 1
234 comment_form_top action no 1
235 comment_id_fields filter no 1
236 comment_id_not_found action no 1
237 comment_link filter no 1
238 comment_loop_start action no 1
239 comment_max_links_url filter no 1
240 comment_moderation_headers filter no 1
241 comment_moderation_recipients filter no 1
242 comment_moderation_subject filter no 1
243 comment_moderation_text filter no 1
244 comment_notification_headers filter no 1
245 comment_notification_notify_author filter no 1
246 comment_notification_recipients filter no 1
247 comment_notification_subject filter no 1
248 comment_notification_text filter no 1
249 comment_on_draft action no 1
250 comment_on_password_protected action no 1
251 comment_on_trash action no 1
252 comment_post action no 1
253 comment_post_redirect filter no 1
254 comment_remove_author_url action no 1
255 comment_reply_link filter no 1
256 comment_row_actions filter no 2
257 comment_save_pre filter no 1
258 comment_status_links filter no 1
259 comment_text filter no 2
260 comment_text_rss filter no 1
261 comment_url filter no 1
262 comment_{$new_status}_{$comment->comment_type} note action no 1
263 comment_{$old_status}_to_{$new_status} note action no 1
264 content_url filter no 1
265 contextual_help filter no 1
266 contextual_help_list filter no 1
267 core_upgrade_preamble action no 1
268 core_version_check_locale filter no 1
269 created_term action no 1
270 created_{$taxonomy} note action no 1
271 create_term action no 1
272 create_{$taxonomy} note action no 1
273 cron_request filter no 1
274 cron_schedules filter no 1
275 current_screen action no 1
276 current_theme_supports-{$feature} note filter no 1
277 customizer_widgets_section_args filter YES 1
278 customize_allowed_urls filter no 1
279 customize_controls_enqueue_scripts action no 1
280 customize_controls_init action no 1
281 customize_controls_print_footer_scripts action no 1
282 customize_controls_print_scripts action no 1
283 customize_controls_print_styles action no 1
284 customize_preview_init action no 1
285 customize_preview_{$this->id} note action no 1
286 customize_register action no 1
287 customize_render_control action no 1
288 customize_render_control_{$this->id} note action no 1
289 customize_render_section action no 1
290 customize_render_section_{$this->id} note action no 1
291 customize_sanitize_js_{$this->id} note filter no 1
292 customize_sanitize_{$this->id} note filter no 1
293 customize_save action no 1
294 customize_save_after action no 1
295 customize_save_{$this->id_data[base]} note action no 1
296 customize_update_{$this->type} note action no 1
297 customize_value_{$this->id_data[base]} note filter no 1
298 custom_header_options action no 1
299 custom_menu_order filter no 1
300 dashboard_glance_items filter no 1
301 dashboard_primary_feed filter no 1
302 dashboard_primary_link filter no 1
303 dashboard_primary_title filter no 1
304 dashboard_secondary_feed filter no 1
305 dashboard_secondary_link filter no 1
306 dashboard_secondary_title filter no 1
307 date_formats filter no 1
308 date_i18n filter no 1
309 date_query_valid_columns filter no 1
310 date_rewrite_rules filter no 1
311 day_link filter no 1
312 dbdelta_create_queries filter no 1
313 dbdelta_insert_queries filter no 1
314 dbdelta_queries filter no 1
315 dbx_post_advanced action no 1
316 dbx_post_sidebar action no 1
317 deactivated_plugin action no 1
318 deactivate_blog action no 1
319 deactivate_plugin action no 1
320 deactivate_{$plugin} note action no 1
321 default_avatar_select filter no 1
322 default_content filter no 1
323 default_contextual_help filter no 1
324 default_excerpt filter no 1
325 default_feed filter no 1
326 default_hidden_meta_boxes filter no 1
327 default_option_{$option} note filter no 3
328 default_site_option_{$option} note filter no 3
329 default_title filter no 1
330 deleted_comment action no 1
331 deleted_link action no 1
332 deleted_option action no 1
333 deleted_post action no 2
334 deleted_postmeta action no 1
335 deleted_site_transient action no 1
336 deleted_term_relationships action no 1
337 deleted_term_taxonomy action no 1
338 deleted_transient action no 1
339 deleted_user action no 2
340 deleted_usermeta action no 1
341 deleted_{$meta_type}meta note action no 1
342 deleted_{$meta_type}_meta note action no 2
343 delete_attachment action no 1
344 delete_blog action no 1
345 delete_comment action no 2
346 delete_link action no 1
347 delete_option action no 1
348 delete_option_{$option} note action no 1
349 delete_post action no 2
350 delete_postmeta action no 1
351 delete_site_email_content filter no 1
352 delete_site_option action no 1
353 delete_site_option_{$option} note action no 1
354 delete_site_transient_{$transient} note action no 1
355 delete_term action no 1
356 delete_term_relationships action no 1
357 delete_term_taxonomy action no 1
358 delete_transient_{$transient} note action no 1
359 delete_user action no 1
360 delete_usermeta action no 1
361 delete_{$meta_type}meta note action no 1
362 delete_{$meta_type}_meta note action no 2
363 delete_{$meta_type}_metadata note filter no 1
364 delete_{$taxonomy} note action no 1
365 deprecated_argument_run action no 1
366 deprecated_argument_trigger_error filter no 1
367 deprecated_file_included action no 1
368 deprecated_file_trigger_error filter no 1
369 deprecated_function_run action no 1
370 deprecated_function_trigger_error filter no 1
371 determine_current_user filter YES 1
372 disable_captions filter no 7
373 display_media_states filter no 1
374 display_post_states filter no 1
375 documentation_ignore_functions filter no 1
376 doing_it_wrong_run action no 1
377 doing_it_wrong_trigger_error filter no 1
378 domain_exists filter no 1
379 do_meta_boxes action no 8
380 do_mu_upgrade filter no 1
381 do_parse_request filter no 1
382 do_robots action no 1
383 do_robotstxt action no 1
384 dynamic_sidebar action no 1
385 dynamic_sidebar_after action YES 2
386 dynamic_sidebar_before action YES 2
387 dynamic_sidebar_has_widgets filter YES 2
388 dynamic_sidebar_params filter no 1
389 editable_extensions filter no 1
390 editable_roles filter no 1
391 editable_slug filter no 7
392 edited_term action no 1
393 edited_terms action no 4
394 edited_term_taxonomies action no 1
395 edited_term_taxonomy action no 3
396 edited_{$taxonomy} note action no 1
397 editor_max_image_size filter no 1
398 edit_attachment action no 1
399 edit_bookmark_link filter no 1
400 edit_categories_per_page filter no 2
401 edit_category_form action no 2
402 edit_category_form_fields action no 1
403 edit_category_form_pre action no 1
404 edit_comment action no 1
405 edit_comment_link filter no 1
406 edit_form_advanced action no 1
407 edit_form_after_editor action no 1
408 edit_form_after_title action no 1
409 edit_form_top action no 1
410 edit_link action no 1
411 edit_link_category_form action no 2
412 edit_link_category_form_fields action no 1
413 edit_link_category_form_pre action no 1
414 edit_page_form action no 1
415 edit_post action no 3
416 edit_posts_per_page filter no 3
417 edit_post_link filter no 1
418 edit_post_{$field} note filter no 1
419 edit_profile_url filter no 1
420 edit_tags_per_page filter no 1
421 edit_tag_form action no 1
422 edit_tag_form_fields action no 1
423 edit_tag_form_pre action no 1
424 edit_tag_link filter no 1
425 edit_term action no 1
426 edit_terms action no 4
427 edit_term_link filter no 1
428 edit_term_taxonomies action no 1
429 edit_term_taxonomy action no 3
430 edit_term_{$field} note filter no 1
431 edit_user_profile action no 1
432 edit_user_profile_update action no 1
433 edit_user_{$field} note filter no 1
434 edit_{$field} note filter no 3
435 edit_{$taxonomy} note action no 1
436 edit_{$taxonomy}_{$field} note filter no 1
437 embed_cache_oembed_types filter no 1
438 embed_defaults filter no 1
439 embed_googlevideo filter no 1
440 embed_handler_html filter no 1
441 embed_maybe_make_link filter no 1
442 embed_oembed_discover filter no 1
443 embed_oembed_html filter no 2
444 enable_edit_any_user_configuration filter no 1
445 enable_live_network_counts filter no 2
446 enable_post_by_email_configuration filter no 4
447 enable_update_services_configuration filter no 2
448 end_fetch_post_thumbnail_html action no 1
449 enter_title_here filter no 2
450 esc_html filter no 1
451 esc_textarea filter no 1
452 excerpt_length filter no 1
453 excerpt_more filter no 1
454 exit_on_http_head filter no 1
455 export_args filter no 1
456 export_filters action no 1
457 export_wp action no 1
458 ext2type filter no 1
459 extra_theme_headers filter no 1
460 extra_{$context}_headers note filter no 1
461 feed_content_type filter no 1
462 feed_link filter no 1
463 filesystem_method filter no 1
464 filesystem_method_file filter no 1
465 file_is_displayable_image filter no 1
466 flush_rewrite_rules_hard filter no 1
467 force_filtered_html_on_import filter no 1
468 format_to_edit filter no 1
469 found_posts filter no 1
470 found_posts_query filter no 1
471 found_users_query filter no 1
472 fs_ftp_connection_types filter no 1
473 gallery_style filter no 1
474 generate_rewrite_rules action no 1
475 getarchives_join filter no 1
476 getarchives_where filter no 1
477 getimagesize_mimes_to_exts filter no 1
478 gettext filter no 1
479 gettext_with_context filter no 1
480 get_ancestors filter no 2
481 get_archives_link filter no 1
482 get_attached_file filter no 1
483 get_attached_media filter no 1
484 get_attached_media_args filter no 1
485 get_avatar filter no 1
486 get_avatar_comment_types filter no 1
487 get_bloginfo_rss filter no 2
488 get_blogs_of_user filter no 1
489 get_bookmarks filter no 3
490 get_calendar filter no 4
491 get_categories_taxonomy filter no 1
492 get_comment filter no 1
493 get_comments_link filter no 1
494 get_comments_number filter no 1
495 get_comments_pagenum_link filter no 1
496 get_comment_author filter no 1
497 get_comment_author_email filter no 1
498 get_comment_author_IP filter no 1
499 get_comment_author_link filter no 2
500 get_comment_author_url filter no 1
501 get_comment_author_url_link filter no 1
502 get_comment_date filter no 1
503 get_comment_excerpt filter no 1
504 get_comment_ID filter no 1
505 get_comment_link filter no 1
506 get_comment_text filter no 1
507 get_comment_time filter no 1
508 get_comment_type filter no 1
509 get_date_sql filter no 1
510 get_delete_post_link filter no 1
511 get_editable_authors filter no 1
512 get_edit_bookmark_link filter no 1
513 get_edit_comment_link filter no 1
514 get_edit_post_link filter no 1
515 get_edit_tag_link filter no 1
516 get_edit_term_link filter no 1
517 get_edit_user_link filter no 1
518 get_enclosed filter no 1
519 get_footer action no 1
520 get_header action no 1
521 get_image_tag filter no 1
522 get_image_tag_class filter no 1
523 get_lastpostdate filter no 1
524 get_lastpostmodified filter no 1
525 get_media_item_args filter no 2
526 get_meta_sql filter no 1
527 get_others_drafts filter no 1
528 get_pagenum_link filter no 1
529 get_pages filter no 3
530 get_post_galleries filter no 1
531 get_post_gallery filter no 1
532 get_post_modified_time filter no 1
533 get_post_time filter no 1
534 get_pung filter no 1
535 get_sample_permalink_html filter no 2
536 get_search_form filter no 1
537 get_search_query filter no 1
538 get_shortlink filter no 1
539 get_sidebar action no 1
540 get_space_allowed filter no 1
541 get_tags filter no 1
542 get_template_part_{$slug} note action no 1
543 get_term filter no 2
544 get_terms filter no 3
545 get_terms_args filter no 1
546 get_terms_fields filter no 1
547 get_terms_orderby filter no 1
548 get_the_author_{$field} note filter no 1
549 get_the_categories filter no 1
550 get_the_date filter no 1
551 get_the_excerpt filter no 1
552 get_the_generator_{$type} note filter no 1
553 get_the_guid filter no 1
554 get_the_modified_date filter no 1
555 get_the_modified_time filter no 1
556 get_the_tags filter no 1
557 get_the_terms filter no 1
558 get_the_time filter no 1
559 get_to_ping filter no 1
560 get_usernumposts filter no 1
561 get_users_drafts filter no 1
562 get_user_option_{$option} note filter no 1
563 get_wp_title_rss filter no 1
564 get_{$adjacent}_post_join note filter no 1
565 get_{$adjacent}_post_sort note filter no 1
566 get_{$adjacent}_post_where note filter no 1
567 get_{$meta_type}_metadata note filter no 2
568 get_{$taxonomy} note filter no 2
569 global_terms_enabled filter no 1
570 got_rewrite filter no 1
571 got_url_rewrite filter no 1
572 graceful_fail filter no 1
573 graceful_fail_template filter no 1
574 granted_super_admin action no 1
575 grant_super_admin action no 1
576 heartbeat_nopriv_received filter no 1
577 heartbeat_nopriv_send filter no 1
578 heartbeat_nopriv_tick action no 1
579 heartbeat_received filter no 1
580 heartbeat_send filter no 1
581 heartbeat_settings filter no 1
582 heartbeat_tick action no 1
583 hidden_meta_boxes filter no 1
584 home_url filter no 1
585 htmledit_pre filter no 1
586 https_local_ssl_verify filter no 3
587 https_ssl_verify filter no 2
588 http_api_curl action no 1
589 http_api_debug action no 1
590 http_api_transports filter no 1
591 http_headers_useragent filter no 2
592 http_origin filter no 1
593 http_request_args filter no 1
594 http_request_host_is_external filter no 1
595 http_request_redirection_count filter no 1
596 http_request_reject_unsafe_urls filter no 1
597 http_request_timeout filter no 1
598 http_request_version filter no 1
599 http_response filter no 1
600 icon_dir filter no 3
601 icon_dirs filter no 1
602 icon_dir_uri filter no 1
603 iis7_supports_permalinks filter no 1
604 iis7_url_rewrite_rules filter no 1
605 image_add_caption_shortcode filter no 1
606 image_downsize filter no 2
607 image_editor_default_mime_type filter no 1
608 image_editor_save_pre filter no 2
609 image_edit_before_change filter no 1
610 image_make_intermediate_size filter no 2
611 image_memory_limit filter no 3
612 image_resize_dimensions filter no 1
613 image_save_pre filter no 2
614 image_send_to_editor filter no 1
615 image_send_to_editor_url filter no 1
616 image_size_names_choose filter no 5
617 img_caption_shortcode filter no 1
618 img_caption_shortcode_width filter no 1
619 import_upload_size_limit filter no 1
620 includes_url filter no 1
621 incompatible_sql_modes filter YES 1
622 index_rel_link filter no 1
623 init action no 1
624 install_plugins_nonmenu_tabs filter no 1
625 install_plugins_pre_{$tab} note action no 1
626 install_plugins_table_api_args_{$tab} note filter no 1
627 install_plugins_table_header action no 1
628 install_plugins_tabs filter no 1
629 install_plugins_{$tab} note action no 1
630 install_plugin_complete_actions filter no 1
631 install_themes_nonmenu_tabs filter no 1
632 install_themes_pre_{$tab} note action no 1
633 install_themes_table_api_args_{$old_filter} note filter YES 1
634 install_themes_table_api_args_{$tab} note filter no 1
635 install_themes_table_header action no 1
636 install_themes_tabs filter no 1
637 install_themes_{$tab} note action no 1
638 install_theme_complete_actions filter no 1
639 intermediate_image_sizes filter no 1
640 intermediate_image_sizes_advanced filter no 1
641 in_admin_footer action no 1
642 in_admin_header action no 1
643 in_plugin_update_message-{$file} note action no 1
644 in_theme_update_message-{$theme_key} note action no 1
645 in_widget_form action no 1
646 is_active_sidebar filter YES 1
647 is_email filter no 9
648 is_email_address_unsafe filter no 1
649 is_multi_author filter no 1
650 is_protected_meta filter no 1
651 is_wide_widget_in_customizer filter YES 1
652 jpeg_quality filter no 2
653 js_escape filter no 1
654 kses_allowed_protocols filter no 1
655 language_attributes filter no 1
656 lang_codes filter no 1
657 link_category filter no 3
658 link_title filter no 1
659 list_cats filter no 5
660 list_pages filter no 1
661 list_terms_exclusions filter no 1
662 load-categories-php action no 1
663 load-edit-link-categories-php action no 1
664 load-importer-{$importer} note action no 1
665 load-page-new-php action no 1
666 load-page-php action no 1
667 load-widgets-php action no 3
668 load-{$pagenow} note action no 1
669 load-{$page_hook} note action no 1
670 load-{$plugin_page} note action no 1
671 load_default_embeds filter no 1
672 load_default_widgets filter no 1
673 load_feed_engine action no 1
674 load_image_to_edit filter no 1
675 load_image_to_edit_attachmenturl filter no 1
676 load_image_to_edit_filesystempath filter no 1
677 load_image_to_edit_path filter no 1
678 load_textdomain action no 1
679 load_textdomain_mofile filter no 1
680 locale filter no 2
681 locale_stylesheet_uri filter no 1
682 loginout filter no 2
683 login_body_class filter no 1
684 login_enqueue_scripts action no 1
685 login_errors filter no 1
686 login_footer action no 2
687 login_form action no 1
688 login_form_bottom filter no 1
689 login_form_defaults filter no 1
690 login_form_middle filter no 1
691 login_form_top filter no 1
692 login_form_{$action} note action no 1
693 login_head action no 1
694 login_headertitle filter no 1
695 login_headerurl filter no 1
696 login_init action no 1
697 login_message filter no 1
698 login_messages filter no 1
699 login_redirect filter no 1
700 login_url filter no 1
701 logout_url filter no 1
702 loop_end action no 1
703 loop_start action no 1
704 lostpassword_form action no 1
705 lostpassword_post action no 1
706 lostpassword_redirect filter no 1
707 lostpassword_url filter no 1
708 lost_password action no 1
709 make_delete_blog action no 2
710 make_ham_blog action no 2
711 make_ham_user action no 1
712 make_spam_blog action no 2
713 make_spam_user action no 1
714 make_undelete_blog action no 2
715 manage_comments_custom_column action no 1
716 manage_comments_nav action no 1
717 manage_link_custom_column action no 1
718 manage_media_columns filter no 1
719 manage_media_custom_column action no 1
720 manage_pages_columns filter no 1
721 manage_pages_custom_column action no 1
722 manage_plugins_custom_column action no 1
723 manage_posts_columns filter no 1
724 manage_posts_custom_column action no 1
725 manage_sites_action_links filter no 1
726 manage_sites_custom_column action no 1
727 manage_taxonomies_for_attachment_columns filter no 1
728 manage_taxonomies_for_{$post_type}_columns note filter no 1
729 manage_themes_custom_column action no 1
730 manage_users_custom_column filter no 2
731 manage_{$post->post_type}_posts_custom_column note action no 1
732 manage_{$post_type}_posts_columns note filter no 1
733 manage_{$screen->id}_columns note filter no 1
734 manage_{$this->screen->id}_sortable_columns note filter no 1
735 manage_{$this->screen->taxonomy}_custom_column note filter no 1
736 map_meta_cap filter no 1
737 mature_blog action no 2
738 mce_buttons filter no 1
739 mce_buttons_2 filter no 1
740 mce_buttons_3 filter no 1
741 mce_buttons_4 filter no 1
742 mce_css filter no 1
743 mce_external_languages filter no 1
744 mce_external_plugins filter no 1
745 media_buttons action no 1
746 media_buttons_context filter no 1
747 media_meta filter no 3
748 media_row_actions filter no 1
749 media_send_to_editor filter no 2
750 media_submitbox_misc_sections filter no 1
751 media_upload_default_tab filter no 2
752 media_upload_default_type filter no 1
753 media_upload_form_url filter no 4
754 media_upload_mime_type_links filter no 1
755 media_upload_tabs filter no 2
756 media_upload_{$tab} note action no 1
757 media_upload_{$type} note action no 1
758 media_view_settings filter no 1
759 media_view_strings filter no 1
760 menu_order filter no 1
761 mime_types filter no 1
762 mod_rewrite_rules filter no 1
763 months_dropdown_results filter no 1
764 month_link filter no 1
765 ms_site_check filter no 1
766 ms_site_not_found action YES 1
767 ms_user_list_site_actions filter no 1
768 ms_user_row_actions filter no 1
769 muplugins_loaded action no 1
770 mu_activity_box_end action no 1
771 mu_dropdown_languages filter no 1
772 mu_menu_items filter no 1
773 mu_rightnow_end action no 1
774 myblogs_allblogs_options action no 1
775 myblogs_blog_actions filter no 1
776 myblogs_options filter no 2
777 nav_menu_attr_title filter no 2
778 nav_menu_css_class filter no 1
779 nav_menu_description filter no 2
780 nav_menu_items_{$post_type_name} note filter no 1
781 nav_menu_item_id filter no 1
782 nav_menu_link_attributes filter no 1
783 nav_menu_meta_box_object filter no 3
784 network_admin_edit_{$action} note action no 1
785 network_admin_menu action no 1
786 network_admin_notices action no 1
787 network_admin_url filter no 1
788 network_by_path_segments_count filter YES 1
789 network_home_url filter no 1
790 network_sites_updated_message_{$updated} note filter no 1
791 network_site_url filter no 1
792 network_site_users_after_list_table action no 1
793 newblogname filter no 1
794 newblog_notify_siteadmin filter no 1
795 newuser_notify_siteadmin filter no 1
796 new_admin_email_content filter no 1
797 new_user_email_content filter no 1
798 next_comments_link_attributes filter no 1
799 next_posts_link_attributes filter no 1
800 ngettext filter no 1
801 ngettext_with_context filter no 1
802 nocache_headers filter no 1
803 nonce_life filter no 1
804 nonce_user_logged_out filter no 2
805 no_texturize_shortcodes filter no 1
806 no_texturize_tags filter no 1
807 number_format_i18n filter no 1
808 oembed_dataparse filter no 1
809 oembed_fetch_url filter no 1
810 oembed_linktypes filter no 1
811 oembed_providers filter no 1
812 oembed_result filter no 1
813 opml_head action no 1
814 option_enable_xmlrpc filter no 1
815 option_page_capability_{$option_page} note filter no 1
816 option_{$option_name} note filter YES 1
817 option_{$option} note filter no 1
818 override_load_textdomain filter no 1
819 override_post_lock filter no 1
820 override_unload_textdomain filter no 1
821 page_attributes_dropdown_pages_args filter no 1
822 page_css_class filter no 1
823 page_link filter no 1
824 page_rewrite_rules filter no 1
825 page_row_actions filter no 1
826 paginate_links filter no 3
827 parent_file filter no 1
828 parent_post_rel_link filter no 1
829 parse_query action no 1
830 parse_request action no 1
831 parse_tax_query action no 1
832 password_reset action no 1
833 password_reset_key_expired filter no 1
834 permalink_structure_changed action no 1
835 personal_options action no 1
836 personal_options_update action no 1
837 phone_content filter no 1
838 phpmailer_init action no 1
839 pingback_ping_source_uri filter no 1
840 pingback_post action no 1
841 pingback_useragent filter no 1
842 pings_open filter no 1
843 plugins_api filter no 1
844 plugins_api_args filter no 1
845 plugins_api_result filter no 1
846 plugins_loaded action no 1
847 plugins_update_check_locales filter no 1
848 plugins_url filter no 1
849 plugin_install_action_links filter no 1
850 plugin_locale filter no 2
851 plugin_row_meta filter no 1
852 plupload_default_params filter no 1
853 plupload_default_settings filter no 1
854 plupload_init filter no 1
855 populate_network_meta filter no 1
856 populate_options action no 1
857 post-html-upload-ui action no 1
858 post-plupload-upload-ui action no 3
859 post-upload-ui action no 2
860 postbox_classes_{$page}_{$id} note filter no 1
861 postmeta_form_limit filter no 1
862 posts_clauses filter no 1
863 posts_clauses_request filter no 1
864 posts_distinct filter no 1
865 posts_distinct_request filter no 1
866 posts_fields filter no 1
867 posts_fields_request filter no 1
868 posts_groupby filter no 1
869 posts_groupby_request filter no 1
870 posts_join filter no 1
871 posts_join_paged filter no 1
872 posts_join_request filter no 1
873 posts_orderby filter no 1
874 posts_orderby_request filter no 1
875 posts_request filter no 1
876 posts_request_ids filter no 1
877 posts_results filter no 1
878 posts_search filter no 1
879 posts_search_orderby filter no 1
880 posts_selection action no 1
881 posts_where filter no 1
882 posts_where_paged filter no 1
883 posts_where_request filter no 1
884 post_class filter no 1
885 post_comments_feed_link filter no 1
886 post_comments_feed_link_html filter no 1
887 post_comments_link filter no 1
888 post_comment_status_meta_box-options action no 1
889 post_date_column_time filter no 2
890 post_edit_form_tag action no 1
891 post_format_rewrite_base filter no 1
892 post_gallery filter no 1
893 post_limits filter no 1
894 post_limits_request filter no 1
895 post_link filter no 1
896 post_link_category filter no 1
897 post_locked_dialog action no 1
898 post_lock_lost_dialog action no 1
899 post_mime_types filter no 1
900 post_password_expires filter no 1
901 post_playlist filter YES 1
902 post_rewrite_rules filter no 1
903 post_row_actions filter no 1
904 post_submitbox_misc_actions action no 1
905 post_submitbox_start action no 2
906 post_thumbnail_html filter no 1
907 post_thumbnail_size filter no 1
908 post_types_to_delete_with_user filter no 1
909 post_type_archive_feed_link filter no 1
910 post_type_archive_link filter no 1
911 post_type_archive_title filter no 1
912 post_type_labels_{$post_type} note filter no 1
913 post_type_link filter no 1
914 post_updated action no 1
915 post_updated_messages filter no 1
916 post_{$field} note filter no 1
917 pre-html-upload-ui action no 1
918 pre-plupload-upload-ui action no 2
919 pre-upload-ui action no 2
920 prepend_attachment filter no 1
921 preprocess_comment filter no 1
922 preprocess_signup_form action no 1
923 preview_post_link filter no 4
924 previous_comments_link_attributes filter no 1
925 previous_posts_link_attributes filter no 1
926 pre_add_site_option_{$option} note filter no 1
927 pre_category_nicename filter no 1
928 pre_comment_approved filter no 1
929 pre_comment_author_email filter no 2
930 pre_comment_author_name filter no 2
931 pre_comment_author_url filter no 2
932 pre_comment_content filter no 1
933 pre_comment_on_post action no 1
934 pre_comment_user_agent filter no 1
935 pre_comment_user_ip filter no 1
936 pre_current_active_plugins action no 1
937 pre_delete_site_option_{$option} note action no 1
938 pre_ent2ncr filter no 1
939 pre_get_comments action no 1
940 pre_get_network_by_path filter YES 1
941 pre_get_posts action no 1
942 pre_get_search_form action no 1
943 pre_get_shortlink filter no 1
944 pre_get_site_by_path filter YES 1
945 pre_get_space_used filter no 1
946 pre_http_request filter no 1
947 pre_http_send_through_proxy filter no 1
948 pre_insert_term filter no 1
949 pre_kses filter no 1
950 pre_option_enable_xmlrpc filter no 1
951 pre_option_{$option} note filter no 1
952 pre_ping action no 1
953 pre_post_link filter no 1
954 pre_post_update action no 1
955 pre_post_{$field} note filter no 1
956 pre_remote_source filter no 1
957 pre_set_site_transient_{$transient} note filter no 1
958 pre_set_theme_mod_{$name} note filter YES 1
959 pre_set_transient_{$transient} note filter no 1
960 pre_site_option_{$option} note filter no 1
961 pre_site_transient_{$transient} note filter no 1
962 pre_term_{$field} note filter no 1
963 pre_transient_{$transient} note filter no 1
964 pre_update_option filter YES 1
965 pre_update_option_{$option} note filter no 1
966 pre_update_site_option_{$option} note filter no 1
967 pre_upload_error filter no 1
968 pre_user_description filter no 1
969 pre_user_display_name filter no 1
970 pre_user_email filter no 1
971 pre_user_first_name filter no 1
972 pre_user_id filter no 2
973 pre_user_last_name filter no 1
974 pre_user_login filter no 2
975 pre_user_nicename filter no 1
976 pre_user_nickname filter no 1
977 pre_user_query action no 1
978 pre_user_search action no 1
979 pre_user_url filter no 1
980 pre_user_{$field} note filter no 1
981 pre_wp_nav_menu filter YES 1
982 pre_{$field} note filter no 3
983 pre_{$taxonomy}_{$field} note filter no 1
984 print_admin_styles filter no 1
985 print_footer_scripts filter no 1
986 print_head_scripts filter no 1
987 print_late_styles filter no 1
988 print_media_templates action no 1
989 print_scripts_array filter no 1
990 print_styles_array filter no 1
991 privacy_on_link_text filter no 1
992 privacy_on_link_title filter no 1
993 private_title_format filter no 1
994 private_to_published action no 1
995 profile_personal_options action no 1
996 profile_update action no 1
997 protected_title_format filter no 1
998 publish_phone action no 1
999 pub_priv_sql_capability filter no 1
1000 query filter no 1
1001 query_string filter no 1
1002 query_vars filter no 1
1003 quicktags_settings filter no 1
1004 quick_edit_custom_box action no 2
1005 quick_edit_dropdown_pages_args filter no 1
1006 random_password filter no 1
1007 rdf_header action no 1
1008 rdf_item action no 1
1009 rdf_ns action no 1
1010 redirect_canonical filter no 1
1011 redirect_network_admin_request filter no 1
1012 redirect_post_location filter no 1
1013 redirect_user_admin_request filter no 1
1014 refresh_blog_details action no 1
1015 register filter no 5
1016 registered_post_type action no 1
1017 registered_taxonomy action no 1
1018 register_form action no 1
1019 register_post action no 1
1020 register_sidebar action no 1
1021 register_url filter no 1
1022 registration_errors filter no 1
1023 registration_redirect filter no 1
1024 remove_user_from_blog action no 1
1025 request filter no 1
1026 request_filesystem_credentials filter no 1
1027 resetpass_form action YES 1
1028 restrict_manage_comments action no 1
1029 restrict_manage_posts action no 2
1030 restrict_manage_users action no 1
1031 retreive_password action no 1
1032 retrieve_password action no 1
1033 retrieve_password_key action no 1
1034 retrieve_password_message filter no 1
1035 retrieve_password_title filter no 1
1036 revoked_super_admin action no 1
1037 revoke_super_admin action no 1
1038 rewrite_rules filter no 1
1039 rewrite_rules_array filter no 1
1040 richedit_pre filter no 2
1041 rightnow_end action no 1
1042 robots_txt filter no 1
1043 role_has_cap filter no 1
1044 root_rewrite_rules filter no 1
1045 rss2_comments_ns action no 1
1046 rss2_head action no 2
1047 rss2_item action no 1
1048 rss2_ns action no 2
1049 rss_enclosure filter no 1
1050 rss_head action no 1
1051 rss_item action no 1
1052 rss_update_frequency filter no 3
1053 rss_update_period filter no 3
1054 safe_style_css filter no 1
1055 salt filter no 2
1056 sanitize_comment_cookies action no 1
1057 sanitize_email filter no 8
1058 sanitize_file_name filter no 2
1059 sanitize_file_name_chars filter no 1
1060 sanitize_html_class filter no 1
1061 sanitize_key filter no 1
1062 sanitize_mime_type filter no 1
1063 sanitize_option_{$option} note filter no 1
1064 sanitize_text_field filter no 1
1065 sanitize_title filter no 1
1066 sanitize_trackback_urls filter no 1
1067 sanitize_user filter no 1
1068 sanitize_{$meta_type}_meta_{$meta_key} note filter no 1
1069 save_post action no 2
1070 save_post_{$post->post_type} note action no 2
1071 schedule_event filter no 2
1072 screen_layout_columns filter no 1
1073 screen_options_show_screen filter no 1
1074 screen_settings filter no 1
1075 script_loader_src filter no 2
1076 search_feed_link filter no 2
1077 search_form_format filter no 1
1078 search_link filter no 1
1079 search_rewrite_rules filter no 1
1080 secure_auth_cookie filter no 1
1081 secure_auth_redirect filter no 1
1082 secure_logged_in_cookie filter no 1
1083 secure_signon_cookie filter no 1
1084 self_link filter no 1
1085 send_core_update_notification_email filter no 1
1086 send_headers action no 1
1087 set-screen-option filter no 1
1088 setted_site_transient action no 1
1089 setted_transient action no 1
1090 setup_theme action no 1
1091 set_auth_cookie action no 1
1092 set_comment_cookies action no 1
1093 set_current_user action no 1
1094 set_logged_in_cookie action no 1
1095 set_object_terms action no 1
1096 set_site_transient_{$transient} note action no 1
1097 set_transient_{$transient} note action no 1
1098 set_url_scheme filter no 1
1099 set_user_role action no 1
1100 shake_error_codes filter no 1
1101 shortcode_atts_{$shortcode} note filter no 1
1102 shortcut_link filter no 1
1103 show_admin_bar filter no 1
1104 show_advanced_plugins filter no 2
1105 show_network_site_users_add_existing_form filter no 2
1106 show_network_site_users_add_new_form filter no 1
1107 show_password_fields filter no 2
1108 show_post_locked_dialog filter no 1
1109 show_recent_comments_widget_style filter no 1
1110 show_user_profile action no 1
1111 shutdown action no 1
1112 sidebars_widgets filter no 1
1113 sidebar_admin_page action no 1
1114 sidebar_admin_setup action no 4
1115 signup_another_blog_init filter no 1
1116 signup_blogform action no 1
1117 signup_blog_init filter no 1
1118 signup_create_blog_meta filter no 1
1119 signup_extra_fields action no 1
1120 signup_finished action no 3
1121 signup_header action no 1
1122 signup_hidden_fields action no 3
1123 signup_user_init filter no 1
1124 single_cat_title filter no 1
1125 single_post_title filter no 1
1126 single_tag_title filter no 1
1127 single_term_title filter no 1
1128 site_by_path_segments_count filter YES 1
1129 site_option_{$option} note filter no 1
1130 site_transient_{$transient} note filter no 1
1131 site_url filter no 1
1132 smilies_src filter no 1
1133 spammed_comment action no 1
1134 spam_comment action no 1
1135 split_the_query filter no 1
1136 start_previewing_theme action no 1
1137 status_header filter no 1
1138 stop_previewing_theme action no 1
1139 stylesheet filter no 1
1140 stylesheet_directory filter no 1
1141 stylesheet_directory_uri filter no 1
1142 stylesheet_uri filter no 1
1143 style_loader_src filter no 1
1144 style_loader_tag filter no 2
1145 subdirectory_reserved_names filter no 2
1146 submitlink_box action no 2
1147 submitpage_box action no 1
1148 submitpost_box action no 1
1149 switch_blog action no 4
1150 switch_theme action no 1
1151 tables_to_repair filter no 1
1152 tagsperpage filter no 1
1153 tag_cloud_sort filter no 1
1154 tag_escape filter no 1
1155 tag_feed_link filter no 1
1156 tag_link filter no 1
1157 tag_rewrite_rules filter no 1
1158 tag_row_actions filter no 1
1159 taxonomy_feed_link filter no 1
1160 taxonomy_parent_dropdown_args filter no 1
1161 teeny_mce_before_init filter no 1
1162 teeny_mce_buttons filter no 1
1163 teeny_mce_plugins filter no 1
1164 template filter no 1
1165 template_directory filter no 1
1166 template_directory_uri filter no 1
1167 template_include filter no 1
1168 template_redirect action no 1
1169 terms_clauses filter no 1
1170 terms_to_edit filter no 1
1171 term_id_filter filter no 2
1172 term_link filter no 1
1173 term_links-{$taxonomy} note filter no 1
1174 term_name filter no 1
1175 term_updated_messages filter no 1
1176 term_{$field} note filter no 1
1177 term_{$field}_rss note filter no 1
1178 themes_api filter no 1
1179 themes_api_args filter no 1
1180 themes_api_result filter no 1
1181 themes_update_check_locales filter no 1
1182 theme_action_links filter no 2
1183 theme_action_links_{$stylesheet} note filter no 2
1184 theme_install_actions filter no 1
1185 theme_locale filter no 1
1186 theme_mod_{$name} note filter no 2
1187 theme_page_templates filter YES 1
1188 theme_root filter no 1
1189 theme_root_uri filter no 1
1190 theme_row_meta filter no 1
1191 the_author filter no 1
1192 the_author_posts_link filter no 1
1193 the_author_{$field} note filter no 1
1194 the_category filter no 7
1195 the_category_rss filter no 1
1196 the_comments filter no 1
1197 the_content filter no 4
1198 the_content_export filter no 1
1199 the_content_feed filter no 1
1200 the_content_more_link filter no 1
1201 the_content_rss filter no 1
1202 the_date filter no 1
1203 the_editor filter no 1
1204 the_editor_content filter no 1
1205 the_excerpt filter no 2
1206 the_excerpt_export filter no 1
1207 the_excerpt_rss filter no 1
1208 the_feed_link filter no 1
1209 the_generator filter no 1
1210 the_meta_key filter no 1
1211 the_modified_author filter no 1
1212 the_modified_date filter no 1
1213 the_modified_time filter no 1
1214 the_password_form filter no 1
1215 the_permalink filter no 4
1216 the_permalink_rss filter no 1
1217 the_post action no 1
1218 the_posts filter no 1
1219 the_preview filter no 1
1220 the_search_query filter no 1
1221 the_shortlink filter no 1
1222 the_tags filter no 1
1223 the_terms filter no 1
1224 the_time filter no 1
1225 the_title filter no 13
1226 the_title_rss filter no 4
1227 the_weekday filter no 1
1228 the_weekday_date filter no 1
1229 the_widget action no 1
1230 thread_comments_depth_max filter no 1
1231 time_formats filter no 1
1232 tiny_mce_before_init filter no 1
1233 tiny_mce_plugins filter no 1
1234 tool_box action no 1
1235 trackback_post action no 1
1236 trackback_url filter no 1
1237 transient_{$transient} note filter no 1
1238 transition_comment_status action no 1
1239 transition_post_status action no 1
1240 trashed_comment action no 1
1241 trashed_post action no 1
1242 trashed_post_comments action no 1
1243 trash_comment action no 1
1244 trash_post_comments action no 1
1245 twentyfourteen_attachment_size filter no 1
1246 twentyfourteen_credits action no 1
1247 twentyfourteen_custom_background_args filter no 1
1248 twentyfourteen_custom_header_args filter no 1
1249 twentyfourteen_featured_posts_after action no 1
1250 twentyfourteen_featured_posts_before action no 1
1251 twentyfourteen_get_featured_posts filter no 1
1252 twentythirteen_attachment_size filter no 1
1253 twentythirteen_author_bio_avatar_size filter no 1
1254 twentythirteen_credits action no 1
1255 twentytwelve_attachment_size filter no 1
1256 twentytwelve_author_bio_avatar_size filter no 2
1257 twentytwelve_credits action no 1
1258 twentytwelve_status_avatar filter no 1
1259 type_url_form_media filter no 1
1260 unarchive_blog action no 2
1261 uninstall_{$file} note action no 1
1262 unload_textdomain action no 1
1263 unmature_blog action no 2
1264 unspammed_comment action no 1
1265 unspam_comment action no 1
1266 untrashed_comment action no 1
1267 untrashed_post action no 1
1268 untrashed_post_comments action no 1
1269 untrash_comment action no 1
1270 untrash_post action no 1
1271 untrash_post_comments action no 1
1272 unzip_file_use_ziparchive filter no 1
1273 update-core-custom_{$action} note action no 1
1274 update-custom_{$action} note action no 1
1275 updated_option action no 1
1276 updated_postmeta action no 2
1277 updated_usermeta action no 1
1278 updated_{$meta_type}_meta note action no 2
1279 update_attached_file filter no 1
1280 update_blog_public action no 1
1281 update_bulk_plugins_complete_actions filter no 1
1282 update_bulk_theme_complete_actions filter no 1
1283 update_feedback filter no 8
1284 update_footer filter no 1
1285 update_option action no 1
1286 update_option_{$option} note action no 1
1287 update_plugin_complete_actions filter no 1
1288 update_postmeta action no 2
1289 update_site_option action no 1
1290 update_site_option_{$option} note action no 1
1291 update_theme_complete_actions filter no 1
1292 update_translations_complete_actions filter no 1
1293 update_usermeta action no 1
1294 update_welcome_email filter no 1
1295 update_welcome_subject filter no 1
1296 update_welcome_user_email filter no 1
1297 update_welcome_user_subject filter no 1
1298 update_wpmu_options action no 1
1299 update_{$meta_type}_meta note action no 2
1300 update_{$meta_type}_metadata note filter no 1
1301 upgrader_clear_destination filter no 1
1302 upgrader_post_install filter no 1
1303 upgrader_pre_download filter no 1
1304 upgrader_pre_install filter no 1
1305 upgrader_process_complete action no 4
1306 upgrader_source_selection filter no 1
1307 upload_dir filter no 1
1308 upload_mimes filter no 1
1309 upload_per_page filter no 1
1310 upload_post_params filter no 1
1311 upload_size_limit filter no 1
1312 upload_ui_over_quota action no 2
1313 url_to_postid filter no 1
1314 user_admin_menu action no 1
1315 user_admin_notices action no 1
1316 user_admin_url filter no 1
1317 user_can_richedit filter no 1
1318 user_contactmethods filter no 1
1319 user_dashboard_url filter no 1
1320 user_edit_form_tag action no 1
1321 user_has_cap filter no 1
1322 user_new_form action no 2
1323 user_new_form_tag action no 2
1324 user_profile_update_errors action no 1
1325 user_register action no 1
1326 user_registration_email filter no 1
1327 user_row_actions filter no 1
1328 user_search_columns filter no 1
1329 user_trailingslashit filter no 1
1330 user_{$field} note filter no 1
1331 user_{$name}_label note filter no 1
1332 use_curl_transport filter no 1
1333 use_default_gallery_style filter no 1
1334 use_google_chrome_frame filter no 1
1335 use_streams_transport filter no 1
1336 validate_current_theme filter no 1
1337 validate_password_reset action no 1
1338 validate_username filter no 1
1339 views_{$this->screen->id} note filter no 1
1340 walker_nav_menu_start_el filter no 1
1341 welcome_panel action no 1
1342 whitelist_options filter no 1
1343 widgets-php action no 3
1344 widgets_admin_page action no 1
1345 widgets_init action no 1
1346 widget_archives_args filter no 1
1347 widget_archives_dropdown_args filter no 1
1348 widget_categories_args filter no 1
1349 widget_categories_dropdown_args filter no 1
1350 widget_comments_args filter no 1
1351 widget_customizer_setting_args filter YES 1
1352 widget_display_callback filter no 1
1353 widget_form_callback filter no 1
1354 widget_links_args filter no 1
1355 widget_meta_poweredby filter no 1
1356 widget_pages_args filter no 1
1357 widget_posts_args filter no 1
1358 widget_tag_cloud_args filter no 1
1359 widget_text filter no 1
1360 widget_title filter no 13
1361 widget_update_callback filter no 1
1362 wp action no 1
1363 wp-mail-php action no 1
1364 wpmuadminedit action no 4
1365 wpmuadminresult action no 1
1366 wpmublogsaction action no 1
1367 wpmueditblogaction action no 1
1368 wpmu_activate_blog action no 1
1369 wpmu_activate_user action no 1
1370 wpmu_active_signup filter no 1
1371 wpmu_blogs_columns filter no 1
1372 wpmu_blog_updated action no 1
1373 wpmu_delete_blog_upload_dir filter no 1
1374 wpmu_delete_user action no 1
1375 wpmu_drop_tables filter no 1
1376 wpmu_new_blog action no 1
1377 wpmu_new_user action no 1
1378 wpmu_options action no 1
1379 wpmu_signup_blog_notification filter no 1
1380 wpmu_signup_blog_notification_email filter no 1
1381 wpmu_signup_blog_notification_subject filter no 1
1382 wpmu_signup_user_notification filter no 1
1383 wpmu_signup_user_notification_email filter no 1
1384 wpmu_signup_user_notification_subject filter no 1
1385 wpmu_update_blog_options action no 1
1386 wpmu_upgrade_page action no 1
1387 wpmu_upgrade_site action no 1
1388 wpmu_users_columns filter no 1
1389 wpmu_validate_blog_signup filter no 1
1390 wpmu_validate_user_signup filter no 1
1391 wpmu_welcome_notification filter no 1
1392 wpmu_welcome_user_notification filter no 1
1393 wp_admin_bar_class filter no 1
1394 wp_admin_css filter no 2
1395 wp_admin_css_uri filter no 1
1396 wp_after_admin_bar_render action no 1
1397 wp_ajax_nopriv_{$action} note action no 1
1398 wp_ajax_{$action} note action no 1
1399 wp_audio_embed_handler filter no 1
1400 wp_audio_extensions filter no 1
1401 wp_audio_shortcode filter no 1
1402 wp_audio_shortcode_class filter no 1
1403 wp_audio_shortcode_library filter no 1
1404 wp_audio_shortcode_override filter no 1
1405 wp_authenticate action no 1
1406 wp_authenticate_user filter no 1
1407 wp_auth_check_interval filter no 1
1408 wp_auth_check_load filter no 1
1409 wp_auth_check_same_domain filter no 1
1410 wp_before_admin_bar_render action no 1
1411 wp_blacklist_check action no 1
1412 wp_cache_themes_persistently filter no 2
1413 wp_checkdate filter no 1
1414 wp_check_filetype_and_ext filter no 1
1415 wp_check_post_lock_window filter no 2
1416 wp_comment_reply filter no 1
1417 wp_count_attachments filter no 1
1418 wp_count_comments filter no 1
1419 wp_count_posts filter no 1
1420 wp_create_file_in_uploads action no 2
1421 wp_create_file_in_uploads filter no 3
1422 wp_create_nav_menu action no 1
1423 wp_create_thumbnail filter no 1
1424 wp_dashboard_setup action no 1
1425 wp_dashboard_widgets filter no 1
1426 wp_default_editor filter no 1
1427 wp_default_scripts action no 1
1428 wp_default_styles action no 1
1429 wp_delete_file filter no 9
1430 wp_delete_nav_menu action no 1
1431 wp_delete_post_revision action no 1
1432 wp_die_ajax_handler filter no 1
1433 wp_die_handler filter no 1
1434 wp_die_xmlrpc_handler filter no 1
1435 wp_dropdown_cats filter no 1
1436 wp_dropdown_pages filter no 1
1437 wp_dropdown_users filter no 1
1438 wp_editor_set_quality filter no 1
1439 wp_edit_nav_menu_walker filter no 2
1440 wp_embed_handler_audio filter no 1
1441 wp_embed_handler_video filter no 1
1442 wp_enqueue_editor action YES 1
1443 wp_enqueue_media action no 1
1444 wp_enqueue_scripts action no 1
1445 wp_feed_cache_transient_lifetime filter no 2
1446 wp_feed_options action no 1
1447 wp_footer action no 1
1448 wp_fullscreen_buttons filter no 1
1449 wp_generate_attachment_metadata filter no 1
1450 wp_generate_tag_cloud filter no 1
1451 wp_generator_type filter no 1
1452 wp_get_attachment_id3_keys filter YES 1
1453 wp_get_attachment_image_attributes filter no 1
1454 wp_get_attachment_link filter no 1
1455 wp_get_attachment_metadata filter no 1
1456 wp_get_attachment_thumb_file filter no 1
1457 wp_get_attachment_thumb_url filter no 1
1458 wp_get_attachment_url filter no 1
1459 wp_get_current_commenter filter no 1
1460 wp_get_nav_menus filter no 1
1461 wp_get_nav_menu_items filter no 1
1462 wp_get_object_terms filter no 1
1463 wp_get_update_data filter no 1
1464 wp_handle_upload filter no 3
1465 wp_handle_upload_prefilter filter no 1
1466 wp_head action no 1
1467 wp_headers filter no 1
1468 wp_header_image_attachment_metadata filter YES 1
1469 wp_http_accept_encoding filter no 1
1470 wp_http_cookie_value filter no 1
1471 wp_image_editors filter no 1
1472 wp_image_editor_before_change filter no 1
1473 wp_insert_attachment_data filter YES 1
1474 wp_insert_comment action no 1
1475 wp_insert_post action no 2
1476 wp_insert_post_data filter no 1
1477 wp_insert_post_empty_content filter no 1
1478 wp_insert_post_parent filter no 1
1479 wp_install action YES 1
1480 wp_is_large_network filter no 2
1481 wp_kses_allowed_html filter no 6
1482 wp_link_pages filter no 1
1483 wp_link_pages_args filter no 1
1484 wp_link_pages_link filter no 3
1485 wp_link_query filter no 1
1486 wp_link_query_args filter no 1
1487 wp_list_bookmarks filter no 1
1488 wp_list_categories filter no 1
1489 wp_list_pages filter no 1
1490 wp_list_pages_excludes filter no 1
1491 wp_loaded action no 1
1492 wp_login action no 1
1493 wp_login_errors filter no 1
1494 wp_login_failed action no 1
1495 wp_logout action no 1
1496 wp_mail filter no 1
1497 wp_mail_charset filter no 1
1498 wp_mail_content_type filter no 1
1499 wp_mail_from filter no 1
1500 wp_mail_from_name filter no 1
1501 wp_mail_original_content filter no 1
1502 wp_maybe_auto_update action YES 1
1503 wp_mce_translation filter YES 1
1504 wp_mediaelement_fallback filter no 1
1505 wp_meta action no 1
1506 wp_mime_type_icon filter no 1
1507 wp_nav_locations_listed_per_menu filter no 1
1508 wp_nav_menu filter no 1
1509 wp_nav_menu_args filter no 1
1510 wp_nav_menu_container_allowedtags filter no 1
1511 wp_nav_menu_items filter no 1
1512 wp_nav_menu_objects filter no 1
1513 wp_nav_menu_{$menu->slug}_items note filter no 1
1514 wp_network_dashboard_setup action no 1
1515 wp_network_dashboard_widgets filter no 1
1516 wp_page_menu filter no 1
1517 wp_page_menu_args filter no 1
1518 wp_parse_str filter no 1
1519 wp_playlist_scripts action YES 1
1520 wp_prepare_attachment_for_js filter no 1
1521 wp_prepare_themes_for_js filter no 1
1522 wp_print_footer_scripts action no 1
1523 wp_print_scripts action no 3
1524 wp_print_styles action no 1
1525 wp_read_image_metadata filter no 1
1526 wp_read_image_metadata_types filter no 1
1527 wp_redirect filter no 1
1528 wp_redirect_status filter no 1
1529 wp_register_sidebar_widget action no 1
1530 wp_restore_post_revision action no 1
1531 wp_revisions_to_keep filter no 1
1532 wp_save_image_editor_file filter no 1
1533 wp_save_image_file filter no 1
1534 wp_save_post_revision_check_for_changes filter no 1
1535 wp_search_stopwords filter no 1
1536 wp_setup_nav_menu_item filter no 1
1537 wp_set_comment_status action no 2
1538 wp_signup_location filter no 3
1539 wp_sprintf filter no 1
1540 wp_sprintf_l filter no 1
1541 wp_tag_cloud filter no 1
1542 wp_terms_checklist_args filter no 1
1543 wp_tiny_mce_init action YES 1
1544 wp_title filter no 1
1545 wp_title_rss filter no 1
1546 wp_trash_post action no 1
1547 wp_trim_excerpt filter no 1
1548 wp_trim_words filter no 1
1549 wp_unique_post_slug filter no 1
1550 wp_unique_post_slug_is_bad_attachment_slug filter no 1
1551 wp_unique_post_slug_is_bad_flat_slug filter no 1
1552 wp_unique_post_slug_is_bad_hierarchical_slug filter no 1
1553 wp_unregister_sidebar_widget action no 1
1554 wp_update_attachment_metadata filter no 1
1555 wp_update_comment_count action no 1
1556 wp_update_nav_menu action no 2
1557 wp_update_nav_menu_item action no 1
1558 wp_update_term_parent filter no 1
1559 wp_upgrade action YES 1
1560 wp_upload_bits filter no 1
1561 wp_user_dashboard_setup action no 1
1562 wp_user_dashboard_widgets filter no 1
1563 wp_video_embed_handler filter no 1
1564 wp_video_extensions filter no 1
1565 wp_video_shortcode filter no 1
1566 wp_video_shortcode_class filter no 1
1567 wp_video_shortcode_library filter no 1
1568 wp_video_shortcode_override filter no 1
1569 wp_xmlrpc_server_class filter no 1
1570 wxr_export_skip_postmeta filter no 1
1571 xmlrpc_allow_anonymous_comments filter no 1
1572 xmlrpc_blog_options filter no 1
1573 xmlrpc_call action no 67
1574 xmlrpc_call_success_blogger_deletePost action no 1
1575 xmlrpc_call_success_blogger_editPost action no 1
1576 xmlrpc_call_success_blogger_newPost action no 1
1577 xmlrpc_call_success_mw_editPost action no 1
1578 xmlrpc_call_success_mw_newMediaObject action no 1
1579 xmlrpc_call_success_mw_newPost action no 1
1580 xmlrpc_call_success_wp_deleteCategory action no 1
1581 xmlrpc_call_success_wp_deleteComment action no 1
1582 xmlrpc_call_success_wp_deletePage action no 1
1583 xmlrpc_call_success_wp_editComment action no 1
1584 xmlrpc_call_success_wp_newCategory action no 1
1585 xmlrpc_call_success_wp_newComment action no 1
1586 xmlrpc_default_posttype_fields filter no 2
1587 xmlrpc_default_post_fields filter no 2
1588 xmlrpc_default_revision_fields filter no 1
1589 xmlrpc_default_taxonomy_fields filter no 2
1590 xmlrpc_default_user_fields filter no 3
1591 xmlrpc_enabled filter no 1
1592 xmlrpc_login_error filter no 1
1593 xmlrpc_methods filter no 1
1594 xmlrpc_pingback_error filter no 1
1595 xmlrpc_prepare_comment filter no 1
1596 xmlrpc_prepare_media_item filter no 1
1597 xmlrpc_prepare_page filter no 1
1598 xmlrpc_prepare_post filter no 1
1599 xmlrpc_prepare_post_type filter no 1
1600 xmlrpc_prepare_taxonomy filter no 1
1601 xmlrpc_prepare_term filter no 1
1602 xmlrpc_prepare_user filter no 1
1603 xmlrpc_publish_post action no 1
1604 xmlrpc_rsd_apis action no 1
1605 xmlrpc_text_filters filter no 1
1606 xmlrpc_wp_insert_post_data filter no 1
1607 year_link filter no 1
1608 _admin_menu action no 1
1609 _core_updated_successfully action no 1
1610 _get_page_link filter no 1
1611 _network_admin_menu action no 1
1612 _user_admin_menu action no 1
1613 _wp_post_revision_fields filter no 1
1614 _wp_post_revision_field_{$field} note filter no 2
1615 _wp_put_post_revision action no 1
1616 _wp_relative_upload_path filter no 1
1617 {$action} note action no 1
1618 {$adjacent}_image_link note filter no 1
1619 {$adjacent}_post_link note filter no 1
1620 {$adjacent}_post_rel_link note filter no 1
1621 {$boundary}_post_rel_link note filter no 1
1622 {$field_no_prefix}_edit_pre note filter no 1
1623 {$field_no_prefix}_save_pre note filter no 1
1624 {$field} note filter no 3
1625 {$field}_pre note filter no 1
1626 {$hook} note action no 2
1627 {$new_status}_{$post->post_type} note action no 1
1628 {$old_status}_to_{$new_status} note action no 1
1629 {$option} note filter no 2
1630 {$page_hook} note action no 1
1631 {$permastructname}_rewrite_rules note filter no 1
1632 {$per_page} note filter no 1
1633 {$prefix}plugin_action_links note filter no 1
1634 {$prefix}plugin_action_links_{$plugin_file} note filter no 1
1635 {$tag} note action no 2
1636 {$tag} note filter no 2
1637 {$taxonomy}_add_form note action no 1
1638 {$taxonomy}_add_form_fields note action no 1
1639 {$taxonomy}_edit_form note action no 1
1640 {$taxonomy}_edit_form_fields note action no 1
1641 {$taxonomy}_pre_add_form note action no 1
1642 {$taxonomy}_pre_edit_form note action no 1
1643 {$taxonomy}_row_actions note filter no 1
1644 {$taxonomy}_term_edit_form_tag note action no 1
1645 {$taxonomy}_term_new_form_tag note action no 1
1646 {$taxonomy}_{$field} note filter no 1
1647 {$taxonomy}_{$field}_rss note filter no 1
1648 {$type}_send_to_editor_url note filter no 2
1649 {$type}_template note filter no 1
1650 {$type}_upload_iframe_src note filter no 1
Important warning about variable hooks
Some hooks have variables in their names. For example, pre_${taxonomy}_$field and admin_head- both have variable names. In general, any hook that ends (or begins) with – or _, or contains a $, has a variable name. Since the syntax with which these variables are defined may change from version to version, this page may think that a hook is deprecated (or new) even if it is not. You can usually catch this sort of thing by comparing this hook to the list of "related hooks" below.
You are viewing the regular version of this page. Switch to mobile version.
Hi. My name is Adam Brown. How to contact me. I am on the BYU political science faculty. My PhD is from the University of California, San Diego (UCSD). All content and code ©2005-2014 by Adam R Brown unless noted. Do not republish any material from this site anywhere else without permission. Featuring glorious hand-coded PHP and valid XHTML/CSS. This page last updated October 8th, 2013.
You're browsing the WordPress hooks database, which contains information about action hooks and filter hooks in WordPress's code. The hooks in WordPress make it the most flexible blogging software available. Plugin authors and theme developers rely on WordPress hooks to interact with the blog platform's PHP code. More information about this database is at WordPress Hooks Database (home). You may also be interested in my easy PHP tutorial for WordPress users. Note that my website is not a WordPress support forum, though; you should ask you WP questions over at the WordPress support forums.
<end node> 5P9i0s8y19Z
dt=
<node>SESSIONS
2
Though this would work, it is not the most efficient way to start a session in WordPress. WordPress provides an Actions Api that we are able to attach custom functions to. That is the method we will be using in this example. We are going to add all the following code to the very top of our themes functions.php file.
1: We will use the init action provided by WordPress to handle starting a PHP session. First, we add the action that will call a function called start_session like this when WordPress first initiates.
add_action('init', 'start_session', 1);
2: Second we will create the start_session function. Notice the function is first checking to see if a session is already active before setting a new one using a function called session_id.
function start_session() {
if(!session_id()) {
session_start();
}
}
Ending A PHP Session
PHP provides a built-in function called session_destroy, that will handle clearing out all session data. However, when to call this function can be tricky to handle depending on the application. WordPress also provides a few ways for us to do just that in the Actions Api.
1: In WordPress we are going to need to clear out the session once a user has logged out or a new user has logged into the website. We will use two provided actions, wp_logout and wp_login, to call a function we will create called end_session();
add_action(‘wp_logout’, ‘end_session’);
add_action(‘wp_login’, ‘end_session’);
2: Second we will create the end_session function like this:
function end_session() {
session_destroy ();
}
Forcing A Session To End
We can use a custom hook to end a session anywhere within the theme by using the do_action function provided by WordPress to call the end_session function we created above.
1: In the functions.php file we would add the following.
add_action('end_session_action', 'end_session');
2: Add the following anywhere in the application you want to end the session.
do_action('end_session_action');
If done correctly your functions.php file should now look like this at the top.
add_action('init', 'start_session', 1);
function start_session() {
if(!session_id()) {
session_start();
}
add_action(‘wp_logout’, ‘end_session’);
add_action(‘wp_login’, ‘end_session’);
add_action(‘end_session_action’, ‘end_session’);
function end_session() {
session_destroy ();
}
You can now add data to the global $_SESSION variable that will be accessible at any point within the application during a user session by accessing the $_SESSION variable. The variable is an array; below is an example of adding data to the session array.
$foo = ‘Foo Data’;
$_SESSION[‘foo’] = $foo;
Something to think about:
If you are building a scalable or load balanced website, you may not want to use sessions. HTTP is Stateless and PHP SESSIONS are State driven. Sessions are stored and handled by the server. Routing each session to the proper server requires more complex configuration and creates a single point of failure for the users who’s sessions are stored on that server. When possible, it is best to store session information in the client’s browser. Though it may not be extremely expensive to the server resources to query session objects, it is always wise to reduce overhead whenever possible.
Thank you for reading. I hope you find this article helpful and please comment below with any questions. Happy coding! ??
<end node> 5P9i0s8y19Z
dt=
<node>html5
1
<input required min='' max='' placeholder='' >
<input type="number" min="0" max="100" step="5">
accept audio/*
video/*
image/*
MIME_type Specifies the types of files that the server accepts (only for type="file")
align left
right
top
middle
bottom Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of an image input (only for type="image")
alt text Specifies an alternate text for images (only for type="image")
autocompleteNew on
off Specifies whether an <input> element should have autocomplete enabled
autofocusNew autofocus Specifies that an <input> element should automatically get focus when the page loads
checked checked Specifies that an <input> element should be pre-selected when the page loads (for type="checkbox" or type="radio")
disabled disabled Specifies that an <input> element should be disabled
formNew form_id Specifies one or more forms the <input> element belongs to
formactionNew URL Specifies the URL of the file that will process the input control when the form is submitted (for type="submit" and type="image")
formenctypeNew application/x-www-form-urlencoded
multipart/form-data
text/plain Specifies how the form-data should be encoded when submitting it to the server (for type="submit" and type="image")
formmethodNew get
post Defines the HTTP method for sending data to the action URL (for type="submit" and type="image")
formnovalidateNew formnovalidate Defines that form elements should not be validated when submitted
formtargetNew _blank
_self
_parent
_top
framename Specifies where to display the response that is received after submitting the form (for type="submit" and type="image")
heightNew pixels Specifies the height of an <input> element (only for type="image")
listNew datalist_id Refers to a <datalist> element that contains pre-defined options for an <input> element
max New number
date Specifies the maximum value for an <input> element
maxlength number Specifies the maximum number of characters allowed in an <input> element
min New number
date Specifies a minimum value for an <input> element
multiple New multiple Specifies that a user can enter more than one value in an <input> element
name text Specifies the name of an <input> element
patternNew regexp Specifies a regular expression that an <input> element's value is checked against
placeholder New text Specifies a short hint that describes the expected value of an <input> element
readonly readonly Specifies that an input field is read-only
required New required Specifies that an input field must be filled out before submitting the form
size number Specifies the width, in characters, of an <input> element
src URL Specifies the URL of the image to use as a submit button (only for type="image")
stepNew number Specifies the legal number intervals for an input field
HTML5 Input Types
checkbox
color
date
datetime
datetime-local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week Specifies the type <input> element to display
value text Specifies the value of an <input> element
width New pixels Specifies the width of an <input> element (only for type="image")
<end node> 5P9i0s8y19Z
dt=
<node>reserved words
1
List of reserved names in $_POST and $_REQUEST used by WordPress 3.5
_ajax_nonce
_page
_per_page
_signup_form
_total
_url
_wp_http_referer
_wp_original_http_referer
_wp_unfiltered_html_comment
_wpnonce
_wpnonce-custom-header-upload
aa
action
action2
active_post_lock
add_new
add_new_users
addmeta
admin_bar_front
admin_color
admin_email
admin_password
admin_password2
ajax
align
allblogs
allusers
alt
approve_parent
approved
attachment
attachment_id
attachments
auth_cookie
author
author_name
autocomplete_type
auto_draft
auto-add-pages
autosave
background-attachment
background-color
background-position-x
background-repeat
banned_email_domains
blog
blog_name
blog_public
blog_upload_space
blogname
bulk_edit
c
calendar
cat
category_base
category_name
catslist
changeit
changes
charset
checkbox
checked
clear-recent-list
closed
comment
comment_approved
comment_author
comment_author_email
comment_author_url
comment_content
comment_date
comment_ID
comment_parent
comment_post_ID
comment_shortcuts
comment_status
comments_listing
comments_popup
confirmdelete
connection_type
content
context
cpage
create-new-attachment
createuser
customize_messenger_channel
customized
customlink-tab
date
date_format
date_format_custom
day
default-header
delete
delete_all
delete_all2
delete_comments
delete_option
delete_tags
delete_widget
deletebookmarks
deletecomment
deleted
deletemeta
deletepost
description
detached
dismiss
display_name
do
edit_date
email
error
exact
excerpt
features
feed
fetch
fheight
file
fileupload_maxk
filter
find_detached
first_comment
first_comment_author
first_comment_url
first_name
first_page
first_post
found_post_id
fwidth
global_terms_enabled
GLOBALS
gmt_offset
guid
height
hh
hidden
hidden_aa
hidden_jj
hidden_mm
hidden_mn
hidden_hh
history
hostname
hour
html-upload
id
ID
ids
id_base
illegal_names
insert-gallery
insertonlybutton
interim-login
item-object
item-type
jj
json
json_data
key
last_name
limited_email_domains
link_id
link_image
link_name
link_rss
link_url
link_visible
linkcheck
locale
locked
log
logged_in_cookie
m
media
media_type
menu
menu_items
menu-item
menu-item-attr-title
menu-item-classes
menu-item-db-id
menu-item-description
menu-item-object
menu-item-object-id
menu-item-parent-id
menu-item-position
menu-item-target
menu-item-title
menu-item-type
menu-item-url
menu-item-xfn
menu-locations
menu-name
message
meta
metakeyinput
metakeyselect
metavalue
minute
mm
mn
mode
monthnum
more
move
multi_number
name
nav-menu-locations
new
new_role
new_slug
new_title
newcat
newcomment_author
newcomment_author_email
newcomment_author_url
newcontent
newuser
nickname
no_placeholder
noapi
noconfirmation
noredir
number
offset
oitar
option
option_page
order
orderby
p
pb
page
page_columns
page_id
page_options
paged
pagegen_timestamp
pagename
parent_id
pass1
pass2
password
permalink_structure
photo_description
photo_src
phperror
ping_status
plugin
plugin_status
pointer
position
post
post_category
post_data
post_format
post_ID
post_id
post_mime_type
post_password
post_status
post_title
post_type
post_view
postid
posts
preview
primary_blog
private_key
ps
public_key
publish
pwd
query
reassign_user
reauth
redirect
redirect_to
ref
referredby
registration
registrationnotification
rememberme
remove-background
removeheader
removewidget
reset-background
resetheader
review
rich_editing
robots
role
s
same
save
savewidget
savewidgets
screen
scrollto
search
second
section
selectall
selection
send
send_password
sentence
short
show_sticky
sidebar
sidebars
signup_for
signup_form_id
site_id
site_name
sitename
size
skip-cropping
spam
spammed
src
ss
stage
start
static
status
sticky
subdomain_install
submit
subpost
subpost_id
super_admin
tab
tag
tag_ID
tag-name
tag_base
tags_input
tax
tax_input
tag-name
target
taxonomy
tb
term
text-color
the-widget-id
theme
theme_status
thumb
timezone_string
time_format
time_format_custom
title
thumbnail_id
trash
trashed
type
undismiss
unspam
unspammed
untrash
untrashed
url
update_home_url
updated
upgrade
upload_filetypes
upload_space_check_disabled
use_ssl
user
user_id
user_login
user_name
username
users
verify-delete
version
visibility
visible
w
weblog_title
welcome_email
welcome_user_email
widget_id
widget_number
widget-id
widget-recent-comments
widget-rss
width
withcomments
withoutcomments
wp_customize
wp_http_referer
wp_screen_options
wp-preview
WPLANG
x1
y1
year
<end node> 5P9i0s8y19Z
dt=
<node>Settings
1
wp_options in the database table
<end node> 5P9i0s8y19Z
dt=
<node>Upgrades
1
http://codex.wordpress.org/Files_Automatically_Replaced_by_Core_Upgrade
When using the core upgrade function, introduced with Version 2.7, some old files, which are no longer included with the latest release, will be deleted. The list of files to be deleted is in the wp-admin/includes/update-core.php file.
In addition to the files to be deleted, all other core files are replaced with the newer versions. If you have made modifications to any core files, including the WordPress Default theme files, you'll need to insure they are backed up before attempting the core upgrade. After the upgrade, you'll have to retrofit the modifications to the new core files again. Simply re-using the old modified files is NOT recommended.
Files Set For Deletion
$_old_files = array(
// 2.0
'wp-admin/import-b2.php',
'wp-admin/import-blogger.php',
'wp-admin/import-greymatter.php',
'wp-admin/import-livejournal.php',
'wp-admin/import-mt.php',
'wp-admin/import-rss.php',
'wp-admin/import-textpattern.php',
'wp-admin/quicktags.js',
'wp-images/fade-butt.png',
'wp-images/get-firefox.png',
'wp-images/header-shadow.png',
'wp-images/smilies',
'wp-images/wp-small.png',
'wp-images/wpminilogo.png',
'wp.php',
// 2.0.8
'wp-includes/js/tinymce/plugins/inlinepopups/readme.txt',
// 2.1
'wp-admin/edit-form-ajax-cat.php',
'wp-admin/execute-pings.php',
'wp-admin/inline-uploading.php',
'wp-admin/link-categories.php',
'wp-admin/list-manipulation.js',
'wp-admin/list-manipulation.php',
'wp-includes/comment-functions.php',
'wp-includes/feed-functions.php',
'wp-includes/functions-compat.php',
'wp-includes/functions-formatting.php',
'wp-includes/functions-post.php',
'wp-includes/js/dbx-key.js',
'wp-includes/js/tinymce/plugins/autosave/langs/cs.js',
'wp-includes/js/tinymce/plugins/autosave/langs/sv.js',
'wp-includes/links.php',
'wp-includes/pluggable-functions.php',
'wp-includes/template-functions-author.php',
'wp-includes/template-functions-category.php',
'wp-includes/template-functions-general.php',
'wp-includes/template-functions-links.php',
'wp-includes/template-functions-post.php',
'wp-includes/wp-l10n.php',
// 2.2
'wp-admin/cat-js.php',
'wp-admin/import/b2.php',
'wp-includes/js/autosave-js.php',
'wp-includes/js/list-manipulation-js.php',
'wp-includes/js/wp-ajax-js.php',
// 2.3
'wp-admin/admin-db.php',
'wp-admin/cat.js',
'wp-admin/categories.js',
'wp-admin/custom-fields.js',
'wp-admin/dbx-admin-key.js',
'wp-admin/edit-comments.js',
'wp-admin/install-rtl.css',
'wp-admin/install.css',
'wp-admin/upgrade-schema.php',
'wp-admin/upload-functions.php',
'wp-admin/upload-rtl.css',
'wp-admin/upload.css',
'wp-admin/upload.js',
'wp-admin/users.js',
'wp-admin/widgets-rtl.css',
'wp-admin/widgets.css',
'wp-admin/xfn.js',
'wp-includes/js/tinymce/license.html',
// 2.5
'wp-admin/css/upload.css',
'wp-admin/images/box-bg-left.gif',
'wp-admin/images/box-bg-right.gif',
'wp-admin/images/box-bg.gif',
'wp-admin/images/box-butt-left.gif',
'wp-admin/images/box-butt-right.gif',
'wp-admin/images/box-butt.gif',
'wp-admin/images/box-head-left.gif',
'wp-admin/images/box-head-right.gif',
'wp-admin/images/box-head.gif',
'wp-admin/images/heading-bg.gif',
'wp-admin/images/login-bkg-bottom.gif',
'wp-admin/images/login-bkg-tile.gif',
'wp-admin/images/notice.gif',
'wp-admin/images/toggle.gif',
'wp-admin/includes/upload.php',
'wp-admin/js/dbx-admin-key.js',
'wp-admin/js/link-cat.js',
'wp-admin/profile-update.php',
'wp-admin/templates.php',
'wp-includes/images/wlw/WpComments.png',
'wp-includes/images/wlw/WpIcon.png',
'wp-includes/images/wlw/WpWatermark.png',
'wp-includes/js/dbx.js',
'wp-includes/js/fat.js',
'wp-includes/js/list-manipulation.js',
'wp-includes/js/tinymce/langs/en.js',
'wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/autosave/langs',
'wp-includes/js/tinymce/plugins/directionality/images',
'wp-includes/js/tinymce/plugins/directionality/langs',
'wp-includes/js/tinymce/plugins/inlinepopups/css',
'wp-includes/js/tinymce/plugins/inlinepopups/images',
'wp-includes/js/tinymce/plugins/inlinepopups/jscripts',
'wp-includes/js/tinymce/plugins/paste/images',
'wp-includes/js/tinymce/plugins/paste/jscripts',
'wp-includes/js/tinymce/plugins/paste/langs',
'wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php',
'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php',
'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php',
'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php',
'wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css',
'wp-includes/js/tinymce/plugins/spellchecker/images',
'wp-includes/js/tinymce/plugins/spellchecker/langs',
'wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php',
'wp-includes/js/tinymce/plugins/wordpress/images',
'wp-includes/js/tinymce/plugins/wordpress/langs',
'wp-includes/js/tinymce/plugins/wordpress/wordpress.css',
'wp-includes/js/tinymce/plugins/wphelp',
'wp-includes/js/tinymce/themes/advanced/css',
'wp-includes/js/tinymce/themes/advanced/images',
'wp-includes/js/tinymce/themes/advanced/jscripts',
'wp-includes/js/tinymce/themes/advanced/langs',
// 2.5.1
'wp-includes/js/tinymce/tiny_mce_gzip.php',
// 2.6
'wp-admin/bookmarklet.php',
'wp-includes/js/jquery/jquery.dimensions.min.js',
'wp-includes/js/tinymce/plugins/wordpress/popups.css',
'wp-includes/js/wp-ajax.js',
// 2.7
'wp-admin/css/press-this-ie-rtl.css',
'wp-admin/css/press-this-ie.css',
'wp-admin/css/upload-rtl.css',
'wp-admin/edit-form.php',
'wp-admin/images/comment-pill.gif',
'wp-admin/images/comment-stalk-classic.gif',
'wp-admin/images/comment-stalk-fresh.gif',
'wp-admin/images/comment-stalk-rtl.gif',
'wp-admin/images/del.png',
'wp-admin/images/gear.png',
'wp-admin/images/media-button-gallery.gif',
'wp-admin/images/media-buttons.gif',
'wp-admin/images/postbox-bg.gif',
'wp-admin/images/tab.png',
'wp-admin/images/tail.gif',
'wp-admin/js/forms.js',
'wp-admin/js/upload.js',
'wp-admin/link-import.php',
'wp-includes/images/audio.png',
'wp-includes/images/css.png',
'wp-includes/images/default.png',
'wp-includes/images/doc.png',
'wp-includes/images/exe.png',
'wp-includes/images/html.png',
'wp-includes/images/js.png',
'wp-includes/images/pdf.png',
'wp-includes/images/swf.png',
'wp-includes/images/tar.png',
'wp-includes/images/text.png',
'wp-includes/images/video.png',
'wp-includes/images/zip.png',
'wp-includes/js/tinymce/tiny_mce_config.php',
'wp-includes/js/tinymce/tiny_mce_ext.js',
// 2.8
'wp-admin/js/users.js',
'wp-includes/js/swfupload/plugins/swfupload.documentready.js',
'wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js',
'wp-includes/js/swfupload/swfupload_f9.swf',
'wp-includes/js/tinymce/plugins/autosave',
'wp-includes/js/tinymce/plugins/paste/css',
'wp-includes/js/tinymce/utils/mclayer.js',
'wp-includes/js/tinymce/wordpress.css',
// 2.8.5
'wp-admin/import/btt.php',
'wp-admin/import/jkw.php',
// 2.9
'wp-admin/js/page.dev.js',
'wp-admin/js/page.js',
'wp-admin/js/set-post-thumbnail-handler.dev.js',
'wp-admin/js/set-post-thumbnail-handler.js',
'wp-admin/js/slug.dev.js',
'wp-admin/js/slug.js',
'wp-includes/gettext.php',
'wp-includes/js/tinymce/plugins/wordpress/js',
'wp-includes/streams.php',
// MU
'README.txt',
'htaccess.dist',
'index-install.php',
'wp-admin/css/mu-rtl.css',
'wp-admin/css/mu.css',
'wp-admin/images/site-admin.png',
'wp-admin/includes/mu.php',
'wp-admin/wpmu-admin.php',
'wp-admin/wpmu-blogs.php',
'wp-admin/wpmu-edit.php',
'wp-admin/wpmu-options.php',
'wp-admin/wpmu-themes.php',
'wp-admin/wpmu-upgrade-site.php',
'wp-admin/wpmu-users.php',
'wp-includes/images/wordpress-mu.png',
'wp-includes/wpmu-default-filters.php',
'wp-includes/wpmu-functions.php',
'wpmu-settings.php',
// 3.0
'wp-admin/categories.php',
'wp-admin/edit-category-form.php',
'wp-admin/edit-page-form.php',
'wp-admin/edit-pages.php',
'wp-admin/images/admin-header-footer.png',
'wp-admin/images/browse-happy.gif',
'wp-admin/images/ico-add.png',
'wp-admin/images/ico-close.png',
'wp-admin/images/ico-edit.png',
'wp-admin/images/ico-viewpage.png',
'wp-admin/images/fav-top.png',
'wp-admin/images/screen-options-left.gif',
'wp-admin/images/wp-logo-vs.gif',
'wp-admin/images/wp-logo.gif',
'wp-admin/import',
'wp-admin/js/wp-gears.dev.js',
'wp-admin/js/wp-gears.js',
'wp-admin/options-misc.php',
'wp-admin/page-new.php',
'wp-admin/page.php',
'wp-admin/rtl.css',
'wp-admin/rtl.dev.css',
'wp-admin/update-links.php',
'wp-admin/wp-admin.css',
'wp-admin/wp-admin.dev.css',
'wp-includes/js/codepress',
'wp-includes/js/codepress/engines/khtml.js',
'wp-includes/js/codepress/engines/older.js',
'wp-includes/js/jquery/autocomplete.dev.js',
'wp-includes/js/jquery/autocomplete.js',
'wp-includes/js/jquery/interface.js',
'wp-includes/js/scriptaculous/prototype.js',
'wp-includes/js/tinymce/wp-tinymce.js',
// 3.1
'wp-admin/edit-attachment-rows.php',
'wp-admin/edit-link-categories.php',
'wp-admin/edit-link-category-form.php',
'wp-admin/edit-post-rows.php',
'wp-admin/images/button-grad-active-vs.png',
'wp-admin/images/button-grad-vs.png',
'wp-admin/images/fav-arrow-vs-rtl.gif',
'wp-admin/images/fav-arrow-vs.gif',
'wp-admin/images/fav-top-vs.gif',
'wp-admin/images/list-vs.png',
'wp-admin/images/screen-options-right-up.gif',
'wp-admin/images/screen-options-right.gif',
'wp-admin/images/visit-site-button-grad-vs.gif',
'wp-admin/images/visit-site-button-grad.gif',
'wp-admin/link-category.php',
'wp-admin/sidebar.php',
'wp-includes/classes.php',
'wp-includes/js/tinymce/blank.htm',
'wp-includes/js/tinymce/plugins/media/css/content.css',
'wp-includes/js/tinymce/plugins/media/img',
'wp-includes/js/tinymce/plugins/safari',
// 3.2
'wp-admin/images/logo-login.gif',
'wp-admin/images/star.gif',
'wp-admin/js/list-table.dev.js',
'wp-admin/js/list-table.js',
'wp-includes/default-embeds.php',
'wp-includes/js/tinymce/plugins/wordpress/img/help.gif',
'wp-includes/js/tinymce/plugins/wordpress/img/more.gif',
'wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif',
'wp-includes/js/tinymce/themes/advanced/img/fm.gif',
'wp-includes/js/tinymce/themes/advanced/img/sflogo.png',
// 3.3
'wp-admin/css/colors-classic-rtl.css',
'wp-admin/css/colors-classic-rtl.dev.css',
'wp-admin/css/colors-fresh-rtl.css',
'wp-admin/css/colors-fresh-rtl.dev.css',
'wp-admin/css/dashboard-rtl.dev.css',
'wp-admin/css/dashboard.dev.css',
'wp-admin/css/global-rtl.css',
'wp-admin/css/global-rtl.dev.css',
'wp-admin/css/global.css',
'wp-admin/css/global.dev.css',
'wp-admin/css/install-rtl.dev.css',
'wp-admin/css/login-rtl.dev.css',
'wp-admin/css/login.dev.css',
'wp-admin/css/ms.css',
'wp-admin/css/ms.dev.css',
'wp-admin/css/nav-menu-rtl.css',
'wp-admin/css/nav-menu-rtl.dev.css',
'wp-admin/css/nav-menu.css',
'wp-admin/css/nav-menu.dev.css',
'wp-admin/css/plugin-install-rtl.css',
'wp-admin/css/plugin-install-rtl.dev.css',
'wp-admin/css/plugin-install.css',
'wp-admin/css/plugin-install.dev.css',
'wp-admin/css/press-this-rtl.dev.css',
'wp-admin/css/press-this.dev.css',
'wp-admin/css/theme-editor-rtl.css',
'wp-admin/css/theme-editor-rtl.dev.css',
'wp-admin/css/theme-editor.css',
'wp-admin/css/theme-editor.dev.css',
'wp-admin/css/theme-install-rtl.css',
'wp-admin/css/theme-install-rtl.dev.css',
'wp-admin/css/theme-install.css',
'wp-admin/css/theme-install.dev.css',
'wp-admin/css/widgets-rtl.dev.css',
'wp-admin/css/widgets.dev.css',
'wp-admin/includes/internal-linking.php',
'wp-includes/images/admin-bar-sprite-rtl.png',
'wp-includes/js/jquery/ui.button.js',
'wp-includes/js/jquery/ui.core.js',
'wp-includes/js/jquery/ui.dialog.js',
'wp-includes/js/jquery/ui.draggable.js',
'wp-includes/js/jquery/ui.droppable.js',
'wp-includes/js/jquery/ui.mouse.js',
'wp-includes/js/jquery/ui.position.js',
'wp-includes/js/jquery/ui.resizable.js',
'wp-includes/js/jquery/ui.selectable.js',
'wp-includes/js/jquery/ui.sortable.js',
'wp-includes/js/jquery/ui.tabs.js',
'wp-includes/js/jquery/ui.widget.js',
'wp-includes/js/l10n.dev.js',
'wp-includes/js/l10n.js',
'wp-includes/js/tinymce/plugins/wplink/css',
'wp-includes/js/tinymce/plugins/wplink/img',
'wp-includes/js/tinymce/plugins/wplink/js',
'wp-includes/js/tinymce/themes/advanced/img/wpicons.png',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif',
// Don't delete, yet: 'wp-rss.php',
// Don't delete, yet: 'wp-rdf.php',
// Don't delete, yet: 'wp-rss2.php',
// Don't delete, yet: 'wp-commentsrss2.php',
// Don't delete, yet: 'wp-atom.php',
// Don't delete, yet: 'wp-feed.php',
// 3.4
'wp-admin/images/gray-star.png',
'wp-admin/images/logo-login.png',
'wp-admin/images/star.png',
'wp-admin/index-extra.php',
'wp-admin/network/index-extra.php',
'wp-admin/user/index-extra.php',
'wp-admin/images/screenshots/admin-flyouts.png',
'wp-admin/images/screenshots/coediting.png',
'wp-admin/images/screenshots/drag-and-drop.png',
'wp-admin/images/screenshots/help-screen.png',
'wp-admin/images/screenshots/media-icon.png',
'wp-admin/images/screenshots/new-feature-pointer.png',
'wp-admin/images/screenshots/welcome-screen.png',
'wp-includes/css/editor-buttons.css',
'wp-includes/css/editor-buttons.dev.css',
'wp-includes/js/tinymce/plugins/paste/blank.htm',
'wp-includes/js/tinymce/plugins/wordpress/css',
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js',
'wp-includes/js/tinymce/plugins/wordpress/img/embedded.png',
'wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif',
'wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif',
'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js',
'wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css',
'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js',
'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js',
'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js',
'wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png',
'wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js',
// Don't delete, yet: 'wp-pass.php',
// Don't delete, yet: 'wp-register.php',
// 3.5
'wp-admin/gears-manifest.php',
'wp-admin/includes/manifest.php',
'wp-admin/images/archive-link.png',
'wp-admin/images/blue-grad.png',
'wp-admin/images/button-grad-active.png',
'wp-admin/images/button-grad.png',
'wp-admin/images/ed-bg-vs.gif',
'wp-admin/images/ed-bg.gif',
'wp-admin/images/fade-butt.png',
'wp-admin/images/fav-arrow-rtl.gif',
'wp-admin/images/fav-arrow.gif',
'wp-admin/images/fav-vs.png',
'wp-admin/images/fav.png',
'wp-admin/images/gray-grad.png',
'wp-admin/images/loading-publish.gif',
'wp-admin/images/logo-ghost.png',
'wp-admin/images/logo.gif',
'wp-admin/images/menu-arrow-frame-rtl.png',
'wp-admin/images/menu-arrow-frame.png',
'wp-admin/images/menu-arrows.gif',
'wp-admin/images/menu-bits-rtl-vs.gif',
'wp-admin/images/menu-bits-rtl.gif',
'wp-admin/images/menu-bits-vs.gif',
'wp-admin/images/menu-bits.gif',
'wp-admin/images/menu-dark-rtl-vs.gif',
'wp-admin/images/menu-dark-rtl.gif',
'wp-admin/images/menu-dark-vs.gif',
'wp-admin/images/menu-dark.gif',
'wp-admin/images/required.gif',
'wp-admin/images/screen-options-toggle-vs.gif',
'wp-admin/images/screen-options-toggle.gif',
'wp-admin/images/toggle-arrow-rtl.gif',
'wp-admin/images/toggle-arrow.gif',
'wp-admin/images/upload-classic.png',
'wp-admin/images/upload-fresh.png',
'wp-admin/images/white-grad-active.png',
'wp-admin/images/white-grad.png',
'wp-admin/images/widgets-arrow-vs.gif',
'wp-admin/images/widgets-arrow.gif',
'wp-admin/images/wpspin_dark.gif',
'wp-includes/images/upload.png',
'wp-includes/js/prototype.js',
'wp-includes/js/scriptaculous',
'wp-admin/css/wp-admin-rtl.dev.css',
'wp-admin/css/wp-admin.dev.css',
'wp-admin/css/media-rtl.dev.css',
'wp-admin/css/media.dev.css',
'wp-admin/css/colors-classic.dev.css',
'wp-admin/css/customize-controls-rtl.dev.css',
'wp-admin/css/customize-controls.dev.css',
'wp-admin/css/ie-rtl.dev.css',
'wp-admin/css/ie.dev.css',
'wp-admin/css/install.dev.css',
'wp-admin/css/colors-fresh.dev.css',
'wp-includes/js/customize-base.dev.js',
'wp-includes/js/json2.dev.js',
'wp-includes/js/comment-reply.dev.js',
'wp-includes/js/customize-preview.dev.js',
'wp-includes/js/wplink.dev.js',
'wp-includes/js/tw-sack.dev.js',
'wp-includes/js/wp-list-revisions.dev.js',
'wp-includes/js/autosave.dev.js',
'wp-includes/js/admin-bar.dev.js',
'wp-includes/js/quicktags.dev.js',
'wp-includes/js/wp-ajax-response.dev.js',
'wp-includes/js/wp-pointer.dev.js',
'wp-includes/js/hoverIntent.dev.js',
'wp-includes/js/colorpicker.dev.js',
'wp-includes/js/wp-lists.dev.js',
'wp-includes/js/customize-loader.dev.js',
'wp-includes/js/jquery/jquery.table-hotkeys.dev.js',
'wp-includes/js/jquery/jquery.color.dev.js',
'wp-includes/js/jquery/jquery.color.js',
'wp-includes/js/jquery/jquery.hotkeys.dev.js',
'wp-includes/js/jquery/jquery.form.dev.js',
'wp-includes/js/jquery/suggest.dev.js',
'wp-admin/js/xfn.dev.js',
'wp-admin/js/set-post-thumbnail.dev.js',
'wp-admin/js/comment.dev.js',
'wp-admin/js/theme.dev.js',
'wp-admin/js/cat.dev.js',
'wp-admin/js/password-strength-meter.dev.js',
'wp-admin/js/user-profile.dev.js',
'wp-admin/js/theme-preview.dev.js',
'wp-admin/js/post.dev.js',
'wp-admin/js/media-upload.dev.js',
'wp-admin/js/word-count.dev.js',
'wp-admin/js/plugin-install.dev.js',
'wp-admin/js/edit-comments.dev.js',
'wp-admin/js/media-gallery.dev.js',
'wp-admin/js/custom-fields.dev.js',
'wp-admin/js/custom-background.dev.js',
'wp-admin/js/common.dev.js',
'wp-admin/js/inline-edit-tax.dev.js',
'wp-admin/js/gallery.dev.js',
'wp-admin/js/utils.dev.js',
'wp-admin/js/widgets.dev.js',
'wp-admin/js/wp-fullscreen.dev.js',
'wp-admin/js/nav-menu.dev.js',
'wp-admin/js/dashboard.dev.js',
'wp-admin/js/link.dev.js',
'wp-admin/js/user-suggest.dev.js',
'wp-admin/js/postbox.dev.js',
'wp-admin/js/tags.dev.js',
'wp-admin/js/image-edit.dev.js',
'wp-admin/js/media.dev.js',
'wp-admin/js/customize-controls.dev.js',
'wp-admin/js/inline-edit-post.dev.js',
'wp-admin/js/categories.dev.js',
'wp-admin/js/editor.dev.js',
'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js',
'wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js',
'wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.dev.js',
'wp-includes/js/plupload/handlers.dev.js',
'wp-includes/js/plupload/wp-plupload.dev.js',
'wp-includes/js/swfupload/handlers.dev.js',
'wp-includes/js/jcrop/jquery.Jcrop.dev.js',
'wp-includes/js/jcrop/jquery.Jcrop.js',
'wp-includes/js/jcrop/jquery.Jcrop.css',
'wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js',
'wp-includes/css/wp-pointer.dev.css',
'wp-includes/css/editor.dev.css',
'wp-includes/css/jquery-ui-dialog.dev.css',
'wp-includes/css/admin-bar-rtl.dev.css',
'wp-includes/css/admin-bar.dev.css',
'wp-includes/js/jquery/ui/jquery.effects.clip.min.js',
'wp-includes/js/jquery/ui/jquery.effects.scale.min.js',
'wp-includes/js/jquery/ui/jquery.effects.blind.min.js',
'wp-includes/js/jquery/ui/jquery.effects.core.min.js',
'wp-includes/js/jquery/ui/jquery.effects.shake.min.js',
'wp-includes/js/jquery/ui/jquery.effects.fade.min.js',
'wp-includes/js/jquery/ui/jquery.effects.explode.min.js',
'wp-includes/js/jquery/ui/jquery.effects.slide.min.js',
'wp-includes/js/jquery/ui/jquery.effects.drop.min.js',
'wp-includes/js/jquery/ui/jquery.effects.highlight.min.js',
'wp-includes/js/jquery/ui/jquery.effects.bounce.min.js',
'wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js',
'wp-includes/js/jquery/ui/jquery.effects.transfer.min.js',
'wp-includes/js/jquery/ui/jquery.effects.fold.min.js',
'wp-admin/images/screenshots/captions-1.png',
'wp-admin/images/screenshots/captions-2.png',
'wp-admin/images/screenshots/flex-header-1.png',
'wp-admin/images/screenshots/flex-header-2.png',
'wp-admin/images/screenshots/flex-header-3.png',
'wp-admin/images/screenshots/flex-header-media-library.png',
'wp-admin/images/screenshots/theme-customizer.png',
'wp-admin/images/screenshots/twitter-embed-1.png',
'wp-admin/images/screenshots/twitter-embed-2.png',
'wp-admin/js/utils.js',
'wp-admin/options-privacy.php',
'wp-app.php',
'wp-includes/class-wp-atom-server.php',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css',
// 3.5.2
'wp-includes/js/swfupload/swfupload-all.js',
// 3.6
'wp-admin/js/revisions-js.php',
'wp-admin/images/screenshots',
'wp-admin/js/categories.js',
'wp-admin/js/categories.min.js',
'wp-admin/js/custom-fields.js',
'wp-admin/js/custom-fields.min.js',
// 3.7
'wp-admin/js/cat.js',
'wp-admin/js/cat.min.js',
'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js',
// 3.8
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif',
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif',
'wp-includes/js/thickbox/tb-close-2x.png',
'wp-includes/js/thickbox/tb-close.png',
'wp-includes/images/wpmini-blue-2x.png',
'wp-includes/images/wpmini-blue.png',
'wp-admin/css/colors-fresh.css',
'wp-admin/css/colors-classic.css',
'wp-admin/css/colors-fresh.min.css',
'wp-admin/css/colors-classic.min.css',
'wp-admin/js/about.min.js',
'wp-admin/js/about.js',
'wp-admin/images/arrows-dark-vs-2x.png',
'wp-admin/images/wp-logo-vs.png',
'wp-admin/images/arrows-dark-vs.png',
'wp-admin/images/wp-logo.png',
'wp-admin/images/arrows-pr.png',
'wp-admin/images/arrows-dark.png',
'wp-admin/images/press-this.png',
'wp-admin/images/press-this-2x.png',
'wp-admin/images/arrows-vs-2x.png',
'wp-admin/images/welcome-icons.png',
'wp-admin/images/wp-logo-2x.png',
'wp-admin/images/stars-rtl-2x.png',
'wp-admin/images/arrows-dark-2x.png',
'wp-admin/images/arrows-pr-2x.png',
'wp-admin/images/menu-shadow-rtl.png',
'wp-admin/images/arrows-vs.png',
'wp-admin/images/about-search-2x.png',
'wp-admin/images/bubble_bg-rtl-2x.gif',
'wp-admin/images/wp-badge-2x.png',
'wp-admin/images/wordpress-logo-2x.png',
'wp-admin/images/bubble_bg-rtl.gif',
'wp-admin/images/wp-badge.png',
'wp-admin/images/menu-shadow.png',
'wp-admin/images/about-globe-2x.png',
'wp-admin/images/welcome-icons-2x.png',
'wp-admin/images/stars-rtl.png',
'wp-admin/images/wp-logo-vs-2x.png',
'wp-admin/images/about-updates-2x.png',
// 3.9
'wp-admin/css/colors.css',
'wp-admin/css/colors.min.css',
'wp-admin/css/colors-rtl.css',
'wp-admin/css/colors-rtl.min.css',
'wp-admin/css/media-rtl.min.css',
'wp-admin/css/media.min.css',
'wp-admin/css/farbtastic-rtl.min.css',
'wp-admin/images/lock-2x.png',
'wp-admin/images/lock.png',
'wp-admin/js/theme-preview.js',
'wp-admin/js/theme-install.min.js',
'wp-admin/js/theme-install.js',
'wp-admin/js/theme-preview.min.js',
'wp-includes/js/plupload/plupload.html4.js',
'wp-includes/js/plupload/plupload.html5.js',
'wp-includes/js/plupload/changelog.txt',
'wp-includes/js/plupload/plupload.silverlight.js',
'wp-includes/js/plupload/plupload.flash.js',
'wp-includes/js/plupload/plupload.js',
'wp-includes/js/tinymce/plugins/spellchecker',
'wp-includes/js/tinymce/plugins/inlinepopups',
'wp-includes/js/tinymce/plugins/media/js',
'wp-includes/js/tinymce/plugins/media/css',
'wp-includes/js/tinymce/plugins/wordpress/img',
'wp-includes/js/tinymce/plugins/wpdialogs/js',
'wp-includes/js/tinymce/plugins/wpeditimage/img',
'wp-includes/js/tinymce/plugins/wpeditimage/js',
'wp-includes/js/tinymce/plugins/wpeditimage/css',
'wp-includes/js/tinymce/plugins/wpgallery/img',
'wp-includes/js/tinymce/plugins/wpfullscreen/css',
'wp-includes/js/tinymce/plugins/paste/js',
'wp-includes/js/tinymce/themes/advanced',
'wp-includes/js/tinymce/tiny_mce.js',
'wp-includes/js/tinymce/mark_loaded_src.js',
'wp-includes/js/tinymce/wp-tinymce-schema.js',
'wp-includes/js/tinymce/plugins/media/editor_plugin.js',
'wp-includes/js/tinymce/plugins/media/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/media/media.htm',
'wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wpview/editor_plugin.js',
'wp-includes/js/tinymce/plugins/directionality/editor_plugin.js',
'wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wpeditimage/editimage.html',
'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm',
'wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wplink/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js',
'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js',
'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js',
'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/paste/editor_plugin.js',
'wp-includes/js/tinymce/plugins/paste/pasteword.htm',
'wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/paste/pastetext.htm',
'wp-includes/js/tinymce/langs/wp-langs.php',
// 4.1
'wp-includes/js/jquery/ui/jquery.ui.accordion.min.js',
'wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js',
'wp-includes/js/jquery/ui/jquery.ui.button.min.js',
'wp-includes/js/jquery/ui/jquery.ui.core.min.js',
'wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js',
'wp-includes/js/jquery/ui/jquery.ui.dialog.min.js',
'wp-includes/js/jquery/ui/jquery.ui.draggable.min.js',
'wp-includes/js/jquery/ui/jquery.ui.droppable.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js',
'wp-includes/js/jquery/ui/jquery.ui.effect.min.js',
'wp-includes/js/jquery/ui/jquery.ui.menu.min.js',
'wp-includes/js/jquery/ui/jquery.ui.mouse.min.js',
'wp-includes/js/jquery/ui/jquery.ui.position.min.js',
'wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js',
'wp-includes/js/jquery/ui/jquery.ui.resizable.min.js',
'wp-includes/js/jquery/ui/jquery.ui.selectable.min.js',
'wp-includes/js/jquery/ui/jquery.ui.slider.min.js',
'wp-includes/js/jquery/ui/jquery.ui.sortable.min.js',
'wp-includes/js/jquery/ui/jquery.ui.spinner.min.js',
'wp-includes/js/jquery/ui/jquery.ui.tabs.min.js',
'wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js',
'wp-includes/js/jquery/ui/jquery.ui.widget.min.js',
);
<end node> 5P9i0s8y19Z
dt=
<node>uploads
1
wpconfig.php file
define( 'UPLOADS', 'uploads/' );
<end node> 5P9i0s8y19Z
dt=
<node>urls
1
https://wordpress.org/plugins/bulletproof-security/installation/
http://clicknathan.com/web-design/include-wordpress-page/
How to Include a WordPress Page on Another WP Page or Part of Your Theme (without using a Plugin)
Dec052012
So you have some content from one WordPress post or page and you want to include it elsewhere in your theme. Perhaps you have a “Store Hours” page that you’d like to be able to only update once and have it show in various spots of your website, not just on that particular page.
The following snippet of code shows you how to tell PHP to grab a particular page via get_pages, and then sets two variables depending on that page’s content and title.
The last line shows you how to output the content.
$include = get_pages('include=4177');
$content = apply_filters('the_content',$include[0]->post_content);
$title = apply_filters('the_title',$include[0]->post_title); echo '<h1>'.$title.'</h1>'; echo $content;
Remember to change the 4177 to whatever the ID of your particular page is, and note that you don’t need to keep the last “echo” line in there, you could use that elsewhere in your template.
<end node> 5P9i0s8y19Z
dt=
<node>How to Include a WordPress Page
2
<h1>How to Include a WordPress Page on Another WP Page or Part of Your Theme (without using a Plugin)</h1>
<?php
$pages = get_pages('include=144');
$count = 0;
foreach($pages as $page)
{
$content = $page->post_content;
if(!$content)
continue;
if($count >= 2)
break;
$count++;
$content = apply_filters('the_content', $content);
?>
<div class=\"entry\"><?php echo $content ?></div>
<?php
}
?>
<time datetime="2012-12-05"><span>Dec</span><span>05</span><span>2012</span></time>
</header>
<p>So you have some content from one WordPress post or page and you want to include it elsewhere in your theme. Perhaps you have a “Store Hours” page that you’d like to be able to only update once and have it show in various spots of your website, not just on that particular page.</p>
<p>The following snippet of code shows you how to tell PHP to grab a particular page via <code>get_pages</code>, and then sets two variables depending on that page’s content and title. </p>
<p>The last line shows you how to output the content.</p>
<div class="code-snippet">
<code>$include = get_pages('include=4177');<br>
$content = apply_filters('the_content',$include[0]->post_content);<br>
$title = apply_filters('the_title',$include[0]->post_title);<br>
echo '<h1>'.$title.'</h1>'; echo $content; </code>
</div>
<p><strong>Remember to change the <code>4177</code> to whatever the ID of your particular page is</strong>, and note that you don’t need to keep the last “echo” line in there, you could use that elsewhere in your template.</p>
<end node> 5P9i0s8y19Z
dt=
<node>Stupid WordPress Tricks
2
http://perishablepress.com/stupid-wordpress-tricks/
Perishable Press
WordPress, Web Design, Code & Tutorials
Tutorials
Plugins
Archives
Demos
Tools
New book on WordPress Theme Development: WordPress Themes In Depth
x
« Getting Serious with a New Design
The New Clearfix Method »
Stupid WordPress Tricks
[ WordPress ]
One of the most popular articles here at Perishable Press is my January 2005 post, Stupid htaccess Tricks. In that article, I bring together an extensive collection of awesome copy-&-paste HTAccess code snippets. Four years later, people continue to tell me how much they enjoy and use the content as a bookmarked reference for many of their HTAccess needs. The article was even published in a book on Joomla! Security.
This is very inspiring to me, so I have decided to create a similar post for all of the useful WordPress code snippets, tips and tricks that I have collected while working on Digging into WordPress, the new book by co-author Chris Coyier and myself that really “digs in” to all of the awesome ways to get the most out of WordPress. While writing the DiW book, I collected hundreds of incredibly useful WordPress tips and tricks. After packing the book with as many of these techniques as possible, I decided to share the “best of the rest” here at Perishable Press.
If you are one of the millions of people who use WordPress, this article will help you improve the appearance, functionality, and performance of your WordPress-powered websites. Each of these “stupid WordPress tricks” is presented as clearly and succinctly as possible, including as many notes, instructions, and pointers as needed for successful implementation. Of course, keep in mind that we are only scratching the surface here. For a much more complete resource that is packed with tons of tasty techniques, you need to get Digging into WordPress.
So now, without further ado, here is my personal collection of easy-to-use, copy-&-paste WordPress tricks. Enjoy! 🙂
Table of Contents
WordPress Shortcodes
WordPress Permalinks Outside of the Loop
Custom Message to Returning Visitors
Recently Updated Posts and Pages
Custom Content to Search Engine Visitors
Last Modified Time and Date for Posts
Display Total Number of Trackbacks and Pingbacks
Display Recently Registered Users
List all of Your Site’s Posts
List WordPress User Information
Display List of Scheduled Posts
Display Private Posts to Logged-in Users
Display Posts from Exactly One Year Ago
Custom CSS Styles for Recent Posts
New WordPress-2.7 Comments Loop
Backwards-Compatible Comment Templates
Disable WordPress Post Revisions
Limit WordPress Post Revisions
Remove WordPress Post Revisions from the Database
Reduce Comment Spam by Blocking No-Referrer Requests
Prevent Google Analytics from Tracking Admin Pages
Meta Descriptions without a Plugin
Differentiate Between Posts Depending on Presence of Excerpt
Modify the wp_options Table via the WordPress Admin
Alternate Comment Styles
Automatically Remove Code Mistakes in Posts
Automatically Disable Comments and Trackbacks in Old Posts
Access Post Data Outside the Loop
Display Posts for a Specified Time Period
Unique Single Post Templates for Different Categories
Display Performance Statistics for WordPress Pages
Custom Post Thumbnails in Two Steps
Highlight Author Comments
Easy Random Posts
Display Dates for Groups of Posts
Display a Sticky Post in the Sidebar
Display Latest Comments without a Plugin
Display Most Commented Posts without a Plugin
Change Permalinks from Date-Based to Post-Date Only
Test for Sub-Pages
Multiple Widgetizable Sidebars
Remove Fancy Quotes from Comments
Display a List of All Untagged Posts
Easy Display of Custom Headers, Footers, and Sidebars
A Better Way for Users to Logout
Display a Custom Message on a Specific Date
Display Three Columns of Posts
Disable WordPress Search Functionality
Display Posts with Specific Custom Fields
How to Number Your Comments, Pingbacks, & Trackbacks in 2.7+
How to Number Your Comments Using the Classic Loop
Invite Readers to Comment via Feed
Display the Total Number of Users for Your Blog
Automatically Insert Content into Your WordPress Post Editor
How to Prevent Duplicate Content
Conditionally Display Full Posts or Excerpts
Display Related Posts without a Plugin
Drop-Dead Easy Styles for Author Comments
Display Posts Upcoming Scheduled Posts
Display Automatic TinyURLs for Your Posts
Implement a Site-Maintenance Page for Your Blog
Display the First Image from Each of Your Posts
Display Most Popular Posts without a Plugin
Automatically Highlight Search Terms
Automatically Disable Widgets
Display All Images from Your Post Content
Display Category List in Two Columns
Show Ads or Other Content Only in the First Three Posts
A Better Way to Display Recent Comments without a Plugin
Selectively Disable Automatic Post Formatting
Browser Detection via WordPress’ body_class Function
Get Post or Page Contents as a PHP Variable
Simple Example of How to Use WordPress Cron
Add More Default Avatar Choices to the WordPress Admin
Add a Private Page to Your Navigation Menu
How to Add Additional Links to wp_list_pages
WordPress Shortcodes ?
Save time by replacing your most commonly typed words and phrases with WordPress shortcodes. For example, if you are frequently typing your blog’s URL, you could place the following code your theme’s functions.php file:
function shortURL() {
return 'http://perishablepress.com/';
}
add_shortcode('myurl', 'shortURL');
Now whenever I write a post via “HTML-mode”, all I need to include my blog’s URL is type “[myurl]”. Works great in WordPress 2.5 or better.
Shortcodes with Attributes
To create a shortcode for links, we need to include the href attribute information as well as the anchor text for the link itself. We can do this by placing this function in your theme’s functions.php file:
function shortLink($atts, $content = null) {
extract(shortcode_atts(array(
"href" => 'http://' // default URL
), $atts));
return '<a href="'.$href.'">'.$content.'</a>';
}
add_shortcode('link', 'shortLink');
Then, when creating a post, emulate the following format to include any links you wish:
[link href="http://perishablepress.com/"]Perishable Press[/link]
..which will output the following code:
<a href="http://perishablepress.com/">Perishable Press</a>
When the href attribute is removed from the shortcode, the default URL will be used. You may specify the default URL in the third line of the funtion (see comment).
Source: Digging into WordPress
Display WordPress Permalinks Outside of the Loop ?
Normally, permalink display via the_permalink() requires the loop. To display permalinks outside of the loop, we may use either of the following methods:
<!– external permalink via post ID –>
<a href="<?php echo get_permalink(33); ?>" >Permalink</a>
<!– external permalink via global $post variable –>
<a href="<?php echo get_permalink($post->ID); ?>" >Permalink</a>
Source: Julien Chauvin (404 link removed 2013/06/27)
Display Custom Message to Returning Visitors ?
We can greet returning commentators with a custom message by extracting their information from the comment cookie left on their machine. Place the following code into the desired location in your theme and customize the message and markup to whatever you wish:
<?php if(isset($_COOKIE['comment_author_'.COOKIEHASH])) {
$lastCommenter = $_COOKIE['comment_author_'.COOKIEHASH];
echo "Welcome Back ". $lastCommenter ."!";
} else {
echo "Welcome, Guest!";
} ?>
Source: ifohdesigns (404 link removed 2012/09/14)
Display Recently Updated Posts and Pages ?
Easily display a list of recently updated posts by placing the following code into the desired location in your theme:
<?php
$today = current_time('mysql', 1);
$number = 5; // number of posts
if($recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_modified_gmt < '$today' ORDER BY post_modified_gmt DESC LIMIT $number")):
?>
<h2><?php _e("Recently Updated"); ?></h2>
<ul>
<?php
foreach($recentposts as $post) {
if($post->post_title == '') $post->post_title = sprintf(__('Post #%s'), $post->ID);
echo '<li><a href="'.get_permalink($post->ID).'">'.the_title().'</a></li>';
} ?>
</ul>
<?php endif; ?>
Of course, customize the details as necessary and remember to set the number of posts via the “$howMany” variable.
Source: Corey (404 link removed 2014/06/08)
Display Custom Content to Search Engine Visitors ?
Display custom content to your search-engine traffic by placing the following code into your theme’s functions.php file:
<?php function scratch99_fromasearchengine() {
$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach($SE as $source) {
if(strpos($ref, $source) !== false) return true;
}
return false;
} ?>
After checking and editing the $SE array with the search-engine referrer information of your choice, place this next chunk of code into the desired display location in your theme file(s):
<?php if(function_exists('scratch99_fromasearchengine')) {
if (scratch99_fromasearchengine()) {
// INSERT YOUR CODE HERE
}
} ?>
Add whatever content or code you wish to the specified area and enjoy targeted delivery to search-engine visitors only.
Source: Stephen Cronin
Display Last Modified Time and Date for Posts ?
Display the “last-modified” time for your posts by placing this code anywhere within the loop:
Posted on <?php the_time('F jS, Y') ?>
<?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if($u_modified_time != $u_time) {
echo "and last modified on ";
the_modified_time('F jS, Y');
echo ". ";
} ?>
Source: Kyle Eslick
Display Total Number of Trackbacks and Pingbacks ?
Display the trackback/pingback count for each of your posts by first placing this code into your theme’s functions.php file:
function comment_count() {
global $wpdb;
$count = "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_type = 'pingback' OR comment_type = 'trackback'";
echo $wpdb->get_var($count);
}
And then call the number for display anywhere in your theme by adding this code to the desired location:
<?php comment_count(); ?>
Alternately, in WordPress 2.7, you may display the total number of comments by inserting this code directly into your comments.php template:
<?php if(!empty($comments_by_type['comment'])) :
$count = count($comments_by_type['comment']);
($count !== 1) ? $txt = "Comments" : $txt = "Comment";
?>
<h3><?php echo $count . " " . $txt; ?></h3>
Edit the markup as desired. Will display “” or “”, depending on the number of comments.
Source: WPengineer.com
Display Recently Registered Users ?
Quick and easy method for displaying a list of recently registered users. Place the following code directly into your theme, wherever you would like to display the list:
<ul>
<?php $usernames = $wpdb->get_results("SELECT user_nicename, user_url FROM $wpdb->users ORDER BY ID DESC LIMIT 5");
foreach ($usernames as $username) {
echo '<li><a href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";
}
?>
</ul>
As-is, this code will spit out the five most recent registered users. This is easily changed to whatever number you wish by simply editing the number “5” in the first line.
Source: WPRecipes.com
List all of Your Site’s Posts ?
If the default wp_get_archives(type=postbypost&limit=) function doesn’t provide enough flexibility to meet your needs, here is another way to list all of your site’s posts:
<?php while(have_posts()) : the_post(); ?>
<ul>
<?php $allposts = get_posts('numberposts=-1&offset=0'); foreach($allposts as $post) : ?>
<li><?php the_time('d/m/y'); ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<?php endwhile; ?>
In place, that code will display a list of all of your blog’s posts. As a bonus, you may use any of the applicable parameters available to the get_posts() function to do just about anything you need with your posts list.
Source: WPRecipes.com
List WordPress User Information ?
Here is an easy way to display flexible lists of your blog’s registered users’ information. In this example, we will list the first and last name of each user registered in the database:
<ul>
<?php $szSort = "user_nicename";
$aUsersID = $wpdb->get_col($wpdb->prepare("SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC", $szSort));
foreach($aUsersID as $iUserID) :
$user = get_userdata($iUserID);
echo '<li>'.ucwords(strtolower($user->first_name.' '.$user->last_name)).'</li>';
endforeach;
?>
</ul>
The following variables may be used to display different types of user information and also to specify the sort order of the output list:
ID – User ID number
user_login – User Login name
user_nicename – nice version of login name
user_email – User Email Address
user_url – User Website URL
user_registered – User Registration date
To display any of these different types of user information, call it with $user->name_of_the_column anywhere within the function’s foreach() loop. To change the display order of the output, use any of the above as the value of the $szSort variable in the first line of the function. Note that strtolower and ucwords are used to ensure proper capitalization of the user names.
Source: Matt Varone
Display List of Scheduled Posts ?
Got scheduled posts? Cool. Here’s how to display them to your readers:
<ul>
<?php $my_query = new WP_Query('post_status=future&order=DESC&showposts=5');
if ($my_query->have_posts()) {
while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<li><?php the_title(); ?></li>
<?php endwhile; } ?>
</ul>
Place that code in the desired location of your WordPress template and display a list of scheduled posts to your readers. To change the total number of displayed posts, edit the showposts=5 parameter to any number you wish. You may also use other parameters available to the WP_Query() function to further customize the output.
Source: Pascal Birchler
Display Private Posts to Logged-in Users ?
To display private posts to your logged-in users, you will need to add a custom field called “private” for each private post and give it a value of “true”. Then, replace your default WordPress loop with the following:
<?php if (have_posts()) : while (have_posts()) : the_post();
$private = get_post_custom_values("private");
if (isset($private[0]) && $private == "true") {
if (is_user_logged_in()) {
// Display private post to logged user
}
} else {
// Display public post to everyone
}
endwhile; endif; ?>
This custom loop will check each post for the presence of a custom-field value of true. For each post that has this value, the loop will then check to see if the user is logged into your site. If the user is in fact logged in, the loop will display the private post(s). Public posts will be displayed as usual and regardless of whether the user is logged in or not.
Source: Digging into WordPress
Display Posts from Exactly One Year Ago ?
Use this code to display posts that are exactly one year old:
<?php
$current_day = date('j');
$last_year = date('Y')-1;
?>
<?php query_posts('day='.$current_day.'&year='.$last_year);
if (have_posts()): while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_excerpt(); ?>
<?php endwhile; endif; ?>
To display posts from different days or different years, edit the two variables in the beginning of the method.
Custom CSS Styles for Recent Posts ?
Use some custom CSS styles to highlight your recent posts. To do this, replace your existing loop with the following:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
$currentdate = date('Y-m-d',mktime(0,0,0,date('m'),date('d'),date('Y')));
$postdate = get_the_time('Y-m-d');
if ($postdate == $currentdate) {
echo '<div class="post new">';
} else {
echo '<div class="post">';
} ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<?php endwhile; endif; ?>
This new loop will check the date of each post and include a CSS class of “new” to any post published within the previous 24-hour time period. Once the new post class is included, you may style it with some custom CSS such as the following:
.post{
/* styles for all posts */
}
.post.new {
/* styles for new posts */
}
Source: Fred jaillet [via] WPRecipes.com
New WordPress-2.7 Comments Loop ?
Due to the changes made to comment-related functions in WordPress 2.7, you will need to upgrade your comments template in order accomodate for the new functionality. The major changes are the new wp_list_comments() function and the next/previous_comments_link() functions. Here is an example comments.php loop to get you started:
<?php if (have_comments()) : ?>
<h4><?php comments_number('No Comments', 'One Comment', '% Comments' );?></h4>
<ul class="commentlist">
<?php wp_list_comments(); ?>
</ul>
<div class="navigation">
<div class="alignleft"><?php previous_comments_link(); ?></div>
<div class="alignright"><?php next_comments_link(); ?></div>
</div>
<?php else : // if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<p>Comments are open, but there are no comments.</p>
<?php else : ?>
<p>Comments are closed, and there are no comments.</p>
<?php endif; ?>
<?php endif; ?>
As you can see, we are now using the wp_list_comments() function as the method by which our individual comments are displayed. This function wraps each comment with a set of <li> elements, but this may be changed via customized parameters. We are also using the next/previous_comments_link() functions to accommodate the new built-in paged comments feature.
Source: Digging into WordPress
Backwards-Compatible Comment Templates ?
The easiest way to accommodate for both old (pre-2.7) and new (2.7+) WordPress comment loops is to create two different versions of the comments template and then use some conditional logic to process the correct file. Place the 2.7-compatible code from the previous section into your default comments.php file, and then place your existing (pre-2.7) comments code into a file called legacy-comments.php. Once you have both of these files setup and included among your theme files, place the following function in your theme’s functions.php file:
<?php add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH.'/legacy-comments.php';
endif;
return $file;
} ?>
This code will then check for the presence of the new wp_list_comments() function. If it exists, then the version of WordPress is at least 2.7, and the default comments.php file will be used. If the new function doesn’t exist, we have a dinosaur on our hands and so the legacy comments file will be used instead.
Source: Justin Tadlock
Disable WordPress Post Revisions ?
One of the new features rolled out in WordPress 2.6 involved post revisions. Revisions are a way for users to keep a working collection of each different version of a post and then revert back to it in the future if necessary. Some people think this is the greatest thing since lightsabers, others (such as myself) find it to be a royal pain in the database. It convolutes the Admin area, gobbles up disk space, and usually doesn’t work as intended. Fortunately, we can disable this amazing new “feature” (which should NOT have been included in the core) by adding the following line to the wp-config.php file:
/* disable post-revisioning nonsense */
define('WP_POST_REVISIONS', FALSE);
Just place that line above the “Happy blogging” comment and say goodbye to needless revisioning bloat.
Source: Digging into WordPress
Limit WordPress Post Revisions ?
If you like the idea of WordPress-2.6’s new post-revisioning feature, but don’t want thousands of extra records bloating up your database, here is an easy way to limit the total number of revisions that WordPress is allowed to keep. This code will instruct WordPress to keep only the most recent “x” number of revisions:
/* limit number of post revisions */
define('WP_POST_REVISIONS', 3);
Place that line above the “Happy blogging” comment in the wp-config.php file and enjoy conserved disk space and less Admin clutter. Change the number “3” to any number you wish. Works a treat.
Source: Digging into WordPress
Remove WordPress Post Revisions from the Database ?
In line with the previous two sections, here we will remove all existing post revisions from the WordPress database. This is useful if you have disabled the post-revisioning feature or perhaps even reduced the total number of allowed revisions. The easiest way to do this is to run the following SQL command via your favorite database interface (such as my personal favorite, phpMyAdmin):
DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision';
Note that if you have changed the default WordPress database table prefix to something other than “wp_”, you will want to edit the command to reflect the correct prefix information. This information is available in your site’s wp-config.php file. Also note that you should backup your database before casting any SQL spells on it.
Upon successful execution of the above command, all data associated with post revisions will be removed the database. This includes the post revisions themselves and all the meta data associated with each revision.
Credit: Andrei Neculau
Reduce Comment Spam by Blocking No-Referrer Requests ?
As explained in my article, denying access to no-referrer requests, you can greatly reduce the number of spam comments by eliminating all direct requests for your blog’s comments-post.php file. This will block automated spam scripts from bypassing your comments form by hitting the comment processing script directly. Here are two ways to block no-referrer comment requests, one uses HTAccess and the other uses PHP. Here is the HTAccess method:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php
RewriteCond %{HTTP_REFERER} !domain.tld [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
Place that code in your site’s root HTAccess file and edit the “domain.tld” to match your own domain. Once in place, this code will redirect any request for your blog’s comments-post.php file that didn’t originate from your site back to the URL from whence it came.
This may also be accomplished via PHP. Place the following function in your theme’s functions.php file:
function check_referrer() {
if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == '') {
wp_die(__('Please do not access this file directly.'));
}
}
add_action('check_comment_flood', 'check_referrer');
Source: Perishable Press
Prevent Google Analytics from Tracking Admin Pages ?
This handy snippet will prevent Google Analytics from tracking your Admin pages or anything else that you wish. Replace your default Google Analytics code with the following:
<?php if (!current_user_can('level_10')) { ?>
/* Google Analytics Code */
<?php } ?>
This code will then include your Google Analytics code only on non-Admin pages. This in turn will prevent Google Analytics from gathering statistics about your Admin pages. Note that the basic functionality of this method is great for restricting just about anything – scripts, markup, content – to logged-in administrators.
Meta Descriptions without a Plugin ?
We don’t need no stinkin’ plugin for custom meta descriptions. All you need is a custom field named “metadescription” with the desired meta description for each post. Once you have that going, include the following function to your theme’s header.php file (within the <head> section:
<meta name="description" content="
<?php if ((is_home()) || (is_front_page())) {
echo ('Your main description goes here');
} elseif(is_category()) {
echo category_description();
} elseif(is_tag()) {
echo 'Tag archive page for this blog – ' . single_tag_title();
} elseif(is_month()) {
echo 'Archive page for this blog – ' . the_time('F, Y');
} else {
echo get_post_meta($post->ID, 'metadescription', true);
} ?>" />
This function enables you to customize the descriptions for various types of pages, such as the home page, category pages, tag archives, and so on. For single post-view pages, this function will display the value of the metadescription custom field.
Source: Malcolm Coles (404 link removed)
Differentiate Between Posts Depending on Presence of Excerpt ?
Here is a quick conditional snippet that displays different content depending on the presence of an excerpt:
<?php if(!empty($post->post_excerpt)) {
// this post has an excerpt, so display it:
the_excerpt();
} else {
// this post has no excerpt, so display something else instead:
the_content();
} ?>
Placed inside the loop, this code will check each post for an excerpt. If one is found, the excerpt is displayed; otherwise, the code specified in the else condition is displayed.
Modify the wp_options Table via the WordPress Admin ?
As you probably know, the wp_options table stores a great deal of useful information, including everything from custom-field values, plugin settings, blog information, and much more. If any table in the WordPress database needs its own friendly user-interface, this would be it.
Normally, you would access the wp_options table using a database interface such as phpMyAdmin. This certainly works, but there is a much easier way to work with the options table, especially if you are already logged into WordPress. Once logged in to the Admin area, navigate to the following URL:
http://domain.tld/wp-admin/options.php
This will open a “secret” Admin page that provides editable options fields for every record in the wp_options table. Bookmark this page, and save yourself a trip to phpMyAdmin!
Source: Digging into WordPress
Alternate Comment Styles ?
Alternating comments for old versions of WordPress (pre-2.7)
This is one of the oldest tricks in the book, but it is still a favorite. Alternating comment styles is a great way to enhance usability and add some stylistic flair to your comments display. The trick is to add an alternating set of classes – odd or even – to the containing element of each comment. While there are many ways to do this, here is one of the easiest. Open your comments.php and modify the comments loop as follows:
<ul>
<?php $i = 0; ?>
<?php foreach ($comments as $comment) : ?>
<?php $i++; ?>
<li id="comment-<?php comment_ID(); ?>" <?php if($i&1) { echo 'class="odd"'; } else { echo 'class="even"'; } ?>>
<?php comment_text(); ?>
</li>
<php endforeach; ?>
</ul>
With that code in place, your comments will now have alternating CSS classes with which to apply custom styles to your oddly and evenly numbered comments:
.odd {
background: white;
color: black;
}
.even {
background: black;
color: white;
}
Alternating comments for old versions of WordPress (pre-2.7)
In WordPress 2.7 and better, comments automagically include “odd” and “even” classes for oddly and evenly numbered comments, respectively. This makes it a snap to throw down your own custom CSS styles for each of these classes.
Credit: WordPress Garage
Automatically Remove Code Mistakes in Posts ?
Here is a handy trick that will automatically remove basic mistakes in XHTML markup, such as empty paragraphs, inline font styles, and more. Place this function in your functions.php file:
function clean_bad_content($bPrint = false) {
global $post;
$szPostContent = $post->post_content;
$szRemoveFilter = array("~<p[^>]*>\s?</p>~", "~<a[^>]*>\s?</a>~", "~<font[^>]*>~", "~<\/font>~", "~style\=\"[^\"]*\"~", "~<span[^>]*>\s?</span>~");
$szPostContent = preg_replace($szRemoveFilter, '', $szPostContent);
$szPostContent = apply_filters('the_content', $szPostContent);
if ($bPrint == false) return $szPostContent;
else echo $szPostContent;
}
Once in place, use the following function call to display your “cleaned” content in the loop:
<?php if (function_exists('clean_bad_content')) clean_bad_content(true); ?>
Note that the clean_bad_content() accepts a boolean argument (true or false) specifying whether or not to print the function output.
Credit: Matt Varone
Automatically Disable Comments and Trackbacks in Old Posts ?
Here is yet another method for auto-disabling comments and trackbacks on old posts. This function automatically closes comments and trackbacks after the specified number of days. Add the following to your functions.php file:
<?php function autoclose_comments() {
global $wpdb, $tableposts;
if (!isset($tableposts))
$tableposts = $wpdb->posts;
$age = '21 DAY';
$date = $wpdb->get_var("SELECT DATE_ADD(DATE_SUB(CURDATE(), INTERVAL $age), INTERVAL 1 DAY)");
$wpdb->query("UPDATE $tableposts SET comment_status = 'closed' WHERE comment_status = 'open' AND post_status = 'publish' AND post_date < '$date'");
}
function autoclose_trackback() {
global $wpdb, $tableposts;
if (!isset($tableposts))
$tableposts = $wpdb->posts;
$age = '21 DAY';
$date = $wpdb->get_var("SELECT DATE_ADD(DATE_SUB(CURDATE(), INTERVAL $age), INTERVAL 1 DAY)");
$wpdb->query("UPDATE $tableposts SET ping_status = 'closed' WHERE comment_status = 'open' AND post_status = 'publish' AND post_date < '$date'");
}
add_action('publish_post', 'autoclose_trackback', 7);
add_action('edit_post', 'autoclose_trackback', 7);
add_action('delete_post', 'autoclose_trackback', 7);
add_action('comment_post', 'autoclose_trackback', 7);
add_action('trackback_post', 'autoclose_trackback', 7);
add_action('pingback_post', 'autoclose_trackback', 7);
add_action('edit_comment', 'autoclose_trackback', 7);
add_action('delete_comment', 'autoclose_trackback', 7);
add_action('template_save', 'autoclose_trackback', 7);
add_action('publish_post', 'autoclose_comments', 7);
add_action('edit_post', 'autoclose_comments', 7);
add_action('delete_post', 'autoclose_comments', 7);
add_action('comment_post', 'autoclose_comments', 7);
add_action('trackback_post', 'autoclose_comments', 7);
add_action('pingback_post', 'autoclose_comments', 7);
add_action('edit_comment', 'autoclose_comments', 7);
add_action('delete_comment', 'autoclose_comments', 7);
add_action('template_save', 'autoclose_comments', 7);
?>
Once in place, you may change the number of days allowed for comments and trackbacks to stay open by editing the two instances of the $age variable to whatever you wish. No other editing or code is required for this function to operate effectively. The function is executed automatically upon various posting actions. Note that this function is included in newer versions of WordPress (2.7 or better), and is therefore only required for older versions.
Source: WP EngineerPlugin: Autoclose
Access Post Data Outside the Loop ?
The easiest way to access and display post data outside of the loop is to use the built-in WordPress core function get_post(); however, for more control over the process, check out this nifty little function from WP Recipes:
function get_post_data($postId) {
global $wpdb;
return $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID=$postId");
}
Place this function in your functions.php and then add this code to the desired location outside of the loop:
<?php $data = get_post_data(77);
echo $data->post_date; // post date
echo $data->post_title; // post title
echo $data->post_content; // post content
echo $data->comment_count; // comments number
?>
For the argument of the function, specify the post ID for which you would like to display data. The function will return an array containing all of the available fields for the specified post (post_title, date, content, author_id, post_id, etc).
Display Posts for a Specified Time Period ?
Here is an easy way to create posts that will only be displayed for the duration of a specified time period. Replace your current loop with the following:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
$expirationtime = get_post_custom_values('expiration');
if (is_array($expirationtime)) {
$expirestring = implode($expirationtime);
}
$secondsbetween = strtotime($expirestring)-time();
if ($secondsbetween > 0) { ?>
<h1><?php the_title(); ?></h1>
<?php the_excerpt(); ?>
<?php } endwhile; endif; ?>
And then add a custom field named “expiration” to any post that needs an expiration date. For the value of the expiration key, specify the date/time in the following format: mm/dd/yyyy 00:00:00. Each post that contains such a custom field will expire after the specified date and time and will no longer appear in the loop.
Unique Single Post Templates for Different Categories ?
Here is an easy way to display custom post styles depending on the post’s category. With the following code, each single-view post will be displayed according to a template that is specific to the post’s category:
<?php $post = $wp_query->post;
if (in_category('1')) {
include(TEMPLATEPATH.'/single-01.php');
} elseif (in_category('2')) {
include(TEMPLATEPATH.'/single-02.php');
} else {
include(TEMPLATEPATH.'/single-default.php');
} ?>
This code should be placed in your theme’s single.php file. As written, this code will display posts from the first category with the single template, “single-01.php”; also, posts from the second category will be displayed with a single template named “single-02.php”; finally, all other posts will be displayed via the default single template, “single-default.php”. Of course, you will want to customize the category IDs according to your own needs, and also you will want to create the customized single files as they are called. That’s all there is to it.
Having said that, here is an alternate version of the custom-post-template script:
<?php add_filter('single_template', create_function('$t', 'foreach((array) get_the_category() as $cat) { if (file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php")) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;')); ?>
Placed in your theme’s functions.php file, this alternate script checks all categories for the presence of a custom single template. Any category with a custom single-post template will then have its posts displayed with that template. If a post’s category does not feature a custom template, the default single.php template will be used. Note that this code will use the template for the first listed category of each post. Even so, you should only create custom post templates for categories that will always be mutually exclusive. That is, make sure that your posts aren’t in more than one custom-templated category.
Source: Austin Matzko
Display Performance Statistics for WordPress Pages ?
Everyone is familair with the following information:
<!– 33 queries in 0.333 seconds –>
These statistics are usually seen in the footer area of individual pages and serve as a general indicator of performance. The “queries” refer to the number of times WordPress requested information from the database, while the number of seconds indicates the amount of time required for Apache to generate the page. This information is generated by including the following code in your footer template file (or wherever you would like):
<!– <?php echo get_num_queries(); ?> queries in <?php timer_stop(3); ?> seconds –>
Or, if you don’t like the idea of sharing this information with the entire world, you can limit its display to logged-in administrators only:
<?php if (current_user_can('level_10')) {
echo '<!– ' . get_num_queries() . ' queries in ' . timer_stop(3) . ' seconds –>';
} ?>
Easy breezy beautiful!
Source: Digging into WordPress
Custom Post Thumbnails in Two Steps ?
Alright, kids. Time for the ‘ol three-step custom-field tutorial. This time we’re going to implement post thumbnails. You know, representative images for each of your posts that may be displayed anywhere you wish, including outside of the flow of post content, and even outside of the loop. This is a great trick for advanced page layouts. Ready? Sharpen your keystrokes!
Step 1:
Open your write panel and create a key called “thumbnail”. Then, for the value of the “thumbnail” key, enter the URL of the thumbnail image for that particular post. Write the post and then publish it as normal. Wash, rinse, repeat to get a nice collection of posts with thumbnails. Or, go back to exisiting posts and add a thumbnail as we have just described.
Step 2:
Open your theme template file containing the loop and add the following code to the location where you would like the post thumbnail images to appear:
<?php $thumbnail = get_post_meta($post->ID, 'image', true); if ($thumbnail) { ?>
<img src="<?php echo $thumbnail; ?>" alt="" width="100" height="100" />
<?php } ?>
That’s it! Don’t forget to edit the width and height attributes of the <img> element to account for the proper image size.
Source: Perishable Press
Highlight Author Comments ?
Make your author comments look fabulous darling! Newer versions of WordPress come equipped with a specific “author” class that may be targeted with the CSS of your choice. For older versions of WordPress, however, you will need to add the custom class attribute with a little PHP magic.
First, open your theme’s comments.php template and add the following code snippet in the (X)HTML element that contains the comment information:
<div<?php if ($comment->comment_author_email == "email@domain.tld") echo ' class="author"'; ?> id="comment-<?php comment_ID(); ?>">
.
.
.
</div>
After changing the email address to that of your own (i.e., the one used for your WP Admin user profile), style it up with a little CSS:
.author {
background: red !important;
color: yellow !important;
}
You probably don’t want your author comments to appear with yellow text on a red background, but you get the idea. Anything is possible.
For blogs with multiple authors, you can style each of their comments differently as well by using something like this:
<div<?php if ($comment->comment_author_email == "email-01@domain.tld") echo ' class="author-01"'; elseif ($comment->comment_author_email == "email-02@domain.tld") echo ' class="author-02"'; elseif ($comment->comment_author_email == "email-03@domain.tld") echo ' class="author-03"'; ?> id="comment-<?php comment_ID(); ?>">
.
.
.
</div>
Replace each of the email addresses with those of the various authors. Style to taste.
Credit: Nyssa Brown (404 link removed)
Easy Random Posts ?
Newer versions of WordPress enable easy randomizing of posts by using the (relatively) new “orderby=rand” parameter in any query_posts loop:
<?php query_posts('orderby=rand"); ?>
But for older versions of WordPress, this randomizing functionality must be added manually. Here is a quick and painless plugin that will enable you to randomize post queries in older versions:
<?php
/*
Plugin Name: Random Posts Query
*/
function query_random_posts($query) {
return query_posts($query . '&random=true');
}
class RandomPosts {
function orderby($orderby) {
if (get_query_var('random') == 'true')
return "RAND()";
else
return $orderby;
}
function register_query_var($vars) {
$vars[] = 'random';
return $vars;
}
}
add_filter( 'posts_orderby', array('RandomPosts', 'orderby') );
add_filter( 'query_vars', array('RandomPosts', 'register_query_var') );
?>
Once activated, invoke the randomness by adding the “random=true” parameter in your query_posts loop:
<?php query_posts('cat=11&showposts=11&random=true'); ?>
Here, we are specifying “cat=11” for the category and “showposts=11” for the number of posts to display. There are many other parameters available as well, so knock yourself out.
Credit: rembem
Display Dates for Groups of Posts ?
In order to display the date that a post was published, you have two options:
<?php the_time(); ?> – displays the date for each and every post
<?php the_date(); ?> – displays the date only once for each group of posts published on a certain day
So, if you want to list the post date next to each post, use the the_time(). If, on the other hand, you have multiple posts on any given day, use the_date() to list the post date only once for each days’ posts. Something like this:
// the_time();
Jan 01, 2009 – Post #1
Jan 01, 2009 – Post #2
Jan 01, 2009 – Post #3
Jan 02, 2009 – Post #4
Jan 02, 2009 – Post #5
Jan 02, 2009 – Post #6
Jan 03, 2009 – Post #7
Jan 03, 2009 – Post #8
Jan 03, 2009 – Post #9
// the_date();
Jan 01, 2009
Post #1
Post #2
Post #3
Jan 02, 2009
Post #4
Post #5
Post #6
Jan 03, 2009
Post #7
Post #8
Post #9
See the difference? Good, because I’m not going to explain the concept any further. Instead, I will move on by showing you how to use either template tag in your loop. This really doesn’t need explaining either, but for the sake of completeness, here it is. First, the_time() tag:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<p><?php the_time(); ?><p>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
This loop will output the post title, date, and content for every post. Alternately, here is how to use the_date tag:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_date('','<p>','</p><hr />'); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
This loop will output the post title and content for every post, and also output the date for each group of posts published on any given day, as explained above. Notice we are adding the paragraph elements for the post date based on whether or not the date is actually output. If it is, then the date will be wrapped in <p> elements; if it’s not, no <p> elements will be output, thereby preventing repetitive sets of empty paragraph elements. Make sense? Good. Here are the available parameters for the nifty the_date() template tag:
<?php the_date('date format', 'before the date', 'after the date'); ?>
Display a Sticky Post in the Sidebar ?
Here is a juicy little nugget that displays a “sticky” post in the sidebar of your theme:
<?php
// initialize new query of one post from category 11
$my_query = new WP_Query('cat=11&showposts=1');
// loop through the database to find related information
while ($my_query->have_posts()) : $my_query->the_post();
// set expiration time of two days
$goAwayDate = time() – (60 * 60 * 24 * 2);
// get date of sticky post
$postDate = get_the_time('U');
// if post is too old, do nothing
if ($postDate < $goAwayDate) {
// else show the post
} else { ?>
<h1><?php the_title(); ?></h1>
<?php the_excerpt(); ?>
<?php } endwhile; ?>
This method employs a second loop to display the sticky post, so it may be placed just about anywhere in your theme’s template files. You can also change the number of days that the post will remain sticky by editing the expiration variable with a number other than "2". For example, to set a duration period of seven days, you would use this:
$goAwayDate = time() – (60 * 60 * 24 * 7);
Credit: The Closet Entrepreneur
Display Latest Comments without a Plugin ?
Good rule of thumb when working with WordPress: don’t use a plugin if you can acheive the same functionality without one. Case in point: displaying latest comments on your blog. Sure, you could always install a plugin to do it for you, but you really don’t need to. In fact, it’s actually easier to display recent comments without a plugin. SImply add the following code to the desired location within your theme’s template files:
<?php global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,50) // NUMBER OF CHARACTERS
AS com_excerpt FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts
ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID)
WHERE comment_approved = '1'
AND comment_type = ''
AND post_password = ''
ORDER BY comment_date_gmt
DESC LIMIT 5"; // NUMBER OF COMMENTS
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
$output .= "\n<ul>";
foreach ($comments as $comment) {
$output .= "\n<li>"."<a href=\"" . get_permalink($comment->ID) .
"#comment-" . $comment->comment_ID . "\" title=\"on " .
$comment->post_title . "\">" .strip_tags($comment->comment_author)
.":<br/><div>" . strip_tags($comment->com_excerpt)
."</div></a></li>";
}
$output .= "\n</ul>";
$output .= $post_HTML;
echo $output;
?>
This code will display the 5 most recent comments in the following (X)HTML output format:
<ul>
<li>
<a href="http://domain.tld/post#comment-01" title="on Post Title">Comment Author:<br />
<div>This is the first 50 characters of the first most recent comment</div></a>
</li>
<li>
<a href="http://domain.tld/post#comment-01" title="on Post Title">Comment Author:<br />
<div>This is the first 50 characters of the first most recent comment</div></a>
</li>
<li>
<a href="http://domain.tld/post#comment-01" title="on Post Title">Comment Author:<br />
<div>This is the first 50 characters of the first most recent comment</div></a>
</li>
<li>
<a href="http://domain.tld/post#comment-01" title="on Post Title">Comment Author:<br />
<div>This is the first 50 characters of the first most recent comment</div></a>
</li>
<li>
<a href="http://domain.tld/post#comment-01" title="on Post Title">Comment Author:<br />
<div>This is the first 50 characters of the first most recent comment</div></a>
</li>
</ul>
By editing the commented lines in the PHP script, you may specify alternate number of comments and characters.
Source: StylizedWeb
Display Most Commented Posts without a Plugin ?
Here is another trick that will enable you avoid yet another needless plugin. This code results in the display of your most-commented posts in list format:
<ul>
<?php
$result = $wpdb->get_results("SELECT comment_count, ID, post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 10"); // NUMBER OF POSTS
foreach ($result as $topten) {
$postid = $topten->ID;
$title = $topten->post_title;
$commentcount = $topten->comment_count;
if ($commentcount != 0) {
?>
<li><a href="<?php echo get_permalink($postid); ?>"><?php echo $title ?></a></li>
<?php } } ?>
</ul>
This code may be modified to display any number of posts by changing the LIMIT from “10” to whatever you wish. You may also change the display order from DESC (descending order) to ASC (ascending order).
Once in place, this code will display a list of the 10 most-commented posts in the following (X)HTML output format:
<ul>
<li><a href="http://domain.tld/post-01/">Post Title 01</a></li>
<li><a href="http://domain.tld/post-02/">Post Title 02</a></li>
<li><a href="http://domain.tld/post-03/">Post Title 03</a></li>
.
.
.
</ul>
Source: StylizedWeb
Change Permalinks from Date-Based to Post-Date Only ?
Here is an HTAccess method for switching your permalinks from the lengthy date-based format (i.e., http://domain.tld/2009/03/03/post-name/) to the concise post-name format (i.e., http://domain.tld/post-name/).
To do so, first login to the WordPress Admin and switch your permalink structure from this:
/%year%/%monthnum%/%day%/%postname%/
..to this:
/%postname%/
This change will ensure that all future posts are located at the new post-name-only URL, but we still need to redirect all requests for existing posts via the old date-based URL format. This is easily accomplished with a single directive in your site’s root HTAccess file:
RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ http://domain.tld/$4
And that’s all there is to it! Remember to test vigorously to convince yourself that everything is working properly.
Source: Perishable Press
Test for Sub-Pages ?
Until WordPress includes an is_subpage() function, here is a manual method of testing for sub-pages:
<?php global $post;
if ( is_page() && $post->post_parent ) {
// subpage content goes here
} else {
// non-subpage content goes here
} ?>
Further, here are some other ways to use this method to test for different combinations of pages and sub-pages:
<?php if (is_page('about') || $post->post_parent == '1') {
$banner = 'business.png';
} elseif (is_page('archives') || $post->post_parent == '2') {
$banner = 'pleasure.png';
} elseif (is_page('contact') || $post->post_parent == '3') {
$banner = 'personal.png';
} else {
$banner = 'default.png';
} ?>
Note that the numbers “1”, “2”, and “3” represent the IDs of the target parent pages.
Multiple Widgetizable Sidebars ?
Instead of using multiple “if” statements to include multiple widgetizable areas, WPEngineer shows us how to do it a better way:
<?php // multiple widgetizable sidebars
if (function_exists('register_sidebar')) {
$sidebars = array('Home Sidebar', 'Post Sidebar', 'Page Sidebar');
foreach($sidebars as $name) {
register_sidebar(array('name'=> $name,
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgetTitle">',
'after_title' => '</h3>',
));
}
}
?>
Source: wpengineer
Remove Fancy Quotes from Comments ?
Prevent invalid markup and sloppy code by disabling WordPress’ automatic generation of “fancy” or “curly” quotes where they fail the most: your comments area.
Only one simple line of code is required, placed into your theme’s functions.php file:
remove_filter(‘comment_text’, ‘wptexturize’);
Source: WPRecipes.com
Display a List of All Untagged Posts ?
Here is an easy way to display a list of all untagged posts. All that’s required is a custom loop and a quick check of the get_the_tags variable. Here is the code to make it work:
<?php query_posts('orderby=title&order=asc&showposts=-1'); ?>
<?php if (have_posts()) : ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<?php $tag = get_the_tags(); if (!$tag) { ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php edit_post_link('Edit', ' ',''); ?></li>
<?php } ?>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Place that snippet into the theme file of your choice and navigate to that page in a browser to see a permlink-linked list of all posts that have not yet been tagged. Even better, next to each post title will be a an easy-access “Edit” link that will make it easy to quickly edit each of your untagged posts and add some tags, if necessary. Nothing on this planet could be easier. Almost.
Easy Display of Custom Headers, Footers, and Sidebars ?
WordPress 2.7 includes new functionality that makes it super-easy to include custom headers, footers, and sidebars into your theme. Normally, you include the default files with the following tags:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
These will include the files named “header.php”, “sidebar.php”, and “footer.php”, respectively.
Now, to include alternate versions of these files, simply include the name of the file as a parameter in its associated tag. Here is an example that should illustrate the idea:
<?php get_header('custom-header'); ?>
<?php get_sidebar('custom-sidebar'); ?>
<?php get_footer('custom-footer'); ?>
These will include the files named “custom-header.php”, “custom-sidebar.php”, and “custom-footer.php”, respectively.
We can now use this new functionality to get fine-grained with includes. For example, if we wanted to display a custom footer for the “Bananaz” category, we could use the following code:
<?php if is_category('Bananaz') {
get_footer('Bananaz');
} else {
get_footer();
} ?>
Source: WordPress Codex
A Better Way for Users to Logout ?
The old way of displaying a “Logout” link for your users looks like this:
<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout">Logout</a>
Now, since WordPress 2.7, we can simplify this hodgepodge with a sleeker, cleaner, built-in template tag:
<a href="<?php echo wp_logout_url(); ?>">Logout</a>
Sweetness.
Display a Custom Message on a Specific Date ?
Using a snippet of PHP, we can display a custom message (or any code, markup, or content) on a specific date:
<?php
if ((date('m') == 4) && (date('d') == 9)) { ?>
<p>Today is <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>!</p>
<?php } ?>
You could even use this technique to join in on CSS Naked Day by removing your stylesheet on that day. Simply wrap your CSS <link> as follows:
<?php // strip for CSS Naked Day
if ((date('m') !== 4) && (date('d') !== 9)) { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php } ?>
The possibilities are endless!
Display Three Columns of Posts ?
Displaying content in multiple columns is a much sought-after WordPress technique. There are some good tutorials around explaining various ways of doing the job, but this one is perhaps the easiest.
To display your posts in three columns, begin by segmenting your post with some HTML comments:
Lorem ipsum blah blah. This content appears before the three columns.
<!–column–>
This content will appear in the first column.
<!–column–>
This content will appear in the second column.
<!–column–>
This content will appear in the third column.
The next step is to create columns based on the markup comments. Open your theme file and include the following code within the loop:
<?php // multiple columns
$page_columns = explode("<–column–>", $post->post_content);
echo $page_columns[0]; // before columns
echo '<div class="first column">'.$page_columns[1].'</div>'; // first column
echo '<div class="second column">'.$page_columns[2].'</div>'; // second column
echo '<div class="third column">'.$page_columns[3].'</div>'; // third column
?>
That’s essentially all there is to it. To get the columns to actually look like columns, add something similar to the following in your CSS file:
/* column structure */
.column {
margin-right: 10px;
float: left;
width: 33%;
}
/* column styles */
column.first, column.second, column.third {}
The cool thing about this method is that you have full control over the layout of each particular post. Each column may contain as much or as little content as desired, and adding or removing columns is straightforward. Even better is that you can easily remove the column functionality and display your content in a single column by simply removing the custom code from the loop. The post markup consists of HTML comments, so they will be ignored if not acted upon from within the loop.
Source: Enhanced version of krimsly’s technique (via the WP Codex)
Disable WordPress Search Functionality ?
Disabling the WordPress search functionality is as simple as adding the following code to your functions.php file:
function fb_filter_query($query, $error = true) {
if (is_search()) {
$query->is_search = false;
$query->query_vars[s] = false;
$query->query[s] = false;
// to error
if ($error == true)
$query->is_404 = true;
}
}
if (!is_admin()) {
add_action('parse_query', 'fb_filter_query');
add_filter('get_search_form', create_function('$a', "return null;"));
}
In place, this code will disable the search form for your theme while leaving search functionality intact for the Admin area. As is, the $error variable is set to TRUE, which causes the function to display the theme’s error page. Setting this variable to FALSE will prevent the error message and keep the user on the same page.
Source: WPengineer
Display Posts with Specific Custom Fields ?
Displaying posts that are associated with a certain custom field is as easy as adding an “if” condition to your loop. Here is an example that checks for the presence of a custom field called “name-of-custom-field”. If such a custom field is associated with the post, the entire post is displayed; otherwise, only the excerpt is displayed.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $custom_field = get_post_custom_values("name-of-custom-field"); ?>
<?php if (isset($custom_field[0])) { ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php the_content(); ?>
<?php } else { ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php } ?>
<?php endwhile; endif; ?>
To get more specific and display only posts associated with a custom-field that is set to a certain value, we simply add an additional parameter to the “if” condition:
<?php if ((isset($custom_field[0])) && ($custom_field[0] == "name-of-value")) { ?>
Using that line of code, we modify our previous loop as follows:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $custom_field = get_post_custom_values("name-of-custom-field"); ?>
<?php if ((isset($custom_field[0])) && ($custom_field[0] == "name-of-value")) { ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php the_content(); ?>
<?php } else { ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php } ?>
<?php endwhile; endif; ?>
With this code, any post with a custom-field of “name-of-custom-field” that has a specific value of “name-of-value” will be displayed in its entirety. All other posts will be displayed as an excerpt.
Source: Perishable Press
How to Number Your Comments, Pingbacks, and Trackbacks in 2.7+ ?
Numbering comments, pingbacks, and trackbacks in WordPress versions 2.7 and greater requires two steps. First, you need to add a couple of parameters to your comments_template tag, which is used to display your comments template and normally located in your single.php file. Edit this tag so that it looks like this:
<?php comments_template('/comments.php',true); ?>
Once this is in place, you can display the number of your comments, pingbacks, trackbacks, and both using the following tags:
echo count($wp_query->comments_by_type['comment']); // display comment count
echo count($wp_query->comments_by_type['pingback']); // display pingback count
echo count($wp_query->comments_by_type['trackback']); // display trackback count
echo count($wp_query->comments_by_type['pings']); // display pingback and trackback count
comments_number('No Responses', 'One Response', '% Responses' ); // display total response count
These tags can be placed anywhere in your comments loop. For more information on how to implement this, check out our in-depth article at Digging into WordPress.
How to Number Your Comments Using the Classic Loop ?
Before, WordPress added the new comments API in version 2.7, the “classic” comment-loop mechanism was used. This loop still works in any version of WordPress, and is useful for extreme formatting of the comment display area. Numbering your comments in the classic loop is as easy as it is in the new-fangled loop. Here’s how:
In your comments.php file, add a counter variable ( <?php $i = 0; ?> ) just above the loop’s foreach statement, like so:
<?php $i = 0; ?>
<?php foreach ($comments as $comment) : ?>
Then, to increment the counter variable with each iteration of the loop, we add another snippet just below the foreach line, like so:
<?php $i = 0; ?>
<?php foreach ($comments as $comment) : ?>
<?php $i++; ?>
Everything is now set. To display the number of comments, simply echo the value of the counter variable anywhere within your comment loop. Here is an example:
There are comments so far!
Source: Digging into WordPress
Invite Readers to Comment via Feed ?
Nice little snippet showing how to invite your readers to leave a comment by clicking on a link within your feed. Just add the following code to your theme’s functions.php file:
// comment invite feed link
function rss_comment_footer($content) {
if (is_feed()) {
if (comments_open()) {
$content .= 'Comments are open! <a href="'.get_permalink().'">Add yours!</a>';
}
}
return $content;
}
In place, this function will output a link that says, “Comments are open! Add yours!” This message will be displayed at the end of each post for which comments are open. If comments are closed, no invite message is displayed.
Source: Hendry Lee
Display the Total Number of Users for Your Blog ?
Here is a tasty little snippet from WPRecipes that will enable you to display the total number of users for your WordPress-powered blog. All you need to do is place the following code in your theme file(s) where you would like to display your total number of users:
$users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
echo $users." registered users.";
Source: WPRecipes.com
Automatically Insert Content into Your WordPress Post Editor ?
Here is a nice way to automatically insert some custom content into your post editor. This makes it easy to add repetitive content to your posts while retaining the ability to make changes before publishing. To try it out, add the following code to your functions.php file:
<?php // auto-insert content to post editor
function my_editor_content($content) {
$content = "<h5>Thank you for your generous attention!</h5>.";
return $content;
}
add_filter('default_content', 'my_editor_content');
?>
This code will display a message thanking people for their generous attention, but you can easily edit the message to display whatever content (text/markup) that you wish. After configuring your message, open your WordPress text editor to see the automatically inserted content.
Source: Justin Tadlock
How to Prevent Duplicate Content ?
Unless you’re using excerpts for non-single page views, your post content is being displayed in your single pages, date-based archives, category archive, tags archives, author archives, and so on. From an SEO perspective, this “duplicate” content may be detrimental to your search-engine rankings.
To prevent duplicate content, we can conditionally display one of two <meta> tags depending on the type of page being displayed. Pages that we want to have indexed in the search engines will display a “meta-index” tag, while duplicate pages will display a “meta-noindex” tag.
To do this, simply add the following code to the <head> section of your theme’s header.php file:
<?php if ((is_home() && ($paged < 2 )) || is_single() || is_page() || is_category()) {
echo '<meta name="robots" content="index,archive,follow" />';
} else {
echo '<meta name="robots" content="noindex,noarchive,follow" />';
}
Once in place, this code effectively stops search engines from indexing all types of pages except for single-post, page-page, category-archive, and the first two index pages. These are considered by many to be the most effective pages to have indexed, but feel free to add or remove anything you see fit to customize the technique.
Source: Perishable Press
Conditionally Display Full Posts or Excerpts ?
By default, you can either display full-posts or excerpts when displaying your posts. This may be fine for common blogging purposes, but specialized blogs may find it beneficial to exercise control over which type of post format is displayed. Here’s how to conditionally display either full-post or excerpt based on the presence of a custom field named “full-post-display”.
To implement this technique, setup the following loop in your theme file(s):
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $customdisplay = get_post_custom_values("full-post-display"); ?>
<?php if (isset($customdisplay[0])) { ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php the_content(); ?>
<?php } else { ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php the_excerpt(); ?>
<?php } ?>
<?php endwhile; endif; ?>
Then, for any post that you would like to display with full-post formatting, simply add a custom-field of “full-post-display” and give it a value of “true”.
Display Related Posts without a Plugin ?
We don’t need no stinking plugins to display related posts! Here’s how to do the job using tags as the associative criteria.
Place the following code in your loop and take a nap or something:
<?php // related posts based on first tag of current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '<h3>Related Posts</h3>';
$first_tag = $tags[0]->term_id;
$args = array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts' => 7, // how many posts?
'caller_get_posts' => 1
);
$my_query = new WP_Query($args);
if ($my_query->have_posts()) { ?>
<ul>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php } ?>
<?php } ?>
Customize as needed. To change the number of posts, edit the line that says, “how many posts?”
Source: Enhanced version of the code provided by MichaelH (via WP Codex)
Drop-Dead Easy Styles for Author Comments ?
This is almost too easy. To make your Author comments stand out from the crowd in WordPress 2.7 or better, use this code to apply some custom CSS stylez:
li.bypostauthor {
background: red;
color: white;
}
li.byuser {
background: white;
color: black;
}
Display Upcoming Scheduled Posts ?
Here’s an easy way to display a list of posts that are scheduled to be published at some point in the future. Create a page called “Upcoming Posts” (or whatever), and use this code for the loop:
<?php query_posts('showposts=7&post_status=future'); ?>
<?php if (have_posts()) : ?>
<h3>Upcoming Scheduled Posts</h3>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><?php the_title(); ?> — <?php the_time('l, F j, Y'); ?></li>
<?php endwhile; ?>
</ul>
<?php else: ?>
<p>Nothing new in queue!</p>
<?php endif; ?>
In place, this code will output a list of all posts that exist within the database that have a post_status of “future”. I.e., anything that you have setup in draft mode that is set to auto-publish at a certain point in the future.
Display Automatic TinyURLs for Your Posts ?
Make it super-easy for your visitors to share the URL of your posts with their favorite social-media service. Providing an alternate “short” version of your URLs is possible using the free TinyURL service and a couple snippets of code.
To display short URLs at the end of your posts, place this code into your theme’s functions.php file:
function getTinyUrl($url) {
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
return $tinyurl;
}
Then, call the function and display the URL by placing this code into your single.php file in the desired location within the loop:
<?php $turl = getTinyUrl(get_permalink($post->ID));
echo 'TinyURL for this post: <a href="'.$turl.'">'.$turl.'</a>'; ?>
That’s it! Your posts now feature super-short URLs for all of your tweet-hungry visitors. Tuper Tweet Tude!
Source: Perishable Press
Implement a Site-Maintenance Page for Your Blog ?
Ever do maintenance on your site? Certainly, we all do. Here’s an easy way to display a “site-maintenance” page that will display whatever content you desire. The key here is setting up your HTAccess file to handle the redirect properly.
First, you need to create your maintenance page. This can be as simple or as advanced as you would like. At minimum, you could include something like this into a file named “maintenance.html”:
<h1>Site Maintenance</h1>
<p>Please check back in 15 minutes</p>
Then, add this bit of voodoo to your site’s root htaccess file:
# SITE MAINTENANCE PAGE
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444
RewriteRule $/maintenance.html [R=302,L]
Once that’s in place, replace the example IP address with that of your own. Upload to your site and check it out. What you will see is that you have full access to your site, but all other visitors will see the maintenance page.
Once maintenance is complete, simply comment out the code in your htaccess file to allow visitors back into the site.
Source: Catswhocode
Display the First Image from Each of Your Posts ?
If your posts include an image that you would like to display as a thumbnail elsewhere on your blog, here is an easy way to do it with no custom fields required. Place the following code into your theme’s functions.php file:
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){
$first_img = "/images/default.jpg"; // default image
}
return $first_img;
}
Then, to call the function and display the images as thumbnails, place the following code into the desired location within your loop:
<?php echo catch_that_image(); ?>
That’s all there is to it. If you would like to display a default image for posts that may not have one, specify its path in the code (on the line that says “default image).
Source: WPRecipes
Display Most Popular Posts without a Plugin ?
Simple but effective method of displaying your blog’s most popular posts based on comment count. This code snippet may be placed anywhere within your theme’s files (i.e., no loop required). Check it out:
<h3>Popular Posts</h3>
<ul>
<?php $result = $wpdb->get_results("
SELECT comment_count, ID, post_title
FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 7
");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post->ID;
$title = $post->post_title;
$commentcount = $post->comment_count;
if ($commentcount != 0) { ?>
<li><a href="<?php echo get_permalink($postid); ?>">
<?php echo $title; ?></a> [<?php echo $commentcount ?>]</li>
<?php } ?>
<?php } ?>
</ul>
Once in place, this code will display the seven most popular posts along with their associated comment count in unordered list format. Customize according to your needs.
Source: ProBlogDesign (404 link removed 2013/09/15)
Automatically Highlight Search Terms ?
Make things easy for people who are searching your site by applying some custom styling to the search terms that are displayed in the search results. A common way to display search terms is with a yellow background so that users can easily identify locations of the text that may apply to their query. It’s all about about usability, and improving the way search results are displayed on your site. Here’s how to do it:
First, replace the the_title() tag in your search.php file with the following:
<?php // highlight search terms in title
$title = get_the_title();
$keys = explode(" ", $s);
$title = preg_replace('/('.implode('|',$keys).')/iu','<span class="search-terms">\0</span>',$title);
echo $title;
?>
This will setup styling for search terms located in the title of each result. Then, for the content, replace the the_excerpt() tag in your search.php file with the following:
<?php // highlight search terms in content
$excerpt = get_the_excerpt();
$keys = explode(" ", $s);
$excerpt = preg_replace('/('.implode('|',$keys).')/iu','<span class="search-terms">\0</span>',$excerpt);
echo $excerpt;
?>
Finally, open your theme’s CSS file and add some custom styles for the search terms. A great way to highlight each term is to display it in bold text with yellow highlighting. Something like this:
span.search-terms {
background: yellow;
font-weight: bold;
}
That’s all there is to it! Go run a few searches to see it in action.
Source: Enhanced version of code provided by Yoast.com
Automatically Disable Widgets ?
Quick tip to disable all widget functionality from your theme. Add the following to your functions.php file and call it done:
<?php // disable all widgets
function disable_all_widgets($sidebars_widgets) {
$sidebars_widgets = array(false);
return $sidebars_widgets;
}
add_filter('sidebars_widgets', 'disable_all_widgets');
?>
Source: Justin Tadlock
Display All Images from Your Post Content ?
Want to display all of the images from each of your posts somewhere on your blog? Easy. Check out this code snippet from Matt Varone:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$szPostContent = $post->post_content;
$szSearchPattern = '~<img [^\>]*\ />~';
// Run preg_match_all to grab all the images and save the results in $aPics
preg_match_all($szSearchPattern, $szPostContent, $aPics);
// Check to see if we have at least 1 image
$iNumberOfPics = count($aPics[0]);
if ($iNumberOfPics > 0) {
// now here you would do whatever you need to do with the images
// for this example the images are just displayed
for ( $i=0; $i < $iNumberOfPics ; $i++ ) {
echo $aPics[0][$i];
};
};
endwhile;
endif;
?>
Just customize the output in the second part of the code (see code comments) and paste the function wherever you would like to display the images. Sweetness.
Source: Matt Varone
Display Category List in Two Columns ?
Tired of that boring, single-column category display? Spice things up with a spiffy two-column category list that will get your visitors’ hearts pumping. Let’s deface a WordPress tag, shall we?
See this bad boy:
<?php wp_list_categories(); ?>
We’re going to blow it up, divide its contents into two pieces, and spit it all back out as two unordered lists. Impossible, you say? Nah, just a little PHP to make it all go.
Wherever you would like to display your categories in two columns, throw down the following code snippet:
<?php // display categories in columns
$cats = explode("<br />",wp_list_categories('title_li=&echo=0&depth=1&style=none'));
$cat_n = count($cats) – 1;
for ($i=0;$i<$cat_n;$i++) :
if ($i<$cat_n/2) :
$cat_left = $cat_left.'<li>'.$cats[$i].'</li>';
elseif ($i>=$cat_n/2):
$cat_right = $cat_right.'<li>'.$cats[$i].'</li>';
endif;
endfor; ?>
<ul class="left">
<?php echo $cat_left;?>
</ul>
<ul class="right">
<?php echo $cat_right;?>
</ul>
Completely awesome. Now let’s add some style to make the columns work:
.right {
float: left;
width: 140px;
}
.left {
float: left;
width: 140px;
}
You are all set. You should probably fine-tune this business until it’s all good. You know.
Source: Blog Oh Blog (404 link removed 2013/06/24)
Show Ads or Other Content Only in the First Three Posts ?
Advertising may require you to limit the number of advertisements on your page to three. For some, this is three too many. For others, it’s far too few. Still others feel that it’s just the right amount.
Regardless of your feelings, here is a trick that will enable you to limit the number of posts that displays some specific content – ads, images, scripts, whatever you want. Check out the three indented lines in the following loop:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ($wp_query->current_post < 3) { ?>
<!– any content here will be displayed only in first three posts –>
<?php } ?>
<?php endwhile; else: ?>
<?php endif; ?>
See what’s happening here. We’ve got a loop, see. In this loop, we specify a condition that says, “if this is one of the first three posts, display this content.” And that’s the magic. Of course, you can use whatever content you would like, and there is nothing special about the number “3” either.
Source: Blog Oh Blog (404 link removed 2013/06/24)
A Better Way to Display Recent Comments without a Plugin ?
Here is a better way to display your recent comments without a plugin. Instead of slapping a bunch of gnarly code into our index.php or sidebar.php file, we are going to slap it right where it belongs: in your theme’s functions.php file.
Here is the code, all exploded for your viewing and analytical pleasure (well, for mine anyway). For a more minified version of this snippet, be sure to check out the source link.
<?php // display recent comments without a plugin
function recent_comments($src_count=10, $src_length=60, $pre_HTML='<ul>', $post_HTML='</ul>') {
global $wpdb;
$sql = "
SELECT DISTINCT
ID,
post_title,
post_password,
comment_ID,
comment_post_ID,
comment_author,
comment_date_gmt,
comment_approved,
comment_type,
SUBSTRING(
comment_content, 1, $src_length
)
AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts
ON (
$wpdb->comments.comment_post_ID = $wpdb->posts.ID
)
WHERE comment_approved = '1'
AND comment_type = ''
AND post_password = ''
ORDER BY comment_date_gmt
DESC
LIMIT $src_count
";
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
foreach ($comments as $comment) {
$output .= '<li><a href="'.get_permalink($comment->ID).'#comment-'.$comment->comment_ID.'" title="on '.$comment->post_title.'">'.strip_tags($comment->com_excerpt).'…</a></li>';
}
$output .= $post_HTML;
echo $output;
} ?>
Ah, it’s a thing of beauty. Once you have that code in place, rock it out anywhere in your theme with this charming little tag:
<?php recent_comments(); ?>
see also: Display Latest Comments without a PluginSource: Blog Oh Blog (404 link removed 2013/06/24)
Selectively Disable Automatic Post Formatting ?
This trick is by far my favorite “stupid WordPress trick.” You know how WordPress likes to mangle HTML comments, empty elements, blockquotes, curly quotes, and other miscellaneous markup elements? Here is a tight little method that will enable you to selectively disable WordPress’ automatic post formatting.
Do this: Place the following code into your theme’s functions.php file:
// disable auto-formatting
function my_formatter($content) {
$new_content = '';
$pattern_full = '{(\[raw\].*?\[/raw\])}is';
$pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ($pieces as $piece) {
if (preg_match($pattern_contents, $piece, $matches)) {
$new_content .= $matches[1];
} else {
$new_content .= wptexturize(wpautop($piece));
}
}
return $new_content;
}
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'my_formatter', 99);
Then do this: Use the [raw] shortcode wherever you would like to disable auto-formatting in your post content. For example, if you wanted to prevent the following sentence from being formatted, you would write this:
[raw]This text will not be automatically formatted.[/raw]
Absolutely brilliant.
Source: WPRecipes
Browser Detection via WordPress’ body_class Function ?
WordPress makes it possible to detect a handful of different browsers using a variety of built-in global variables. WordPress also provides a body_class tag that outputs a variety of class attributes depending on various page properties. Why not combine these two techniques so that the user’s detected browser is added to the list of output classes for the body tag? Here’s the code that will do it via functions.php:
// browser detection via body_class
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';
elseif($is_IE) $classes[] = 'ie';
else $classes[] = 'unknown';
if($is_iphone) $classes[] = 'iphone';
return $classes;
}
add_filter('body_class','browser_body_class');
This code will output the detected browser along with the other body_class tags. Here is an example:
<body class="home blog logged-in safari">
Hooked.
Sources: Nathan Rice
Get Post or Page Contents as a PHP Variable ?
Here is a quick snippet for placing all post or page content into a variable. We’re talking the entire page contents here, not just the content of the post. Place this code into your theme’s functions.php file:
// post contents as variable
function callback($buffer) {
return $buffer;
}
function buffer_start() {
ob_start("callback");
}
function buffer_end() {
ob_end_flush();
}
add_action('wp_head', 'buffer_start');
add_action('wp_footer', 'buffer_end');
Once in place, this function will capture the entire page contents into a variable called “$buffer”. You may then do whatever you wish to this variable. Filter it, match it, slap it around a little and show it who’s boss. That sort of thing.
Source: Dagon DesignSee also: Digging into WordPress
Simple Example of How to Use WordPress Cron ?
I have been meaning to get into WordPress’ wp-cron functionality, and this looks like a good way to get started with it. This code snippet uses wp-cron to schedule an automatic email that will be sent every hour.
// send automatic scheduled email
if (!wp_next_scheduled('my_task_hook')) {
wp_schedule_event(time(), 'hourly', 'my_task_hook');
}
add_action('my_task_hook', 'my_task_function');
function my_task_function() {
wp_mail('you@yoursite.com', 'Automatic email', 'Hello, this is an automatically scheduled email from WordPress.');
}
Of course, this is meant only as an example. The key here is to schedule and event and then hook into it with some specific function.
Source: slaven.net (404 link removed 2013/02/04)
Add More Default Avatar Choices to the WordPress Admin ?
Here is a quick and easy way to add more default avatars to the list of available gravatars in the Settings area of the WordPress Admin. Here is the functions.php code to make it happen:
// add more default avatars to options
if (!function_exists('fb_addgravatar')) {
function fb_addgravatar($avatar_defaults) {
$myavatar1 = get_bloginfo('template_directory').'/images/avatar-01.png';
$avatar_defaults[$myavatar1] = 'dude';
$myavatar2 = get_bloginfo('template_directory').'/images/avatar-02.png';
$avatar_defaults[$myavatar2] = 'geek';
$myavatar3 = get_bloginfo('template_directory').'/images/avatar-03.png';
$avatar_defaults[$myavatar3] = 'cool';
return $avatar_defaults;
}
add_filter('avatar_defaults', 'fb_addgravatar');
}
See the innermost indented lines of code? There we are specifying three additional default avatars. To use this code, you will need to edit these lines to match your image paths and the name for each avatar. Hopefully the process of editing, adding, or removing avatars is clear. If not, don’t hesistate to speak up in the comments and someone will help you out.
Source: WPEngineer
Add a Private Page to Your Navigation Menu ?
By default, any pages that you classify as “Private” are not displayed in the menu generated by the wp_list_pages function. In general this is a good idea, but it might be helpful to include the link if the logged in user is able to read private pages. Fortunately, WordPress has a function that will enable us to do exactly that:
<ul>
<?php // add a private page to your navigation menu
wp_list_pages('depth=1&title_li=0&sort_column=menu_order');
if(current_user_can('read_private_pages')) : ?>
<li><a href="<?php echo get_permalink(10); ?>">For Authors only</a></li>
<?php endif; ?>
</ul>
Place this code where you would normally include the wp_list_pages tag and enjoy private-page links displayed in your navigation menus only for those users who are logged in and priviledged enough to see them. The private link will not be displayed for the “ordinary” folk.
Make sure you replace the number “10” in the middle line to match the ID of the private page you would like to include.
Source: WPEngineer
How to Add Additional Links to wp_list_pages ?
Here is a nice way to include additional links to the output of the wp_list_pages tag. All that’s needed is the following function in your functions.php file:
// include additional links
function add_bookmarks_to_menu($output) {
$bookmarks = (array) get_bookmarks('hide_invisible=0&category_name=wp_list_pages');
foreach ($bookmarks as $bookmark) {
$output .= "<li><a href='{$bookmark->link_url}' title='{$bookmark->link_name}'>{$bookmark->link_name}</a></li>\n";
}
return $output;
}
add_filter('wp_list_pages', 'add_bookmarks_to_menu');
Here we are taking advantage of WordPress’ built-in Links/Bookmarks functionality to assign new links to the output of the wp_list_pages tag. Once this code is in place, login to your WordPress Admin and follow these steps for each link that you would like to add to the page list:
In the Admin, go to Links > Add New
Enter a name and URL for your link
Add the link to a new category called “wp_list_pages”
select “Keep this link private”
Click “Add Link”
Done.
Using the “wp_list_pages” category for any/all of our extra links will enable us to include only links from that category. Further, selecting the “Keep this link private” option will prevent the links from being displayed elsewhere in your site (for example, in the Links/Blogroll/Bookmark sections).
Source: sivel.net
“I’ve got blisters on my fingers!”
..as the man once said.
Instant karma
inShare4
Share with others
About this post
Author: Jeff Starr
Archived: December 01, 2009
Updated: Jun 8th, 2014
Category: PHP, WordPress
Tags: tips, tricks, tutorials
Check the sidebar for related posts »
Check it out
The Tao of WordPress
Comments
« Previous 1 … 3 4 5
Patrix January 5, 2010 at 8:54 pm
Awesome post.
My theme lacks a functions.php file. When I created one and uploaded it, it was populated by some functions that I did not recognize. When I added one of the codes you mentioned above, I got an error saying, Headers Already Sent or something like that.
Actu-Rock January 6, 2010 at 2:04 pm
Really useful! Thanks
Lee Peterson January 11, 2010 at 5:13 pm
4 hours later….
Finally reached the end. Thanks for the awesome roundup!!
Maxence January 22, 2010 at 6:50 am
Best wordpress tricks page! Kind of link that everyone should Bookmark thanks you very much for sharing this, this is gonna save my life!
Steve G. January 24, 2010 at 1:39 pm
This collection of WordPress Tricks is very useful. Thank you for sharing all this!
shoaib hussain February 11, 2010 at 8:12 am
thnx a lot ,had 2 bookmark so that i could grab more fun later on
Mark February 12, 2010 at 11:46 am
Very usefull article! Thanks!
« Previous 1 … 3 4 5
Comments are closed. Contact the author with questions or further information.
« Getting Serious with a New Design
The New Clearfix Method »
RSS Feed Google+ Facebook LinkedIn Tumblr Twitter WordPress.org
Create limitless wordpress design with only one themeWordPress Social Sharing Optimization (with SEO, Video, and eCommerce Integration)Canvas – a popular & hard-working WordPress themeWeb Hosting UK WordPress Hosting Advertise Here
Related Posts
Stupid Twitter Tricks
WordPress Custom Fields, Part II: Tips and Tricks
Display the Total Number of WordPress Posts, Comments, and Categories
Stupid htaccess Tricks
Stupid htaccess Tricks Redux
Easily Adaptable WordPress Loop Templates
Backwards-Compatible Spam and Delete Buttons for WordPress
USP Pro The Tao of WordPress .htaccess made easy
Popular Posts
5G Blacklist 2013
Blackhole for Bad Bots
Stupid WordPress Tricks
Stupid htaccess Tricks
How to Block Tough Proxies
Better Robots.txt for WordPress
The Power of HTML5 and CSS3
Premium WordPress Themes
Recent Comments
Graham: Your "Print Menu in a Theme File" is wrong: 'Main Menu', 'container_id' => 'cssmenu', 'walker' => new CSS_Menu_Walker() )); ?> Should read: 'Main…
robert: how to change the size? now is full wide i want to make it smaller i tried by: #cssmenu { …
Bill Wynne: I am surely going to download it and give it a try. Some of my older blogs don't have menus…
Isa: Very nice tutorial! But I think there is a little mistake in your code. I didn't download it. I used the…
Selvam: Really handy CSS to add dropdown menu without plugin. Will it possible to add mega menu with Pure CSS?
rajat gupta: very nice menus. i have downloaded the file. will use it and revert with feedback soon.
Geoff Jackson: As for alternative recommendations for Dropbox, you may wish to check out Google Drive. Works in pretty much the same…
Projects
Monzilla Media
Plugin Planet
CSSresetr
eChunks
WP-Mix
xyCSS
Develop Secure WP Sites
Books
The Tao of WordPress
Digging into WordPress
.htaccess made easy
WordPress Themes In Depth
Links
9rules Network
DivineCSS
Jeff Starr (aka Perishable) Jeff Starr (aka Perishable)
About the site
Perishable Press is the work of Jeff Starr, professional developer, designer, author, and publisher with over 10 years of experience. Check out some of Jeff's books and projects, follow on Twitter, or learn more »
Fun fact: Perishable Press has been online since 2005, and now features over 700 articles and more than 11,000 comments. More stats »
© 2005-2014 Perishable Press
Sitemap
Site Credits
Web Design by Monzilla Media
Latest Tweets USP Pro v1.8 now available! plugin-planet.com/usp-pro-vers… #wordpress x
<end node> 5P9i0s8y19Z
dt=
<node>Ten Things Every WordPress Plugin Developer Should Know
2
http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/
Ten Things Every WordPress Plugin Developer Should Know
<!DOCTYPE html>
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<title>Ten Things Every WordPress Plugin Developer Should Know | Smashing Magazine</title>
<style type="text/css">article,body,div,figure,form,h1,h2,h3,h4,html,img,label,li,nav,p,span,strong,ul{font-size:100%;vertical-align:baseline;margin:0;padding:0;outline:0;border:0;background:0 0}html{overflow-y:scroll;overflow-x:hidden}body{overflow:hidden;line-height:1.46em;max-width:2000px;color:#333;background-image:url(http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/smbg.png)}a{font-size:100%;text-decoration:none;vertical-align:baseline;margin:0;padding:0;background:0 0;color:#41b7d8}a:active{color:#fff;background-color:#e53b2c}.pap a,br+em a,figcaption a,li a,p a{border-bottom:.07em solid rgba(0,0,0,.1);padding-bottom:.07em}.pmd a,nav a{padding-bottom:0;border:0}img{max-width:100%;height:auto;border:0}.clearfix:after,.clearfix:before{content:"\0020";height:0;visibility:hidden}svg:not(:root){overflow:hidden}ul{list-style:none}ol{list-style:decimal}article ul{list-style:disc}article li ol,article li ul{margin:0 1.5em}article ol,article ul{margin:.5em 1.5em}article li{padding:.25em 0}input{vertical-align:middle}button,input[type=submit],label{cursor:pointer}button,input{margin:0}button{font-size:1em;vertical-align:top;overflow:visible;outline:0;padding:.75em 2em;border:.07em solid #c73a11;color:#fff;background:-webkit-gradient(linear,left top,left bottom,from(#e85c33),to(#e53a2b));background:-webkit-linear-gradient(top,#e85c33 0,#e53a2b 100%);background:linear-gradient(to bottom,#e85c33 0,#e53a2b 100%);border-radius:.5em;-webkit-transition:border-color .3s;transition:border-color .3s}input[type=text]:placeholder{color:#999}input[type=text]{font-size:1em;line-height:1.5em;margin-bottom:1em;outline:0;padding:.5em;color:#777;border:.07em solid rgba(0,0,0,.1);background-color:#fff;border-radius:.5em 0 0 .5em;-webkit-transition:all .3s;transition:all .3s}@-ms-viewport{width:device-width}canvas{-ms-touch-action:double-tap-zoom}body,button,input,label{font-family:"Proxima Nova Regular","Segoe UI",Roboto,"Droid Sans","Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:400}.cahe,.cat h3,.category .cat h2,h4,strong{font-family:'Proxima Nova Bold',"Segoe UI",Roboto,"Droid Sans","Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:700}.ed+p,.pmd .a,.pmd+p{font-family:"Skolar Regular","Roboto Slab","Droid Serif",Cambria,Georgia,"Times New Roman",Times,serif;font-weight:400;font-style:normal}.ed+p em,.pmd+p em{font-family:'Skolar Italic',"Roboto Slab","Droid Serif",Cambria,Georgia,"Times New Roman",Times,serif;font-weight:400;font-style:italic}.ed+p strong,.pmd+p strong{font-family:'Skolar Bold',"Roboto Slab","Droid Serif",Cambria,Georgia,"Times New Roman",Times,serif;font-weight:700;font-style:normal}h2,h3{font-family:"Skolar Bold","Segoe UI Bold","Roboto Slab","Droid Serif",AvenirNext-Bold,"Avenir Bold",Georgia,"Times New Roman",Times,serif;font-weight:700;font-style:normal}.ch,.mise,.nw,.po,.sb,.short,.sn{display:none}.ad .declare,.cahe,.clearfix:after,.clearfix:before,.long,.mini a,.pmd li,article,figure,label,nav{display:block}.cat h3+p a,.lt a{display:inline-block}.clearfix:after{clear:both}.declare,.mini,.pt img,.sr{float:left}.awithus,.gra,.ntb,.stb{float:right}.awithus,.cat h3+p a,.pt img,button,div,form,li,ul{position:relative}.mnb,.pt{position:absolute}.cat h3+p a{border-radius:.25em}.avatar{border-radius:50%}.pt img{border-radius:.3125em}.cat h3+p a,.pt img{-webkit-transition:all .3;transition:all .3}.mini{padding:1.125em 0 1em 5.5%;z-index:8}.mini a{width:58%}.sr{font:0/0 a;height:0;visibility:hidden}.mnb{top:0;right:1em;padding-top:1.5em;z-index:9}.ntb,.stb{text-indent:100%;overflow:hidden;width:2.625em;height:2.25em;margin-right:.75em;-webkit-tap-highlight-color:transparent;border:.07em solid #c73a11;border-radius:.25em;-webkit-box-shadow:0 .07em .07em rgba(0,0,0,.25);box-shadow:0 .07em .07em rgba(0,0,0,.25)}.stb{background:url(http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/search-icon.svg) no-repeat 50% 50%,#e95c33;background-size:1.875em auto;-webkit-background-size:auto auto}.ntb{background:url(http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/nav-icon.svg) no-repeat 50% 50%,#e95c33;background-size:1.875em auto;-webkit-background-size:auto auto}.cc,.post{margin-bottom:2em}.fluid{padding-bottom:1.5em;border:.07em solid rgba(0,0,0,.1);background-color:#fff;-webkit-box-shadow:0 0 .625em .07em rgba(0,0,0,.05);box-shadow:0 0 .625em .07em rgba(0,0,0,.05)}.grid{margin-top:1.25em}.post{padding:.5em 5.5% 4em;border-bottom:.3125em solid #41b7d8}h2{font-size:2em;line-height:1.1em}h2 a{color:#333}.cahe{font-size:.45em;line-height:1.5em;letter-spacing:.07em;padding-bottom:.5em;color:#41b7d8}.archived h2,.author-page h2{width:92%}.ed+p,.pmd .a,.pmd+p{font-size:1.25em;line-height:1.35em;margin:0}h3{font-size:1.5em;line-height:1.3em}h4{letter-spacing:.125em}.cahe,h4{text-transform:uppercase}h3,h4{padding:1.5em 0 .5em}figure img,p,p img{padding:.5em 0}figure{margin:1.5em 0}br+em,figcaption{font-size:.875em;color:#a8a8a8}.pmd{padding-bottom:2em;margin:0}.pmd li{padding:1em 2em 0 1.5em;color:rgba(0,0,0,.3)}.pmd .a{padding:.5em .5em .5em 0;border-bottom:.07em solid #e5e5e5}.date{background:url(data:image/gif;base64,R0lGODlhEAAQAMQAAOZCM/GTi/KclepiVvfDvvnV0uxxZv719OhRROlaTepfU/a+uetlWfCOhe+JgPvf3P76+vzo5vOknva6tfSuqPnRzeU9Lu57cfjKxu+HfuxuY/Wzre11avvh3////+U7LCH5BAAAAAAALAAAAAAQABAAAAVkoCd6T6N8FiNE4wg1Xyx/gNB63Kx/zbjpIh3GEwEAPTrEQbIL6iaGJlKXSegUzplhcBVxZ5fLjuA5fGOBye6zKFtjFQhi3SbEGCI7PQoojChGawBkLQVnMhoPNyMFEg4OEh03IQA7) 0 1.2em no-repeat}.tags{background:url(data:image/gif;base64,R0lGODlhEAAQAMQAAP77+upeUeZCM/76+v74+Pa8t/zs5/jIw+dHOOtpRO+HfutpXvfDvvvh3+ZENudLPfOljva4svGTivzo5u6CY/nRxelcM+U7LP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAQABAAAAVKICaOZDleaIpiVkuqKuue8Npab33JOF3zud8tCAP6ikOfAJEyilIRRjP5vChEkhVk9gwQRIPFDkDpiRwN0uQhMiRIBdNhVDHZSyEAOw==) 0 1.2em no-repeat}.tags a:after{content:", "}.tags a:last-child:after{content:""}.comments{background:url(data:image/gif;base64,R0lGODlhEAAQAMQAAOZBMu+GfedKPOlXSutnW/jKxvSuqO+JgPa8t/rY1fWzrf/9/eU9LvSspvvh3+xuY/CMg/3t6+56cP729edNQPnV0vOjnPrc2vOnofnRzehQQv76+vKakvKel////+U7LCH5BAAAAAAALAAAAAAQABAAAAVOoCeOZGme52Q81PdpkrKVneDet9CMAe7fHI/lR/woBsUfAZD0DQhNnKQQdQEqHgOjCUCMLgGmDwBxmCIIzOHwABRQpMUgASdl6PXR4hQCADs=) 0 1.2em no-repeat}.cat{border-top:.625em solid;border-bottom:.08em solid;border-color:#e5e5e5;margin:2em 5.5% 3em;padding:1em 0 1.25em}.cat h2{margin-bottom:.5em}.cat h3{font-size:1.25em}.cat h3+p a{padding:.25em .5em;margin:0 .5em .5em 0;color:#fff;background:#a1a1a1}.gra{padding:1.25em .75em 1.25em 1.5em}.sf label{font-weight:400;padding:1.1em 0 .75em;color:rgba(0,0,0,.25)}.sf button{line-height:2.25em;left:-.3125em;width:23%;height:2.375em;padding:0 1%;border-left:0;border-radius:0 .5em .5em 0}.sf input[type=text]{width:73%;height:1.5em;padding:.375em 0 .375em 2%;margin-bottom:0;border-right:0}.declare{margin:.875em 0 .5em;color:rgba(0,0,0,.25)}.awithus{margin-top:.875em;z-index:9}.ad .declare{float:none;padding:1em 0 .5em;margin-top:0}#cad{width:18.75em;height:15.625em}.pt{top:0;right:-2em;z-index:9}.pt img{border:.1875em solid #fff;-webkit-box-shadow:0 .07em .1875em rgba(0,0,0,.3);box-shadow:0 .07em .1875em rgba(0,0,0,.3)}@media screen and (min-width:31.25em){.mini{width:75%}.pmd li{display:inline-block}.pmd .a{display:block}}@media screen and (min-width:38.125em){.mini{width:60%}.grid{clear:both;padding:.5em 0}}@media screen and (min-width:40.625em){body{font-size:1.1875em}.ad{float:right;margin:0 0 1em 2em;width:15em}#cad{width:15.78947em;height:13.1579em}article img,article object,figure{max-width:26.31579em;height:auto}}@media screen and (min-width:50em){body{font-size:1em;border-left:.625em solid transparent}.mini,.mnb{display:none}.ch,.mise,.nw,.nw a,.sn{display:block}.ch,.main{float:right}.cc,.ch li,.col,.nw,.nw li{float:left}.nw{width:79%;margin-bottom:-.07em}.nw li{border-right:.07em solid rgba(0,0,0,.05)}.nw li a{padding:2.5em 1em .5em;height:1.75em;color:rgba(0,0,0,.3);background-color:transparent;-webkit-transition:color .3s,background-color .3s;transition:color .3s,background-color .3s}.nw li.cody a{background-image:url(http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/navilittlebook.png);background-repeat:no-repeat;background-position:right .125em}.nw .current{z-index:2;width:24%;border:.07em solid rgba(0,0,0,.1);border-top:0;border-bottom:0;background:#fff;-webkit-box-shadow:0 -.9375em .625em .07em rgba(0,0,0,.025);box-shadow:0 -.9375em .625em .07em rgba(0,0,0,.025)}.nw .current a{padding:1.5em 1em 0;height:3.3125em;-webkit-transition:none;transition:none}.nw .current a:hover{background-color:#fff}.nw .current img{position:relative;top:-.125em}.ch{margin:2.5em 4% 0 0;z-index:50}.ch li{margin-left:.625em}.ch li a{text-indent:100%;overflow:hidden;white-space:nowrap;display:block;width:1.4375em;height:1.4375em;background-image:url(http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/channels.svg);-webkit-background-size:353% 600%;background-size:353% 600%;opacity:.45;-webkit-transition:all .3s;transition:all .3s}.rss a{background-position:76% 35.5%}.fb a{background-position:76% 62%}.tw a{background-position:76% 90%}.nl a{background-position:76% 9%}.cc{width:100%}.main{width:80%;padding:0;margin-top:1.5em}.author .main,.category .main,.tag .main{margin:0 0 1.5em}.mise form{margin:1em 0 2em 5.5%}.mise input[type=text]{height:1.125em;padding:1em 2.5%}.mise button{line-height:3.125em;width:17.5%;height:3.25em}.sn{width:20%}.sct{margin:2em 0}.sn ul{margin-left:-.07em}.sn li{border-left-width:.625em;border-left-style:solid;padding-bottom:2.25em;-webkit-transition:border-color .3s;transition:border-color .3s}.sn li a{font-family:'Proxima Nova Bold',"Segoe UI",Roboto,"Droid Sans","Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:700;text-transform:uppercase;letter-spacing:.175em;color:#333;padding:.25em .5em .25em 20%;display:block;border-bottom:.07em solid transparent;-webkit-transition:background-color .3s;transition:background-color .3s}.sn li li{border:0;margin-left:.07em;padding-bottom:.25em}.sn li li a{font-family:"Proxima Nova Regular","Segoe UI",Roboto,"Droid Sans","Helvetica Neue",Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:0;text-transform:none;color:#888;border:0;padding-left:20%;margin:0;-webkit-transition:color .3s,background-color .3s;transition:color .3s,background-color .3s}.menu-item-coding{border-left-color:#c9e9e5}.menu-item-design{border-left-color:#cdeeaa}.menu-item-mobile{border-left-color:#f9f0a8}.menu-item-graphics{border-left-color:#e0cfdf}.menu-item-uxdesign{border-left-color:#faced2}.menu-item-wordpress{border-left-color:#bcd8f0}.cat{padding-left:5.5%;padding-right:5.5%}.post{padding-left:11%}article img,figure{max-width:31.25em}.ad{width:18.75em}#cad{width:18.75em;height:15.625em}}@media screen and (min-width:63.75em){.mise{display:none}.nw .current{width:21%}.ch{margin-right:1em}.main{width:100%;margin-top:-.5em}.post{padding-left:5.5%}.sn{width:100%;margin-top:0;margin-bottom:0}.sct{margin-top:-.5em}.sn ul{margin:1em 0 0;padding:0 0 0 5.5%;border-bottom:.3125em solid rgba(0,0,0,.06)}.sn li{border-left-width:0;border-right:.07em solid #e5e5e5;border-bottom-width:.3125em;border-bottom-style:solid;margin-bottom:-.3125em;padding-bottom:0;float:left}.sn li:last-child{border-right:0}.sn li a{font-size:.75em;color:#333;border:0;padding:.75em .9em}.sn li ul{display:none}.menu-item-coding{border-bottom-color:#c9e9e5}.menu-item-design{border-bottom-color:#cdeeaa}.menu-item-mobile{border-bottom-color:#f9f0a8}.menu-item-graphics{border-bottom-color:#e0cfdf}.menu-item-uxdesign{border-bottom-color:#faced2}.menu-item-wordpress{border-bottom-color:#bcd8f0}h2{padding-top:.5em}.cc{margin-right:-28.125em}.fluid{margin-right:28.125em;border-radius:0 .625em .625em 0}.cat{padding-left:0;padding-right:0;margin-top:2em;margin-right:5.5%}.sb{display:block;z-index:3}.side{padding:0 0 0 1.25em;width:26.25em;top:-3.325em}.bw{margin:0 0 1.25em}.bw .awithus{margin-right:.5em}.faw{margin-top:1.5em}.bnnr-list{clear:both}.bnnr-list li{font-size:.75em;text-align:center;width:48%;display:inline-block;margin:0 2% 1em 0}.bnnr-list a{border-bottom:0}.bnnr-list .double{width:34.16667em}.wg{clear:both;margin:1.5em 0 1.5em -1.25em;padding:0 1.25em 2em;border:.07em solid rgba(0,0,0,.1);border-left:none;background:rgba(255,255,255,.55);border-radius:0 .625em .625em 0}.wg.sf{top:0}.wg.sf form{margin:.75em 0 1em}.wg.sf input[type=text]{width:66%}.wg.sf button{width:30%}.wg li{list-style:none;border-bottom:.07em solid rgba(0,0,0,.05);padding:1em 0}.wg h3{padding-left:2.5em;position:relative}.wg h3 a{position:relative}.wg h3 img{position:absolute;left:-2.5em}.so div{margin-top:.5em;border-bottom:.08em solid rgba(0,0,0,.05)}.so p{line-height:1.55em;padding-top:1.125em;overflow:hidden}.fir{padding:0 1.5em 1.75em 0}.sec{padding-bottom:1.75em}.so img{float:left;overflow:hidden;margin:1.5em 1.5em 0 0;border-radius:.5em}}@media screen and (min-width:76.25em){.nw{width:50%}.nw .current{width:29%}.nw .current img{top:-.4375em}.main{width:78%;margin-top:1.8%}.author .main,.category .main,.tag .main{margin-top:4%}.post{padding-top:0}.author .post,.category .post,.tag .post{padding-left:11%}.sn{width:22%;margin-top:4%}.sct{margin:0 0 1em -.07em;z-index:99}.sn ul{display:block;margin:0;padding:0 2.5% 0 0;border-bottom:none}.sn li{border-bottom:0;border-right:0;border-left-width:.625em;border-left-style:solid;float:none;margin-bottom:0;padding-bottom:2.25em}.sn li a{font-size:1em;width:auto!important;border:none;border-bottom:.07em solid transparent;display:block;padding:.25em .5em .25em 25%}.sn li ul{display:block;padding:0;margin-left:-.07em}.sn li ul li{padding-bottom:0;border:0}.sn li ul li a{margin-top:0;padding-left:25%;border:none}.menu-item-coding{border-left-color:#c9e9e5}.menu-item-design{border-left-color:#cdeeaa}.menu-item-mobile{border-left-color:#f9f0a8}.menu-item-graphics{border-left-color:#e0cfdf}.menu-item-uxdesign{border-left-color:#faced2}.menu-item-wordpress{border-left-color:#bcd8f0}.cat{margin-top:0;padding-left:5.5%;padding-right:5.5%}.ch{margin-right:28.125em}}@media screen and (min-width:90.625em){body{border:none}.sf{top:1.65em;padding-bottom:1em}.sf label{margin:1.5em 0 0;padding-top:0}.tn{float:left;width:10%}.nw{width:auto;float:none;margin-bottom:0}.nw li{float:none;border:none;border-bottom:.07em solid rgba(0,0,0,.1)}.nw li a{padding:1em 0 .625em 1.375em}.nw .current{border:.07em solid rgba(0,0,0,.1);border-right:.07em solid #fff;border-left:none;margin:.6em -.07em 0 0;width:auto}.nw .current a{padding:1.5em 0 1em 1.5em;height:auto}.nw .current img{top:0;left:-.5em}.ch{float:none;margin:1.25em 0 0 .875em}.ch li{margin-left:0;margin-right:.5em}.sct{margin-top:-.07em}.cc{width:90%;border-top:.625em solid transparent}.fluid{border-radius:0 .625em .625em}.grid{margin-top:2.3em}.side{top:0}}@media screen and (min-width:100em){body{font-size:1.15em}.post{padding-left:11%;padding-right:11%}.sn{margin-top:3.65%}.sn ul li ul{margin-left:-.07em}.ch{margin:1.5em 0 0 1.5em}.ad,.ch{font-size:.86957em}.wg{margin-left:-1.08696em}.cc{margin-right:-24.45652em}.fluid{margin-right:24.45652em}.side{width:22.82609em;padding-left:1.08696em}.bnnr-list .double{width:29.71015em}article p{padding:.75em 0}article li{padding:.5em 0}article img,figure{max-width:27.17391em}.cat{margin-left:5.5%}.pt{top:-.5em;right:-5em}}@media screen and (min-width:63.75em) and (max-width:70.3125em){.long{display:none}.short{display:block}}</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8">
<!– Favicon –>
<link rel="icon" type="image/x-icon" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/favicon.ico" /><link rel="shortcut icon" type="image/x-icon" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/favicon.ico" /><link type="image/x-icon" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/favicon.ico" />
<!– Windows 8 Tiles and Feed –>
<meta name="application-name" content="Smashing Magazine"/>
<meta name="msapplication-TileColor" content="#e53b2c"/>
<meta name="msapplication-square70x70logo" content="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/smashing-windows-icon-70-70.png"/>
<meta name="msapplication-square150x150logo" content="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/smashing-windows-icon-150-150.png"/>
<meta name="msapplication-wide310x150logo" content="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/smashing-windows-icon-310-150.png"/>
<meta name="msapplication-square310x310logo" content="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/smashing-windows-icon-310-310.png"/>
<meta name="msapplication-notification" content="frequency=30;polling-uri=http://notifications.buildmypinnedsite.com/?feed=http://www.smashingmagazine.com/feed/&id=1;polling-uri2=http://notifications.buildmypinnedsite.com/?feed=http://www.smashingmagazine.com/feed/&id=2;polling-uri3=http://notifications.buildmypinnedsite.com/?feed=http://www.smashingmagazine.com/feed/&id=3;polling-uri4=http://notifications.buildmypinnedsite.com/?feed=http://www.smashingmagazine.com/feed/&id=4;polling-uri5=http://notifications.buildmypinnedsite.com/?feed=http://www.smashingmagazine.com/feed/&id=5; cycle=1"/>
<!– iOS Icons –>
<link rel="apple-touch-icon-precomposed" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/apple-touch-icon-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="57×57" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/apple-touch-icon-57×57-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="72×72" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/apple-touch-icon-72×72-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="114×114" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/apple-touch-icon-114×114-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="144×144" href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/apple-touch-icon-144×144-precomposed.png" />
<!– This site is optimized with the Yoast WordPress SEO plugin v1.5.2.7 – https://yoast.com/wordpress/plugins/seo/ –>
<meta name="description" content="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."/>
<link rel="canonical" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/" />
<link rel="publisher" href="https://plus.google.com/+SmashingMagazine?"/>
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Ten Things Every WordPress Plugin Developer Should Know – Smashing Magazine" />
<meta property="og:description" content="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." />
<meta property="og:url" content="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/" />
<meta property="og:site_name" content="Smashing Magazine" />
<meta property="article:publisher" content="https://www.facebook.com/smashmag" />
<meta property="article:tag" content="Essentials" />
<meta property="article:tag" content="PHP" />
<meta property="article:tag" content="Plugins" />
<meta property="article:tag" content="Techniques (WP)" />
<meta property="article:section" content="WordPress" />
<meta property="article:published_time" content="2011-03-08T05:35:31+01:00" />
<meta property="article:modified_time" content="2014-04-25T13:28:41+02:00" />
<meta property="og:updated_time" content="2014-04-25T13:28:41+02:00" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/images/post-pictures/wordpress-blue-illu.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/03/wordpress_plugin.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-black1.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-globals1.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-profiler1.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-sql1.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-errors1.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/general-settings-same-url.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/general-settings-different-url.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/admin-menu-options-page.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/admin-menu-custom.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/plugin-action-links-none.jpg" />
<meta property="og:image" content="http://www.smashingmagazine.com/wp-content/uploads/2011/02/plugin-action-links-settings.jpg" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@smashingmag"/>
<meta name="twitter:domain" content="Smashing Magazine"/>
<meta name="twitter:creator" content="@arcware"/>
<meta name="twitter:image:src" content="http://www.smashingmagazine.com/wp-content/uploads/images/post-pictures/wordpress-blue-illu.jpg"/>
<!– / Yoast WordPress SEO plugin. –>
<link rel="alternate" type="application/rss+xml" title="Smashing Magazine » Feed" href="http://www.smashingmagazine.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Smashing Magazine » Comments Feed" href="http://www.smashingmagazine.com/comments/feed/" />
<link rel="alternate" type="application/rss+xml" title="Smashing Magazine » Ten Things Every WordPress Plugin Developer Should Know Comments Feed" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/feed/" />
<link rel='shortlink' href='http://www.smashingmagazine.com/?p=111255' />
<script type="text/javascript">!function(){function e(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function t(e){return window.localStorage&&localStorage.font_css_cache&&localStorage.font_css_cache_file===e}function n(){if(window.localStorage&&window.XMLHttpRequest)if(t(o))a(localStorage.font_css_cache);else{var n=new XMLHttpRequest;n.open("GET",o,!0),e(n,"load",function(){4===n.readyState&&(a(n.responseText),localStorage.font_css_cache=n.responseText,localStorage.font_css_cache_file=o)}),n.send()}else{var c=document.createElement("link");c.href=o,c.rel="stylesheet",c.type="text/css",document.getElementsByTagName("head")[0].appendChild(c),document.cookie="font_css_cache"}}function a(e){var t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}var o="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/stylesheets/webfonts.min.css?ver=1.1.0";window.localStorage&&localStorage.font_css_cache||document.cookie.indexOf("font_css_cache")>-1?n():e(window,"load",n)}();</script>
<!–[if IE 8]><script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><link href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/stylesheets/ie8-nu.css" media="all" rel="stylesheet" type="text/css" /><![endif]–>
<noscript><link href="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/stylesheets/main.min.css?ver=2014.14.0" rel="stylesheet" media="all" type="text/css" /></noscript>
</head>
<body class="single single-post postid-111255 single-format-standard www-section">
<nav id="top" class="tn clearfix">
<div class="mini">
<h1><span class="sr">Smashing Magazine</span><a href="http://www.smashingmagazine.com/"><img src="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/logo.png" alt="Smashing Magazine" title="Jump to the front page" /></a></h1>
</div>
<div class="mnb">
<a href="#mn" class="ntb">Menu</a> <a href="#ms" class="stb">Search</a>
</div> <ul id="menu-network-menu" class="nw clearfix"><li class="current"><a href="http://www.smashingmagazine.com"><img src="http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/images/logo.png" alt="Smashing Magazine" title="Jump to the front page" /></a></li><li id="menu-item-77918" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-77918 menu-item-books"><a href="http://www.smashingmagazine.com/books/">Books</a></li>
<li id="menu-item-78659" class="cody menu-item menu-item-type-post_type menu-item-object-page menu-item-78659 menu-item-ebooks"><a href="http://www.smashingmagazine.com/ebooks/">eBooks</a></li>
<li id="menu-item-85386" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-85386 menu-item-workshops"><a href="http://www.smashingmagazine.com/smashing-workshops/">Workshops</a></li>
<li id="menu-item-2" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2 menu-item-job-board"><a href="http://jobs.smashingmagazine.com/">Job Board</a></li>
</ul>
<ul class="ch">
<li class="rss"><a href="http://www.smashingmagazine.com/feed/" title="Subscribe to our RSS-feed (120K)">RSS</a></li>
<li class="fb"><a href="http://www.facebook.com/smashmag" title="Join our Facebook page! (221k)">Facebook</a></li>
<li class="tw"><a href="http://twitter.com/smashingmag" title="Follow us on Twitter! (811k)">Twitter</a></li>
<li class="nl"><a href="http://www.smashingmagazine.com/the-smashing-newsletter/" title="Subscribe to our Email Newsletter (180k)">Newsletter</a></li>
</ul></nav>
<div class="cc"><div class="fluid clearfix"><div class="grid clearfix">
<div class="mise sf clearfix" >
<form id="search" method="get" action="http://www.smashingmagazine.com/search-results/" target="_top">
<input name="q" type="text" placeholder="e.g. JavaScript" />
<button class="search_submit" type="submit">Search</button>
<input type="hidden" name="cx" value="partner-pub-6779860845561969:5884617103">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="UTF-8">
</form>
</div><div class="col sn">
<nav class="sct"><ul id="menu-category-menu" class="clearfix"><li id="menu-item-116" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-116 menu-item-coding"><a href="http://www.smashingmagazine.com/category/coding/">Coding</a>
<ul class="sub-menu">
<li id="menu-item-2014" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2014 menu-item-css"><a href="http://www.smashingmagazine.com/tag/css/">CSS</a></li>
<li id="menu-item-134810" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-134810 menu-item-html"><a href="http://www.smashingmagazine.com/tag/html/">HTML</a></li>
<li id="menu-item-2015" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2015 menu-item-javascript"><a href="http://www.smashingmagazine.com/tag/javascript/">JavaScript</a></li>
<li id="menu-item-2016" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2016 menu-item-techniques"><a href="http://www.smashingmagazine.com/tag/techniques/">Techniques</a></li>
</ul>
</li>
<li id="menu-item-117" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-117 menu-item-design"><a href="http://www.smashingmagazine.com/category/design/">Design</a>
<ul class="sub-menu">
<li id="menu-item-2017" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2017 menu-item-web-design"><a href="http://www.smashingmagazine.com/tag/web-design/">Web Design</a></li>
<li id="menu-item-2032" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2032 menu-item-typography"><a href="http://www.smashingmagazine.com/tag/typography/">Typography</a></li>
<li id="menu-item-2063" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2063 menu-item-inspiration"><a href="http://www.smashingmagazine.com/tag/inspiration/">Inspiration</a></li>
<li id="menu-item-2120" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2120 menu-item-business"><a href="http://www.smashingmagazine.com/tag/business/">Business</a></li>
</ul>
</li>
<li id="menu-item-119" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-119 menu-item-mobile"><a href="http://www.smashingmagazine.com/category/mobile/">Mobile</a>
<ul class="sub-menu">
<li id="menu-item-142132" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-142132 menu-item-iphone-ipad"><a href="http://www.smashingmagazine.com/tag/ios/">iPhone & iPad</a></li>
<li id="menu-item-143596" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143596 menu-item-android"><a href="http://www.smashingmagazine.com/tag/android/">Android</a></li>
<li id="menu-item-143608" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143608 menu-item-design-patterns"><a href="http://www.smashingmagazine.com/tag/design-patterns/">Design Patterns</a></li>
</ul>
</li>
<li id="menu-item-118" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-118 menu-item-graphics"><a href="http://www.smashingmagazine.com/category/graphics/">Graphics</a>
<ul class="sub-menu">
<li id="menu-item-2264" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2264 menu-item-photoshop"><a href="http://www.smashingmagazine.com/tag/photoshop/">Photoshop</a></li>
<li id="menu-item-160" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-160 menu-item-fireworks"><a href="http://www.smashingmagazine.com/category/fireworks/">Fireworks</a></li>
<li id="menu-item-2283" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2283 menu-item-wallpapers"><a href="http://www.smashingmagazine.com/tag/wallpapers/">Wallpapers</a></li>
<li id="menu-item-2305" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-2305 menu-item-freebies"><a href="http://www.smashingmagazine.com/tag/freebies/">Freebies</a></li>
</ul>
</li>
<li id="menu-item-120" class="menu-item-uxdesign menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-120 menu-item-ux-design"><a href="http://www.smashingmagazine.com/category/uxdesign/">UX Design</a>
<ul class="sub-menu">
<li id="menu-item-143609" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143609 menu-item-usability"><a href="http://www.smashingmagazine.com/tag/usability/">Usability</a></li>
<li id="menu-item-143610" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143610 menu-item-user-experience"><a href="http://www.smashingmagazine.com/tag/user-experience/">User Experience</a></li>
<li id="menu-item-143611" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143611 menu-item-ui-design"><a href="http://www.smashingmagazine.com/tag/ui/">UI Design</a></li>
<li id="menu-item-143612" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143612 menu-item-e-commerce"><a href="http://www.smashingmagazine.com/tag/e-commerce/">E-Commerce</a></li>
</ul>
</li>
<li id="menu-item-121" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-has-children menu-item-121 menu-item-wordpress"><a href="http://www.smashingmagazine.com/category/wordpress/"><span class="long"><span>Word</span><span>Press</span></span><span class="short">WP</span></a>
<ul class="sub-menu">
<li id="menu-item-143677" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143677 menu-item-essentials"><a href="http://www.smashingmagazine.com/tag/essentials/">Essentials</a></li>
<li id="menu-item-143678" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143678 menu-item-techniques"><a href="http://www.smashingmagazine.com/tag/techniques-wp/">Techniques</a></li>
<li id="menu-item-143679" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143679 menu-item-plugins"><a href="http://www.smashingmagazine.com/tag/plugins/">Plugins</a></li>
<li id="menu-item-143680" class="menu-item menu-item-type-taxonomy menu-item-object-post_tag menu-item-143680 menu-item-themes"><a href="http://www.smashingmagazine.com/tag/themes/">Themes</a></li>
</ul>
</li>
</ul></nav></div>
<div class="col main single">
<article class="post-111255 post type-post status-publish format-standard has-post-thumbnail hentry category-wordpress tag-essentials tag-php tag-plugins tag-techniques-wp post">
<h2><a href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/" rel="bookmark" title="Read 'Ten Things Every WordPress Plugin Developer Should Know'">Ten Things Every WordPress Plugin Developer Should Know</a></h2>
<ul class="pmd clearfix">
<li class="a">By <a rel="author" class="poa" href="http://www.smashingmagazine.com/author/dave-donaldson/?rel=author" title="Posts by Dave Donaldson">Dave Donaldson</a></li>
<li class="date">March 8th, 2011</li>
<li class="tags"><a href="http://www.smashingmagazine.com/tag/essentials/">Essentials</a><a href="http://www.smashingmagazine.com/tag/php/">PHP</a><a href="http://www.smashingmagazine.com/tag/plugins/">Plugins</a></li>
<li class="comments"><a href="#comments" title="Comment on Ten Things Every WordPress Plugin Developer Should Know">94 Comments</a> </li>
</ul>
<div class="ad ed">
<span class="declare">Advertisement</span>
<div id="cad"></div>
</div>
<p>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 <strong>WordPress plugin development</strong>, and this article is a culmination of the things I think every WordPress plugin developer should know. Oh, and keep in mind everything you see here is compatible with WordPress 3.0+.</p>
<h3>Don’t Develop Without Debugging</h3>
<p>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. When things go wrong, WordPress raises warnings and error messages, but if you can’t see them then they might as well have not been raised at all.
<p><a href="http://www.smashingmagazine.com/wp-content/uploads/2011/03/wordpress_plugin.jpg"><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/03/wordpress_plugin.jpg" alt="Screenshot" title="WordPress_Plugins" width="500" /></a><sup class="po" id="note-1"><a href="#1">1</a></sup></p>
<p>Enabling debugging also turns on WordPress notices, which is important because that’s how you’ll know if you’re using any deprecated functions. Deprecated functions may be removed from future versions of WordPress, and just about every WordPress release contains functions slated to die at a later date. If you see that you are using a deprecated function, it’s best to find its replacement and use that instead.</p>
<h4>How to Enable Debugging</h4>
<p>By default, WordPress debugging is turned off, so to enable it, open <strong>wp-config.php</strong> (tip: make a backup copy of this file that you can revert to later if needed) in the root of your WordPress installation and look for this line:</p>
<pre><code class="language-php">define('WP_DEBUG', false);</code></pre>
<p>Replace that line with the following:</p>
<pre><code class="language-php">// Turns WordPress debugging on
define('WP_DEBUG', true);
// Tells WordPress to log everything to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Doesn't force the PHP 'display_errors' variable to be on
define('WP_DEBUG_DISPLAY', false);
// Hides errors from being displayed on-screen
@ini_set('display_errors', 0);</code></pre>
<p>With those lines added to your wp-config.php file, debugging is fully enabled. Here’s an example of a notice that got logged to /wp-content/debug.log for using a deprecated function:</p>
<p><em>[15-Feb-2011 20:09:14] PHP Notice: get_usermeta is <strong>deprecated</strong> since version 3.0! Use get_user_meta() instead. in C:CodePluginswordpresswp-includesfunctions.php on line 3237</em></p>
<p>With debugging enabled, <strong>keep a close eye on /wp-content/debug.log</strong> as you develop your plugin. Doing so will save you, your users, and other plugin developers a lot of headaches.</p>
<h4>How to Log Your Own Debug Statements</h4>
<p>So what about logging your own debug statements? Well, the simplest way is to use <code>echo</code> and see the message on the page. It’s the quick-and-dirty-hack way to debug, but everyone has done it one time or another. A better way would be to create a function that does this for you, and then you can see all of your own debug statements in the debug.log file with everything else.</p>
<p>Here’s a function you can use; notice that it only logs the message if WP_DEBUG is enabled:</p>
<pre><code class="language-php">function log_me($message) {
if (WP_DEBUG === true) {
if (is_array($message) || is_object($message)) {
error_log(print_r($message, true));
} else {
error_log($message);
}
}
}</code></pre>
<p>And then you can call the <code>log_me</code> function like this:</p>
<pre><code class="language-php">log_me(array('This is a message' => 'for debugging purposes'));
log_me('This is a message for debugging purposes');</code></pre>
<h4>Use the BlackBox Debug Bar Plugin</h4>
<p>I only recently discovered this plugin, but it’s already been a huge help as I work on my own plugins. The <a href="http://ditio.net/2011/01/29/wordpress-debug-bar-plugin-blackbox/">BlackBox</a><sup class="po" id="note-2"><a href="#2">2</a></sup> plugin adds a thin black bar to the top of any WordPress post or page, and provides quick access to errors, global variables, profile data, and SQL queries.</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-black1.jpg" alt="" title="debug-bar-black" width="525" height="27" class="alignnone size-full wp-image-90255" /></p>
<p>Clicking on the Globals tab in the bar shows all of the global variables and their values that were part of the request, essentially everything in the $_GET, $_POST, $_COOKIE, $_SESSION, and $_SERVER variables:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-globals1.jpg" alt="" title="debug-bar-globals" width="525" height="353" class="alignnone size-full wp-image-90251" /></p>
<p>The next tab is the Profiler, which displays the time that passed since the profiler was started and the total memory WordPress was using when the checkpoint was reached:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-profiler1.jpg" alt="" title="debug-bar-profiler" width="525" height="98" class="alignnone size-full wp-image-90252" /></p>
<p>You can add your own checkpoints to the Profiler by putting this line of code anywhere in your plugin where you want to capture a measurement:</p>
<pre><code class="language-php">apply_filters('debug', 'This is a checkpoint');</code></pre>
<p>Perhaps the most valuable tab in the BlackBox plugin is the SQL tab, which shows you all of the database queries that executed as part of the request. Very useful for determining long-running database calls:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-sql1.jpg" alt="" title="debug-bar-sql" width="525" height="176" class="alignnone size-full wp-image-90253" /></p>
<p>And finally we have the Errors tab, which lists all of the notices, warnings, and errors that occurred during the request:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/debug-bar-errors1.jpg" alt="" title="debug-bar-errors" width="525" height="111" class="alignnone size-full wp-image-90250" /></p>
<p>By providing quick access to essential debug information, the BlackBox plugin is a big-timer when it comes to debugging your WordPress plugin.</p>
<h3>Prefix Your Functions</h3>
<p>One of the first things that bit me when I started developing WordPress plugins was finding out that other plugin developers sometimes use the same names for functions that I use. For example, function names like <code>copy_file()</code>, <code>save_data()</code>, and <code>database_table_exists()</code> have a decent chance of being used by other plugins in addition to yours.</p>
<p>The reason for this is because when WordPress activates a plugin, PHP loads the functions from the plugin into the WordPress execution space, where all functions from all plugins live together. There is no separation or isolation of functions for each plugin, which means that <strong>each function must be uniquely named</strong>.</p>
<p>Fortunately, there is an easy way around this, and it’s to name all of your plugin functions with a prefix. For example, the common functions I mentioned previously might now look like this:</p>
<pre><code class="language-php">function myplugin_copy_file() {
}
function myplugin_save_data() {
}
function myplugin_database_table_exists() {
}</code></pre>
<p>Another common naming convention is to use a prefix that is an abbreviation of your plugin’s name, such as “My Awesome WordPress Plugin”, in which case the function names would be:</p>
<pre><code class="language-php">function mawp_copy_file() {
}
function mawp_save_data() {
}
function mawp_database_table_exists() {
}</code></pre>
<p>There is one caveat to this, however. If you use PHP classes that contain your functions (which in many cases is a good idea), you don’t really have to worry about clashing with functions defined elsewhere. For example, let’s say you have a class in your plugin named “CommonFunctions” with a <code>copy_file()</code> function, and another plugin has the same <code>copy_file()</code> function defined, but not in a class. Invoking the two functions would look similar to this:</p>
<pre><code class="language-php">// Calls the copy_file() function from your class
$common = new CommonFunctions();
$common->copy_file();
// Calls the copy_file() function from the other plugin
copy_file();</code></pre>
<p><strong>By using classes, the need to explicitly prefix your functions goes away.</strong> Just keep in mind that WordPress will raise an error if you use a function name that’s already taken, so keep an eye on the debug.log file to know if you’re in the clear or not.</p>
<h3>Global Paths Are Handy</h3>
<p>Writing the PHP code to make your plugin work is one thing, but if you want to make it look and feel good at the same time, you’ll need to include some images, CSS, and perhaps a little JavaScript as well (maybe in the form of a jQuery plugin). And in typical fashion, you’ll most likely organize these files into their own folders, such as “images”, “css”, and “js”.</p>
<p>That’s all well and good, but how should you code your plugin so that it can always find those files, no matter what domain the plugin is running under? The best way that I’ve found is to <strong>create your own global paths</strong> that can be used anywhere in your plugin code.</p>
<p>For example, I always create four global variables for my plugins, one each for the following:</p>
<ul>
<li>The path to the theme directory</li>
<li>The name of the plugin</li>
<li>The path to the plugin directory</li>
<li>The url of the plugin</li>
</ul>
<p>For which the code looks like this:</p>
<pre><code class="language-php">if (!defined('MYPLUGIN_THEME_DIR'))
define('MYPLUGIN_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());
if (!defined('MYPLUGIN_PLUGIN_NAME'))
define('MYPLUGIN_PLUGIN_NAME', trim(dirname(plugin_basename(__FILE__)), '/'));
if (!defined('MYPLUGIN_PLUGIN_DIR'))
define('MYPLUGIN_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . MYPLUGIN_PLUGIN_NAME);
if (!defined('MYPLUGIN_PLUGIN_URL'))
define('MYPLUGIN_PLUGIN_URL', WP_PLUGIN_URL . '/' . MYPLUGIN_PLUGIN_NAME);</code></pre>
<p>Having these global paths defined lets me write the code below in my plugin anywhere I need to, and I know it will resolve correctly for any website that uses the plugin:</p>
<pre><code class="language-php">$image = MYPLUGIN_PLUGIN_URL . '/images/my-image.jpg';
$style = MYPLUGIN_PLUGIN_URL . '/css/my-style.css';
$script = MYPLUGIN_PLUGIN_URL . '/js/my-script.js';</code></pre>
<h3>Store the Plugin Version for Upgrades</h3>
<p>When it comes to WordPress plugins, one of the things you’ll have to deal with sooner or later is upgrades. For instance, let’s say the first version of your plugin required one database table, but the next version requires another table. How do you know if you should run the code that creates the second database table?</p>
<p>I suggest storing the plugin version in the WordPress database so that you can read it later to decide certain upgrade actions your plugin should take. To do this, you’ll need to create a couple more global variables and invoke the <code>add_option()</code> function:</p>
<pre><code class="language-php">if (!defined('MYPLUGIN_VERSION_KEY'))
define('MYPLUGIN_VERSION_KEY', 'myplugin_version');
if (!defined('MYPLUGIN_VERSION_NUM'))
define('MYPLUGIN_VERSION_NUM', '1.0.0');
add_option(MYPLUGIN_VERSION_KEY, MYPLUGIN_VERSION_NUM);</code></pre>
<p>I certainly could have simply called <code>add_option('myplugin_version', '1.0.0');</code> without the need for the global variables, but like the global path variables, I’ve found these just as handy for using in other parts of a plugin, such as a Dashboard or About page.</p>
<p>Also note that <code>update_option()</code> could have been used instead of <code>add_option()</code>. The difference is that <code>add_option()</code> does nothing if the option already exists, whereas <code>update_option()</code> checks to see if the option already exists, and if it doesn’t, it will add the option to the database using <code>add_option()</code>; otherwise, it updates the option with the value provided.</p>
<p>Then, when it comes time to check whether or not to perform upgrade actions, your plugin will end up with code that looks similar to this:</p>
<pre><code class="language-php">$new_version = '2.0.0';
if (get_option(MYPLUGIN_VERSION_KEY) != $new_version) {
// Execute your upgrade logic here
// Then update the version value
update_option(MYPLUGIN_VERSION_KEY, $new_version);
}</code></pre>
<h3>Use dbDelta() to Create/Update Database Tables</h3>
<p>If your plugin requires its own database tables, you will inevitably need to modify those tables in future versions of your plugin. This can get a bit tricky to manage if you’re not careful, but WordPress helps alleviate this problem by providing the <code>dbDelta()</code> function.</p>
<p>A useful feature of the <code>dbDelta()</code> function is that it can be used for both creating and updating tables, but according to the WordPress codex page <a href="http://codex.wordpress.org/Creating_Tables_with_Plugins">“Creating Tables with Plugins”</a><sup class="po" id="note-3"><a href="#3">3</a></sup>, it’s a little picky:</p>
<ul>
<li>You have to put each field on its own line in your SQL statement.</li>
<li>You have to have two spaces between the words PRIMARY KEY and the definition of your primary key.</li>
<li>You must use the keyword KEY rather than its synonym INDEX and you must include at least one KEY.</li>
</ul>
<p>Knowing these rules, we can use the function below to create a table that contains an ID, a name, and an email:</p>
<pre><code class="language-php">function myplugin_create_database_table() {
global $wpdb;
$table = $wpdb->prefix . 'myplugin_table_name';
$sql = "CREATE TABLE " . $table . " (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL DEFAULT '',
email VARCHAR(100) NOT NULL DEFAULT '',
UNIQUE KEY id (id)
);";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}</code></pre>
<p><em><strong>Important:</strong> The <code>dbDelta()</code> function is found in <strong>wp-admin/includes/upgrade.php</strong>, but it has to be included manually because it’s not loaded by default.</em></p>
<p>So now we have a table, but in the next version we need to expand the size of the name column from 100 to 250. Fortunately <code>dbDelta()</code> makes this straightforward, and using our upgrade logic previously, the next version of the plugin will have code similar to this:</p>
<pre><code class="language-php">$new_version = '2.0.0';
if (get_option(MYPLUGIN_VERSION_KEY) != $new_version) {
myplugin_update_database_table();
update_option(MYPLUGIN_VERSION_KEY, $new_version);
}
function myplugin_update_database_table() {
global $wpdb;
$table = $wpdb->prefix . 'myplugin_table_name';
$sql = "CREATE TABLE " . $table . " (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(250) NOT NULL DEFAULT '', // Bigger name column
email VARCHAR(100) NOT NULL DEFAULT '',
UNIQUE KEY id (id)
);";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}</code></pre>
<p>While there are other ways to create and update database tables for your WordPress plugin, it’s hard to ignore the flexibility of the <code>dbDelta()</code> function.</p>
<h3>Know the Difference Between include, include_once, require, and require_once</h3>
<p>There will come a time during the development of your plugin where you will want to put code into other files so that maintaining your plugin is a bit easier. For instance, a common practice is to create a functions.php file that contains all of the shared functions that all of the files in your plugin can use.</p>
<p>Let’s say your main plugin file is named myplugin.php and you want to include the functions.php file. You can use any of these lines of code to do it:</p>
<pre><code class="language-php">include 'functions.php';
include_once 'functions.php';
require 'functions.php';
require_once 'functions.php';</code></pre>
<p>But which should you use? It mostly depends on your expected outcome of the file not being there.</p>
<ul>
<li><strong>include:</strong> Includes and evaluates the specified file, throwing a warning if the file can’t be found.</li>
<li><strong>include_once:</strong> Same as include, but if the file has already been included it will not be included again.</li>
<li><strong>require:</strong> Includes and evaluates the specified file (same as include), but instead of a warning, throws a fatal error if the file can’t be found.</li>
<li><strong>require_once:</strong> Same as require, but if the file has already been included it will not be included again.</li>
</ul>
<p>My experience has been to always use <code>include_once</code> because a) how I structure and use my files usually requires them to be included once and only once, and b) if a required file can’t be found I don’t expect parts of the plugin to work, but it doesn’t need to break anything else either.</p>
<p>Your expectations may vary from mine, but it’s important to know the subtle differences between the four ways of including files.</p>
<h3>Use bloginfo(‘wpurl’) Instead of bloginfo(‘url’)</h3>
<p>By and large, WordPress is installed in the root folder of a website; it’s standard operating procedure. However, every now and then you’ll come across websites that install WordPress into a separate subdirectory under the root. Seems innocent enough, but the location of WordPress is critically important.</p>
<p>To demonstrate, in the “General Settings” section of the WordPress admin panel, you’ll find the “WordPress address (URL)” and “Site address (URL)” settings, and for sites where WordPress is installed into the root directory, they will have the exact same values:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/general-settings-same-url.jpg" alt="" title="general-settings-same-url" width="525" height="84" class="alignnone size-full wp-image-90926" /></p>
<p>But for sites where WordPress is installed into a subdirectory under the root (in this case a “wordpress” subdirectory), their values will be different:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/general-settings-different-url.jpg" alt="" title="general-settings-different-url" width="525" height="84" class="alignnone size-full wp-image-90925" /></p>
<p>At this stage it’s important to know the following:</p>
<ul>
<li><strong>bloginfo(‘wpurl’)</strong> equals the “WordPress address (URL)” setting</li>
<li><strong>bloginfo(‘url’)</strong> equals the “Site address (URL)” setting</li>
</ul>
<p>Where this matters is when you need to build URLs to certain resources or pages. For example, if you want to provide a link to the WordPress login screen, you could do this:</p>
<pre><code class="language-php">// URL will be http://mydomain.com/wp-login.php
<a href="<?php bloginfo('url') ?>/wp-login.php">Login</a></code></pre>
<p>But that won’t resolve to the correct URL in the scenario such as the one above where WordPress is installed to the “wordpress” subdirectory. To do this correctly, you must use <code>bloginfo('wpurl')</code> instead:</p>
<pre><code class="language-php">// URL will be http://mydomain.com/wordpress/wp-login.php
<a href="<?php bloginfo('wpurl') ?>/wp-login.php">Login</a></code></pre>
<p>Using <code>bloginfo('wpurl')</code> instead of <code>bloginfo('url')</code> is the safest way to go when building links and URLs inside your plugin because it works in both scenarios: when WordPress is installed in the root of a website and also when it’s installed in a subdirectory. Using <code>bloginfo('url')</code> only gets you the first one.</p>
<h3>How and When to Use Actions and Filters</h3>
<p>WordPress allows developers to add their own code during the execution of a request by providing various hooks. These hooks come in the form of actions and filters:</p>
<ul>
<li><strong>Actions</strong>: WordPress invokes actions at certain points during the execution request and when certain events occur.</li>
<li><strong>Filters</strong>: WordPress uses filters to modify text before adding it to the database and before displaying it on-screen.</li>
</ul>
<p>The number of actions and filters is quite large, so we can’t get into them all here, but let’s at least take a look at how they are used.</p>
<p>Here’s an example of how to use the <code>admin_print_styles</code> action, which allows you to add your own stylesheets to the WordPress admin pages:</p>
<pre><code class="language-php">add_action('admin_print_styles', 'myplugin_admin_print_styles');
function myplugin_admin_print_styles() {
$handle = 'myplugin-css';
$src = MYPLUGIN_PLUGIN_URL . '/styles.css';
wp_register_style($handle, $src);
wp_enqueue_style($handle);
}</code></pre>
<p>And here’s how you would use the <code>the_content</code> filter to add a “Follow me on Twitter!” link to the bottom of every post:</p>
<pre><code class="language-php">add_filter('the_content', 'myplugin_the_content');
function myplugin_the_content($content) {
$output = $content;
$output .= '<p>';
$output .= '<a href="http://twitter.com/username">Follow me on Twitter!</a>';
$output .= '</p>';
return $output;
}</code></pre>
<p>It’s impossible to write a WordPress plugin without actions and filters, and knowing what’s available to use and when to use them can make a big difference. See the WordPress codex page <a href="http://codex.wordpress.org/Plugin_API/Action_Reference">“Plugin API/Action Reference”</a><sup class="po" id="note-4"><a href="#4">4</a></sup> for the complete list of actions and the page <a href="http://codex.wordpress.org/Plugin_API/Filter_Reference">“Plugin API/Filter Reference”</a><sup class="po" id="note-5"><a href="#5">5</a></sup> for the complete list of filters.</p>
<p><em><strong>Tip:</strong> Pay close attention to the order in which the actions are listed on its codex page. While not an exact specification, my experimentation and trial-and-error has shown it to be pretty close to the order in which actions are invoked during the WordPress request pipeline.</em></p>
<h3>Add Your Own Settings Page or Admin Menu</h3>
<p>Many WordPress plugins require users to enter settings or options for the plugin to operate properly, and the way plugin authors accomplish this is by either adding their own settings page to an existing menu or by adding their own new top-level admin menu to WordPress.</p>
<h4>How to Add a Settings Page</h4>
<p>A common practice for adding your own admin settings page is to use the <code>add_menu()</code> hook to call the <code>add_options_page()</code> function:</p>
<pre><code class="language-php">add_action('admin_menu', 'myplugin_admin_menu');
function myplugin_admin_menu() {
$page_title = 'My Plugin Settings';
$menu_title = 'My Plugin';
$capability = 'manage_options';
$menu_slug = 'myplugin-settings';
$function = 'myplugin_settings';
add_options_page($page_title, $menu_title, $capability, $menu_slug, $function);
}
function myplugin_settings() {
if (!current_user_can('manage_options')) {
wp_die('You do not have sufficient permissions to access this page.');
}
// Here is where you could start displaying the HTML needed for the settings
// page, or you could include a file that handles the HTML output for you.
}</code></pre>
<p>By invoking the <code>add_options_page()</code> function, we see that the “My Plugin” option has been added to the built-in <strong>Settings</strong> menu in the WordPress admin panel:</p>
<p class="showcase"><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/admin-menu-options-page.jpg" alt="" title="admin-menu-options-page" width="147" height="207" class="alignnone size-full wp-image-91029" /></p>
<p>The <code>add_options_page()</code> function is really just a wrapper function on top of the <code>add_submenu_page()</code> function, and there are other wrapper functions that do similar work for the other sections of the WordPress admin panel:</p>
<ul>
<li>add_dashboard_page()</li>
<li>add_posts_page()</li>
<li>add_media_page()</li>
<li>add_links_page()</li>
<li>add_pages_page()</li>
<li>add_comments_page()</li>
<li>add_theme_page()</li>
<li>add_plugins_page()</li>
<li>add_users_page()</li>
<li>add_management_page()</li>
</ul>
<h4>How to Add a Custom Admin Menu</h4>
<p>Those wrapper functions work great, but what if you wanted to create your own admin menu section for your plugin? For example, what if you wanted to create a “My Plugin” admin section with more than just the Settings page, such as a Help page? This is how you would do that:</p>
<pre><code class="language-php">add_action('admin_menu', 'myplugin_menu_pages');
function myplugin_menu_pages() {
// Add the top-level admin menu
$page_title = 'My Plugin Settings';
$menu_title = 'My Plugin';
$capability = 'manage_options';
$menu_slug = 'myplugin-settings';
$function = 'myplugin_settings';
add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function);
// Add submenu page with same slug as parent to ensure no duplicates
$sub_menu_title = 'Settings';
add_submenu_page($menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);
// Now add the submenu page for Help
$submenu_page_title = 'My Plugin Help';
$submenu_title = 'Help';
$submenu_slug = 'myplugin-help';
$submenu_function = 'myplugin_help';
add_submenu_page($menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);
}
function myplugin_settings() {
if (!current_user_can('manage_options')) {
wp_die('You do not have sufficient permissions to access this page.');
}
// Render the HTML for the Settings page or include a file that does
}
function myplugin_help() {
if (!current_user_can('manage_options')) {
wp_die('You do not have sufficient permissions to access this page.');
}
// Render the HTML for the Help page or include a file that does
}</code></pre>
<p>Notice that this code doesn’t use any of the wrapper functions. Instead, it calls <code>add_menu_page()</code> (for the parent menu page) and <code>add_submenu_page()</code> (for the child pages) to create a separate “My Plugin” admin menu that contains the Settings and Help pages:</p>
<p class="showcase"><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/admin-menu-custom.jpg" alt="" title="admin-menu-custom" width="147" height="233" class="alignnone size-full wp-image-91091" /></p>
<p>One advantage of adding your own custom menu is that <strong>it’s easier for users to find the settings for your plugin</strong> because they aren’t buried within one of the built-in WordPress admin menus. Keeping that in mind, if your plugin is simple enough to only require a single admin page, then using one of the wrapper functions might make the most sense. But if you need more than that, creating a custom admin menu is the way to go.</p>
<h3>Provide a Shortcut to Your Settings Page with Plugin Action Links</h3>
<p>In much the same way that adding your own custom admin menu helps give the sense of a well-rounded plugin, plugin action links work in the same fashion. So what are plugin action links? It’s best to start with a picture:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/plugin-action-links-none.jpg" alt="" title="plugin-action-links-none" width="525" height="118" class="alignnone size-full wp-image-91097" /></p>
<p>See the “Deactivate” and “Edit” links underneath the name of the plugin? Those are plugin action links, and WordPress provides a filter named <code>plugin_action_links</code> for you to add more. Basically, <strong>plugin action links are a great way to add a quick shortcut to your most commonly used admin menu page</strong>.</p>
<p>Keeping with our Settings admin page, here’s how we would add a plugin action link for it:</p>
<pre><code class="language-php">add_filter('plugin_action_links', 'myplugin_plugin_action_links', 10, 2);
function myplugin_plugin_action_links($links, $file) {
static $this_plugin;
if (!$this_plugin) {
$this_plugin = plugin_basename(__FILE__);
}
if ($file == $this_plugin) {
// The "page" query string value must be equal to the slug
// of the Settings admin page we defined earlier, which in
// this case equals "myplugin-settings".
$settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=myplugin-settings">Settings</a>';
array_unshift($links, $settings_link);
}
return $links;
}</code></pre>
<p>With this code in place, now when you view your plugins list you’ll see this:</p>
<p><img src="http://www.smashingmagazine.com/wp-content/uploads/2011/02/plugin-action-links-settings.jpg" alt="" title="plugin-action-links-settings" width="550" height="118" class="alignnone size-full wp-image-91112" /></p>
<p>Here we provided a plugin action link to the Settings admin page, which is the same thing as clicking on Settings from our custom admin menu. The benefit of the plugin action link is that <strong>users see it immediately after they activate the plugin</strong>, thus adding to the overall experience.</p>
<h3>Additional Resources</h3>
<p>I’ve covered a lot in this article, but there’s plenty more out there to keep you busy awhile. The most comprehensive documentation for WordPress plugin development can be found on the <a href="http://codex.wordpress.org/">WordPress Codex</a><sup class="po" id="note-6"><a href="#6">6</a></sup>, a huge collection of pages documenting everything that is WordPress. Below are some of the more pertinent links from the codex you’ll need:</p>
<ul>
<li><a href="http://codex.wordpress.org/Writing_a_Plugin">Writing a Plugin</a><sup class="po" id="note-7"><a href="#7">7</a></sup> – If you’re brand new to WordPress plugin development, start here.</li>
<li><a href="http://codex.wordpress.org/Plugin_API/Action_Reference">Plugin API – Action Reference</a><sup class="po" id="note-8"><a href="#8">8</a></sup></li>
<li><a href="http://codex.wordpress.org/Plugin_API/Filter_Reference">Plugin API – Filter Reference</a><sup class="po" id="note-9"><a href="#9">9</a></sup></li>
<li><a href="http://codex.wordpress.org/Pluggable_Functions">Pluggable Functions</a><sup class="po" id="note-10"><a href="#10">10</a></sup></li>
<li><a href="http://codex.wordpress.org/Data_Validation">Data Validation</a><sup class="po" id="note-11"><a href="#11">11</a></sup></li>
</ul>
<p>I also suggest reading Joost de Valk’s article “<a href="http://www.smashingmagazine.com/2010/07/30/lessons-learned-from-maintaining-a-wordpress-plug-in/">Lessons Learned From Maintaining a WordPress Plug-In</a><sup class="po" id="note-12"><a href="#12">12</a></sup>“, which provides more good tips on WordPress plugin development.</p>
<p><em>(vf) (ik)</em></p>
<h4 class="po">Footnotes</h4><ol class="po"><li id="#1"><a href="#note-1">1 http://www.smashingmagazine.com/wp-content/uploads/2011/03/wordpress_plugin.jpg</a></li><li id="#2"><a href="#note-2">2 http://ditio.net/2011/01/29/wordpress-debug-bar-plugin-blackbox/</a></li><li id="#3"><a href="#note-3">3 http://codex.wordpress.org/Creating_Tables_with_Plugins</a></li><li id="#4"><a href="#note-4">4 http://codex.wordpress.org/Plugin_API/Action_Reference</a></li><li id="#5"><a href="#note-5">5 http://codex.wordpress.org/Plugin_API/Filter_Reference</a></li><li id="#6"><a href="#note-6">6 http://codex.wordpress.org/</a></li><li id="#7"><a href="#note-7">7 http://codex.wordpress.org/Writing_a_Plugin</a></li><li id="#8"><a href="#note-8">8 http://codex.wordpress.org/Plugin_API/Action_Reference</a></li><li id="#9"><a href="#note-9">9 http://codex.wordpress.org/Plugin_API/Filter_Reference</a></li><li id="#10"><a href="#note-10">10 http://codex.wordpress.org/Pluggable_Functions</a></li><li id="#11"><a href="#note-11">11 http://codex.wordpress.org/Data_Validation</a></li><li id="#12"><a href="#note-12">12 http://www.smashingmagazine.com/2010/07/30/lessons-learned-from-maintaining-a-wordpress-plug-in/</a></li></ol> <div id="textadtarget"></div>
<div class="lt">
<a href="http://www.smashingmagazine.com/tag/essentials/">Essentials</a><a href="http://www.smashingmagazine.com/tag/php/">PHP</a><a href="http://www.smashingmagazine.com/tag/plugins/">Plugins</a> </div>
<p><a href="#top" class="top single" title="Jump to the top of the page">↑ Back to top</a><a class="sot single" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.smashingmagazine.com%2F2011%2F03%2F08%2Ften-things-every-wordpress-plugin-developer-should-know%2F&source=tweetbutton&text=Ten%20Things%20Every%20WordPress%20Plugin%20Developer%20Should%20Know&url=http%3A%2F%2Fwww.smashingmagazine.com%2F2011%2F03%2F08%2Ften-things-every-wordpress-plugin-developer-should-know%2F&via=smashingmag" title="Share on Twitter!">Share on Twitter</a></p>
</article>
<div class="bio clearfix">
<div class="grv">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/5d1c4c4bffa1f1133b17dc54f7bf40d1?s=78&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D78&r=G" class="avatar avatar-78 photo" height="78" width="78" /> </div>
<div class="about">
<a rel="author" class="poa" href="http://www.smashingmagazine.com/author/dave-donaldson/?rel=author" title="Posts by Dave Donaldson">Dave Donaldson</a> <p>Dave lives in Columbus, OH and is one of the founders of <a href="http://maxfoundry.com/">Max Foundry</a>, a company that makes WordPress plugins for <a href="http://maxfoundry.com/plugins/maxlanding/">landing pages</a>, <a href="http://maxfoundry.com/plugins/maxsqueeze/">squeeze pages</a>, <a href="http://maxfoundry.com/plugins/maxsales/">sales pages</a>, and <a href="http://maxfoundry.com/plugins/maxab/">A/B testing</a>. You can <a href="http://twitter.com/arcware">follow Dave on Twitter</a> and <a href="http://arcware.net">on his blog</a>, where he writes about living the bootstrapped startup life.</p>
</div>
</div>
<div class="ras clearfix">
<h2>Related Articles</h2>
<div class="ra clearfix">
<a class="pp" href="http://www.smashingmagazine.com/2014/09/25/the-ultimate-guide-to-choosing-a-wordpress-host/"><img width="84" height="84" src="http://www.smashingmagazine.com/wp-content/uploads/2014/09/illu-wp-14.jpg" class="attachment-related-thumb wp-post-image" alt="illu-wp-14" /></a>
<h3><a href="http://www.smashingmagazine.com/2014/09/25/the-ultimate-guide-to-choosing-a-wordpress-host/">The Ultimate Guide To Choosing A WordPress Host</a></h3>
</div>
<div class="ra clearfix">
<a class="pp" href="http://www.smashingmagazine.com/2014/08/27/customizing-wordpress-archives-categories-terms-taxonomies/"><img width="84" height="84" src="http://www.smashingmagazine.com/wp-content/uploads/2014/08/wordpress-blue-illu.jpg" class="attachment-related-thumb wp-post-image" alt="wordpress-blue-illu" /></a>
<h3><a href="http://www.smashingmagazine.com/2014/08/27/customizing-wordpress-archives-categories-terms-taxonomies/">Customizing WordPress Archives For Categories, Tags And Other Taxonomies</a></h3>
</div>
<div class="ra clearfix">
<a class="pp" href="http://www.smashingmagazine.com/2014/08/27/a-tour-of-wordpress-4-0/"><img width="84" height="84" src="http://www.smashingmagazine.com/wp-content/uploads/2014/08/wp-logo-4-0-illu.png" class="attachment-related-thumb wp-post-image" alt="wp-logo-4-0-illu" /></a>
<h3><a href="http://www.smashingmagazine.com/2014/08/27/a-tour-of-wordpress-4-0/">A Quick Tour Of WordPress 4.0</a></h3>
</div>
</div>
<div class="adv">
<span class="declare">Advertising</span>
<div id="commentspnsrtarget"></div>
</div>
<ul id="comments" class="sub-tabs clearfix">
<li><a href="#show-comments" class="active">94 Comments</a></li>
</ul>
<div id="discussion" class="subtab-pages">
<div id="show-comments">
<ol id="comments-overview" class="cl">
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">1</span>
<div class="c" id="comment-169926">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/b473ef78b653e5aa33656f54f7f090bc?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Eddie Gear</h3>
<span class="dati">
<a title="Commentlink #1" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169926">
March 8, 2011 5:48 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great insights Dave. I loved the way you have pointed out the things that any developer that needs to keep track of. Thanks for sharing.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169926" class="inpsyde_extended_comments_rate positive">3</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169926" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">2</span>
<div class="c" id="comment-169927">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/be19e396141c6328782a2852844d58f1?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Frederick Luna</h3>
<span class="dati">
<a title="Commentlink #2" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169927">
March 8, 2011 6:07 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Intersting stuff about adding a custom menu and a settings page 😀 great post Dave.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169927" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169927" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">3</span>
<div class="c" id="comment-169928">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/53c424111bd9e2571763aed8c55c3745?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Matt Rittman</h3>
<span class="dati">
<a title="Commentlink #3" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169928">
March 8, 2011 6:26 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article Dave! This will really help out my future endeavors with WordPress plugin development. Thanks for sharing!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169928" class="inpsyde_extended_comments_rate positive">3</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169928" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">4</span>
<div class="c" id="comment-169929">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/0b95637f2168ded35b2d9812f3fbaf9f?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>David</h3>
<span class="dati">
<a title="Commentlink #4" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169929">
March 8, 2011 6:27 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is brilliant, thanks for the write up. Bookmarked! I see that you recommend the Blackbox debug plugin. Having just started creating my own plugins, why this and not the DebugBar plugin (<a href="http://wordpress.org/extend/plugins/debug-bar/" rel="nofollow">http://wordpress.org/extend/plugins/debug-bar/</a>)? What’s the primary difference?</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169929" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169929" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">5</span>
<div class="c" id="comment-169959">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #5" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169959">
March 8, 2011 3:31 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>@David – I didn’t include the DebugBar plugin because it requires WordPress 3.1, which was only in Release Candidate mode at the time of writing. Both plugins provide similar debug info, so I suggest trying both and going with the one you like best.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169959" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169959" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">6</span>
<div class="c" id="comment-169930">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/fd58a5b6b89266f6095d15566f290ecd?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Chris</h3>
<span class="dati">
<a title="Commentlink #6" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169930">
March 8, 2011 6:35 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great advices! I wish it would have been released much earlier – could have saved me a lot of time and trouble :)</p>
<p>Regarding bloginfo(wpurl): The codex says to use site_url() instead, for it also supports https, eg. if is_ssl() is true.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169930" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169930" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">7</span>
<div class="c" id="comment-169935">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #7" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169935">
March 8, 2011 7:09 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Chris – I can’t find the codex article that says to use site_url() instead of bloginfo(‘wpurl’), but yes, I suppose you could do that. There seems to be some confusion about whether or not site_url() includes the install directory of WordPress (if installed in a subdirectory), but looking at the core WordPress code it looks like it does.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169935" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169935" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-3 clearfix">
<span class="cn">8</span>
<div class="c" id="comment-169995">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/46e57cfd694f0c9c91737a14e4913af8?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Christofer</h3>
<span class="dati">
<a title="Commentlink #8" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169995">
March 15, 2011 12:03 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Dave — Maybe, this is the page Chris referred to:<br />
<a href="http://codex.wordpress.org/Function_Reference/get_bloginfo" rel="nofollow">http://codex.wordpress.org/Function_Reference/get_bloginfo</a></p>
<p>“‘wpurl’ / ‘siteurl’ – Returns the ‘WordPress address (URI)’ [..] Consider using site_url() instead.”</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169995" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169995" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">9</span>
<div class="c" id="comment-169931">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/c41cbd0f894f1c1d570ab99a568e41d2?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Pete</h3>
<span class="dati">
<a title="Commentlink #9" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169931">
March 8, 2011 6:38 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Nice article, thanks for sharing. I especially like the notes on debugging & function prefixes. Hopefully this will change the coding habits of some Developers when writing a WP plugin.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169931" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169931" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">10</span>
<div class="c" id="comment-169932">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/1486cf246811f6cdaa9894d7f9ede233?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Donna Vitan</h3>
<span class="dati">
<a title="Commentlink #10" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169932">
March 8, 2011 6:48 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Another awesome and well described tutorial Dave! I especially love how concise the part about creating admin settings panel and menu.</p>
<p>Cheers,</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169932" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169932" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">11</span>
<div class="c" id="comment-169933">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/9c97d846b29e7a50e82af8ab40225023?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Thomas Bachmann</h3>
<span class="dati">
<a title="Commentlink #11" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169933">
March 8, 2011 6:55 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>thanks!<br />
… if you are a trained professional developer and familiar with PHP only half of it should be new (wordpress specifics)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169933" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169933" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">12</span>
<div class="c" id="comment-169934">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/e06e23e82d25e39ae6e04e77a3aad1a2?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Hung Bui</h3>
<span class="dati">
<a title="Commentlink #12" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169934">
March 8, 2011 7:04 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great stuff! Very useful thought.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169934" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169934" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">13</span>
<div class="c" id="comment-169936">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/ae17fd59d1f4261b04860e1a8997892c?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>kwasseem</h3>
<span class="dati">
<a title="Commentlink #13" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169936">
March 8, 2011 7:30 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Precise and short; good, clear checkpoints!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169936" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169936" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">14</span>
<div class="c" id="comment-169937">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/8f80a2914655c2dddf59bddd8af8e62d?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Samundra Shrestha</h3>
<span class="dati">
<a title="Commentlink #14" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169937">
March 8, 2011 7:33 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Really loved the way you have mentioned the tricks for wordpress developer. I liked the way you described the usuage of require, require_once, include and include_once. All most of us use them but never seem to care since we all use include_once most of the time :).</p>
<p>I have already been using some of the tricks you have mentioned.</p>
<p>Great Article.</p>
<p>best regards,<br />
Samundra Shrestha<br />
Realtime Solutions, Nepal</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169937" class="inpsyde_extended_comments_rate negative">-3</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169937" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">15</span>
<div class="c" id="comment-169938">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7ba0e1a12efe734f77b4fba4d97dd8ef?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Pieter Carette</h3>
<span class="dati">
<a title="Commentlink #15" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169938">
March 8, 2011 7:35 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great post. It makes me want to write a plugin! :)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169938" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169938" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">16</span>
<div class="c" id="comment-169939">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/21fc7f3431b9b07560c2bdbd6b0389e2?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Joseph Carrington</h3>
<span class="dati">
<a title="Commentlink #16" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169939">
March 8, 2011 7:37 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Good stuff. I’d point out that using a class as a fill-in for a namespace is not exactly the intention of OOP however.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169939" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169939" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">17</span>
<div class="c" id="comment-169940">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #17" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169940">
March 8, 2011 7:53 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Joseph Carrington – You’re right, using classes as a namespace fill-in is not the intention of OOP, but it is a common practice for avoiding function name collisions in PHP and WordPress.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169940" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169940" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">18</span>
<div class="c" id="comment-169941">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/41d0698209bfdc9cb69b31e8fccd1459?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Josh Hartman</h3>
<span class="dati">
<a title="Commentlink #18" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169941">
March 8, 2011 7:54 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great info! I wasn’t aware of the bloginfo(‘wpurl’) vs. bloginfo(‘url’) difference.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169941" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169941" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">19</span>
<div class="c" id="comment-169942">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/aee526984fe85082c6a902d028806522?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>David</h3>
<span class="dati">
<a title="Commentlink #19" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169942">
March 8, 2011 7:54 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Really enjoyed this. It was encouraging that I found I was already doing most of these things. Some good tips, though, and I’ve updated my plugin with some of these suggestions.</p>
<p>I tried blackbar, but got tons of deprecated errors, which kind of made me laugh…</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169942" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169942" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-2 clearfix">
<span class="cn">20</span>
<div class="c" id="comment-169943">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #20" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169943">
March 8, 2011 7:57 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@David – Hehe, yea, the irony of that was not lost on me :-)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169943" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169943" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">21</span>
<div class="c" id="comment-169944">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/907728625b3b0f36cfc56582a736d10a?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Vivek Parmar</h3>
<span class="dati">
<a title="Commentlink #21" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169944">
March 8, 2011 8:12 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for so much, getitng started with plugin development and wordpress theme development, and this article help me a lot in knowing many things that i do not know</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169944" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169944" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">22</span>
<div class="c" id="comment-169945">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/03e89dba5cb218b78f43ac4ca2a6aec7?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>scasmflop</h3>
<span class="dati">
<a title="Commentlink #22" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169945">
March 8, 2011 8:53 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article, very informative without straying too far down rabbit trails. Thanks.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169945" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169945" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">23</span>
<div class="c" id="comment-169946">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/429e15ea1f962e579cd1d59b0f0e6d37?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Raherian</h3>
<span class="dati">
<a title="Commentlink #23" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169946">
March 8, 2011 9:25 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Hi,<br />
Using blackbox-debug-bar with wp_debug on true display a bunch of notices, not very good for developping :/</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169946" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169946" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-2 clearfix">
<span class="cn">24</span>
<div class="c" id="comment-169947">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #24" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169947">
March 8, 2011 9:28 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Raherian – But that’s kind of the point of enabling debugging in the first place, to see all of the notices you wouldn’t have otherwise known were there.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169947" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169947" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-3 clearfix">
<span class="cn">25</span>
<div class="c" id="comment-169955">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/429e15ea1f962e579cd1d59b0f0e6d37?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Raherian</h3>
<span class="dati">
<a title="Commentlink #25" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169955">
March 8, 2011 12:14 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Yes but this plugin is usefull for developping, and i develop with wp_debug true, so having a bunch of notices while developping isn’t good.<br />
It were a good idea to make a plugin available on repository only if he doesn’t have any notices, like themes ^^</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169955" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169955" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">26</span>
<div class="c" id="comment-169948">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/ec905543ea918ee9546033a8ec2bfca9?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>aurel</h3>
<span class="dati">
<a title="Commentlink #26" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169948">
March 8, 2011 9:32 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>So far I developed only two themes, both of them using different methods (or no method apart from “hope it will work”)</p>
<p>it seems that these 10 plugins will make the process much easier to manage and hopefully to be able to understand by things work – that way things could stick in the head when developing the next theme</p>
<p>thanks</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169948" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169948" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">27</span>
<div class="c" id="comment-169949">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/fc6a528fe2b60482971b1642577ae43d?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Alan Stevens</h3>
<span class="dati">
<a title="Commentlink #27" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169949">
March 8, 2011 9:32 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Nice article, Dave. I don’t know if there is a codex article on using site_url() but this article has some good tips on guarding for ssl: <a href="http://blogs.sitepoint.com/2011/02/22/crimes-against-wordpress/" rel="nofollow">http://blogs.sitepoint.com/2011/02/22/crimes-against-wordpress/</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169949" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169949" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">28</span>
<div class="c" id="comment-169950">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/1f7d16fe6425d85f05aa229464b49843?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Thai Bui</h3>
<span class="dati">
<a title="Commentlink #28" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169950">
March 8, 2011 9:35 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article. One of my biggest hurdles is debugging my plugins properly and these tips are outstanding. I usually use firephp to see what’s going on with the variables being passed back and fourth. Such an invaluable tool.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169950" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169950" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">29</span>
<div class="c" id="comment-169951">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/0f0319b397cd2a0443f73a94ab6934cf?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Conrad Muan</h3>
<span class="dati">
<a title="Commentlink #29" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169951">
March 8, 2011 10:16 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great post. I’ll have to try blackbar in my future projects.</p>
<p>I was also _just_ looking for a tutorial on adding menu items when I found this gem.</p>
<p>Thanks again,<br />
Conrad</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169951" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169951" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">30</span>
<div class="c" id="comment-169952">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/aac7e0386facd070f6d4b817c257a958?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Zé</h3>
<span class="dati">
<a title="Commentlink #30" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169952">
March 8, 2011 10:55 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article, but I am a little sad that i18n wasn’t contemplated from the beginning for all those strings, i.e.</p>
<p><code>$page_title = __('My Plugin Settings', 'myplugin_textdomain');</code><br />
instead of<br />
<code>$page_title = 'My Plugin Settings';</code></p>
<p>It’s great for all other languages to have plugins that are translatable from the get go.<br />
<a href="http://codex.wordpress.org/I18n_for_WordPress_Developers" rel="nofollow">http://codex.wordpress.org/I18n_for_WordPress_Developers</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169952" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169952" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">31</span>
<div class="c" id="comment-169957">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #31" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169957">
March 8, 2011 2:55 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Ze – I mentioned on another comment that I thought about including internationalization but decided against it for this article. The topic is probably big enough for another article on its own, so maybe I’ll write that one next.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169957" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169957" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">32</span>
<div class="c" id="comment-169953">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/95c934fa2c3362794bf62ff8c59ada08?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Drew</h3>
<span class="dati">
<a title="Commentlink #32" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169953">
March 8, 2011 11:48 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for the lead on Blackbox!. I installed it mid-read on your post and played with it for 30 minutes on three of my sites. Then I remember I was reading your post so I came back to finish. Great roundup!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169953" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169953" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">33</span>
<div class="c" id="comment-169954">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/1a659e051ae2d889b0e4421408b6ff34?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Tomáš Kapler</h3>
<span class="dati">
<a title="Commentlink #33" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169954">
March 8, 2011 12:12 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>one very common problem from US writers missing – forgotting internationalization so __(), _x(), _e() functions etc.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169954" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169954" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-2 clearfix">
<span class="cn">34</span>
<div class="c" id="comment-169956">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #34" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169956">
March 8, 2011 12:29 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Tomas – I thought about including a section on internationalization, but decided against it for this article. Maybe I’ll write another article just for that.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169956" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169956" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">35</span>
<div class="c" id="comment-169958">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/815d913154a591f2c2b4718ef6003d98?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Brett Lewis</h3>
<span class="dati">
<a title="Commentlink #35" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169958">
March 8, 2011 3:23 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is great :)</p>
<p>Thank you so much.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169958" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169958" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">36</span>
<div class="c" id="comment-169960">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/d0517bf908028685b3b25b815ef75068?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Phuoc Huynh</h3>
<span class="dati">
<a title="Commentlink #36" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169960">
March 8, 2011 6:24 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for this great. This is awesome !</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169960" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169960" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">37</span>
<div class="c" id="comment-169961">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/909cdcfc310e3cdab83586232d6e81f8?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Patent Litigation</h3>
<span class="dati">
<a title="Commentlink #37" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169961">
March 8, 2011 10:03 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Here is a similar story</p>
<p>Until recently, migrating all your blogs to a single multisite blog was a massive task because of the need to resolve conflicting IDs across different tables. Fortunately, newer WordPress versions have built-in functions to make life a bit easier for all of us.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169961" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169961" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">38</span>
<div class="c" id="comment-169962">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/30b5f53666c7c520e8142a372f8a54f6?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Steve mg</h3>
<span class="dati">
<a title="Commentlink #38" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169962">
March 8, 2011 11:02 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>As a customer of WordPress plugins, my biggest gripe is the lack of screenshots displaying what the plugin does. Is it really that hard to grab screens? Great you’ve made this fantastic plugin, and also great that you’ve put it up for free, just telling me what it does, isn’t going to completely sell me on it.<br />
Screenshots, do it.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169962" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169962" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">39</span>
<div class="c" id="comment-169963">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/6666ae2b2012ee49fe01c5e18ebfe2d0?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Mick</h3>
<span class="dati">
<a title="Commentlink #39" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169963">
March 8, 2011 11:42 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>I wish every single plugin developer followed these simple rules!<br />
It would make life a little bit easier</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169963" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169963" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">40</span>
<div class="c" id="comment-169964">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/115ee6ccc6f3375410990a387bf5c0bb?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Justin</h3>
<span class="dati">
<a title="Commentlink #40" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169964">
March 9, 2011 12:43 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is a great article. Thanks for consolidating all of this information instead of making me search everywhere for it!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169964" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169964" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">41</span>
<div class="c" id="comment-169965">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/61ad912b724a2554976edd74ee6e0266?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Jerry</h3>
<span class="dati">
<a title="Commentlink #41" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169965">
March 9, 2011 12:45 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Dave, Awesome post. Pretty helpful for green-hands like me for wordpress.<br />
Usually we use netbeans and X-debug for debugging. This time we could try blackbox for help :)</p>
<p>One question: How do you do unit test for new built WP plugin? Use PHPUnit or something else? I am quite new to the test procedure of PHP, any help will be much appreciated.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169965" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169965" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">42</span>
<div class="c" id="comment-169966">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/8327520245e97889fca3b0270d69acc8?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>jeFFF</h3>
<span class="dati">
<a title="Commentlink #42" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169966">
March 9, 2011 12:59 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks a lot for this great article Dave !</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169966" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169966" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">43</span>
<div class="c" id="comment-169967">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/8291ab5d74a9f6d7b8a98ed62ad1709e?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Ruslan</h3>
<span class="dati">
<a title="Commentlink #43" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169967">
March 9, 2011 1:29 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>One thing that you have understand about include vs include_once, require vs require_once is performance penalty.</p>
<p>If you develop your code, and you are 100% for sure, that after you included your file in following code it wont be included again, never use *_once functions. They are more resource eating that simple include or require.</p>
<p>Read this article to understand difference in C level:<br />
<a href="http://www.techyouruniverse.com/software/php-performance-tip-require-versus-require_once" rel="nofollow">http://www.techyouruniverse.com/software/php-performance-tip-require-versus-require_once</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169967" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169967" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">44</span>
<div class="c" id="comment-169968">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/26c5bc5b88075a54b55ae54e98be2c09?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Fernando Agüero</h3>
<span class="dati">
<a title="Commentlink #44" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169968">
March 9, 2011 1:42 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>One of the best post written in Smashing Magazine. Now I have no doubts.</p>
<p>Thank you!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169968" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169968" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">45</span>
<div class="c" id="comment-169969">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/00abc2999b2a32f9072fc8b9ae2ccfe9?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Baltech</h3>
<span class="dati">
<a title="Commentlink #45" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169969">
March 9, 2011 2:13 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great you’ve made this fantastic plugin, and also great that you’ve put it up for free.It seems that these 10 plugins will make the process much easier to manage and hopefully to be able to understand by things. Thanks for give us this information.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169969" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169969" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">46</span>
<div class="c" id="comment-169970">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/00abc2999b2a32f9072fc8b9ae2ccfe9?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Baltech</h3>
<span class="dati">
<a title="Commentlink #46" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169970">
March 9, 2011 2:14 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great you’ve made this fantastic plugin, and also great that you’ve put it up for free.It seems that these 10 plugins will make the process much easier to manage and hopefully to be able to understand by things. Thanks for this useful knowledge..</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169970" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169970" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">47</span>
<div class="c" id="comment-169971">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/48c28e5f2f6f1b32dd7beb2d9bb63d17?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Thorsten</h3>
<span class="dati">
<a title="Commentlink #47" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169971">
March 9, 2011 2:36 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>A very important topic that is missing here is Data Validation.<br />
<a href="http://codex.wordpress.org/Data_Validation" rel="nofollow">http://codex.wordpress.org/Data_Validation</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169971" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169971" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">48</span>
<div class="c" id="comment-169972">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/b8cefc2f7b65fd5e4204711ee5fc3d42?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Max</h3>
<span class="dati">
<a title="Commentlink #48" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169972">
March 9, 2011 3:05 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>One bad thing was described above.<br />
When webmaster changes <em>wp-content</em> directory name, following code will break the site:<br />
<code>define('MYPLUGIN_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_template());</code><br />
You should use following code instead wrong one:<br />
<code>define('MYPLUGIN_THEME_DIR', WP_CONTENT_DIR . 'themes/' . get_template());</code></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169972" class="inpsyde_extended_comments_rate positive">2</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169972" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">49</span>
<div class="c" id="comment-169976">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #49" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169976">
March 9, 2011 6:10 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Max – Good point, thanks for catching that. Using WP_CONTENT_DIR instead of a hardcoded ‘wp-content’ string would be better.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169976" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169976" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt depth-2 clearfix">
<span class="cn">50</span>
<div class="c" id="comment-169998">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/41a7bd5fd7e182e3705c51338285f2a8?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>YellowShark</h3>
<span class="dati">
<a title="Commentlink #50" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169998">
March 15, 2011 9:53 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for pointing this out, I 100% concur – every WP install I do, I move the wp-content to site root, so i wind up with a nice structure like:<br />
/themes<br />
/plugins<br />
/wordpress<br />
/index.php</p>
<p>Developers should definitely utilize WP_PLUGIN_DIR and WP_CONTENT_DIR. Google either of those terms for more info on how to leverage them.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169998" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169998" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">51</span>
<div class="c" id="comment-169973">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/f439b5e33c6a8bf37337611cb6a9b283?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>STPo</h3>
<span class="dati">
<a title="Commentlink #51" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169973">
March 9, 2011 4:17 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>And please: do NOT fill the front-end HTML with plugin-specific CSS/jQuery/meta crap without a way to properly erase them if it is not required. I code my own front-end markup and i’m tired to see jQuery/Prototype/Mootools included everytime I use a plugin…</p>
<p>PLEASE!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169973" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169973" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">52</span>
<div class="c" id="comment-169974">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/8a01f1cc43100cc77bf7fa249f3486db?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>catalin cimpanu</h3>
<span class="dati">
<a title="Commentlink #52" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169974">
March 9, 2011 4:49 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Hell of a job on this article.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169974" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169974" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">53</span>
<div class="c" id="comment-169975">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/771eb1edb297f17b15e0efde616a840b?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>wparena</h3>
<span class="dati">
<a title="Commentlink #53" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169975">
March 9, 2011 5:36 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Although my current WordPress blogs have some of the SeO plugins installed I have found a good tips on your list that I must to follow</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169975" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169975" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">54</span>
<div class="c" id="comment-169977">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/a89d26529cebfe446596439bfe4cc74a?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>djavupixel</h3>
<span class="dati">
<a title="Commentlink #54" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169977">
March 9, 2011 10:56 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Good WordPress summary to develop a WordPress plugin.<br />
Great work and good explanations!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169977" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169977" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">55</span>
<div class="c" id="comment-169978">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/628dfd9e3e905064c09ae089f60b2595?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Douglas Bonneville</h3>
<span class="dati">
<a title="Commentlink #55" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169978">
March 9, 2011 11:47 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Dave: Great article – I’m going to give making a plugin a shot pretty soon and I’ll start here. I’ve edited a few, but this outline really lowers the threshold to new development. This is one of the best WordPress articles I’ve seen in a while, and certainly on my list of top articles at Smashing!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169978" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169978" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">56</span>
<div class="c" id="comment-169979">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/5dfcd8fbb95d1a7cf5ef40eab3ba0611?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>darell</h3>
<span class="dati">
<a title="Commentlink #56" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169979">
March 9, 2011 4:36 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for your post, it’s very helpful for my daily work and thoughts.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169979" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169979" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">57</span>
<div class="c" id="comment-169980">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/a91236f90b1063e60ad30e7c5f9e30bd?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Jurdefur</h3>
<span class="dati">
<a title="Commentlink #57" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169980">
March 10, 2011 1:38 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Seriously why is everybody still using wordpress its the biggest crap of code i ever seen, its like IE6 under the browsers…</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169980" class="inpsyde_extended_comments_rate negative">-1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169980" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">58</span>
<div class="c" id="comment-169981">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/922a5911c9e2bba510333139d9f08122?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Christian K. Nordtømme</h3>
<span class="dati">
<a title="Commentlink #58" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169981">
March 10, 2011 2:29 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for this. I’m just now learning how to develop my own plugins, and have bookmarked this post.</p>
<p>I also wish more plugin developers made the plugin’s documentation and help easier accessible, though.</p>
<p>I don’t think digging up readme files from the plugin folder, rummaging through every page on the author’s website or trying to decipher the code in search of basic answers should be neccessary. Instead, a “Quick Start” action link (either to 100% self-explanatory settings or to a readme file) should be standard.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169981" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169981" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">59</span>
<div class="c" id="comment-169982">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/2901240fe75416f14f03fbdd82c00f87?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>jakub</h3>
<span class="dati">
<a title="Commentlink #59" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169982">
March 10, 2011 2:42 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is superuseful article! In-depth yet still accessible for occassional developers. Much better than “25 nice inspirational designs in pink” or “100 beautiful photos of furry pets” type stuff…</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169982" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169982" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">60</span>
<div class="c" id="comment-169983">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/41e4c684ba730c88e05fc9bdf563cbc2?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Marty</h3>
<span class="dati">
<a title="Commentlink #60" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169983">
March 10, 2011 3:08 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>excellent post… stumbled.. :)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169983" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169983" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">61</span>
<div class="c" id="comment-169984">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/403337506ddc11158cad4b76d304fbe7?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>seedy</h3>
<span class="dati">
<a title="Commentlink #61" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169984">
March 10, 2011 11:38 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>these articles are getting lamer and lamer</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169984" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169984" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">62</span>
<div class="c" id="comment-169985">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/de87d78c47a8f6e6802c23544ef4bd90?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>web3mantra</h3>
<span class="dati">
<a title="Commentlink #62" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169985">
March 11, 2011 3:18 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for sharing this post.I like this post.It contains good examples of wordpress plugin developer should know.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169985" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169985" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">63</span>
<div class="c" id="comment-169986">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/dd2e765b964f9f3887c4518b294e42ac?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>ig-ffm</h3>
<span class="dati">
<a title="Commentlink #63" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169986">
March 12, 2011 11:16 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>I really appreciate your posting. Thanks.</p>
<p>There is one issue I’ld like to add: localization.<br />
I have to translate all kinds of plugins and that can be a really annoying waste of time, if a plugin is not meant to be localized.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169986" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169986" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">64</span>
<div class="c" id="comment-169987">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/70325f2bf83316d1ba0c44bbc9bc2b1e?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Rahul</h3>
<span class="dati">
<a title="Commentlink #64" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169987">
March 13, 2011 10:23 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great post. Really helps a lot. But need to ask something. I saw this effect on a recently launched blog with wp posts coming in like a js gallery slider.</p>
<p><a href="http://sputznik.com/" rel="nofollow">http://sputznik.com/</a></p>
<p>How have they achieved this transition and post thing? Is there a plugin that I could use? Thanks for the help.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169987" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169987" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">65</span>
<div class="c" id="comment-169991">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #65" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169991">
March 14, 2011 4:07 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Rahul – It looks like that transition is done with jQuery and the easing plugin for jQuery. Just give it a quick Google and you’ll find what you need.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169991" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169991" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-3 clearfix">
<span class="cn">66</span>
<div class="c" id="comment-170002">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/70325f2bf83316d1ba0c44bbc9bc2b1e?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Rahul</h3>
<span class="dati">
<a title="Commentlink #66" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170002">
March 24, 2011 11:23 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks a ton. Is there any plugin for this?</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170002" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170002" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">67</span>
<div class="c" id="comment-169988">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/281d234ca83251614a66121a05cb8fad?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Manny Fleurmond</h3>
<span class="dati">
<a title="Commentlink #67" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169988">
March 13, 2011 9:26 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>I also recommend using the plugins_url() function to find your plugins base directory:<br />
<a href="http://codex.wordpress.org/Function_Reference/plugins_url" rel="nofollow">http://codex.wordpress.org/Function_Reference/plugins_url</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169988" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169988" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">68</span>
<div class="c" id="comment-169989">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/f3fc67a71bef1394539fd4be794cb73e?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dax Davis</h3>
<span class="dati">
<a title="Commentlink #68" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169989">
March 13, 2011 9:52 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is a great post. Thanks for bringing it all together in one place.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169989" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169989" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">69</span>
<div class="c" id="comment-169990">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/f8393ef67ed5144e15890d60eaa2289e?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Valentinas</h3>
<span class="dati">
<a title="Commentlink #69" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169990">
March 14, 2011 1:28 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article! Particularly the part about using wp_debug is a must-read for every plugin developer.<br />
By the way, just wanted to point out that there is a function wp_login_url() for login url. People should use this, because some plugins may modify it with filter that is inside it and bloginfo(‘wpurl’) . “/wp-login.php” is not necessary the right login URL.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169990" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169990" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment odd alt depth-2 clearfix">
<span class="cn">70</span>
<div class="c" id="comment-169992">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7f46ae04d74b786bcaabec5a431c7937?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dave Donaldson</h3>
<span class="dati">
<a title="Commentlink #70" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169992">
March 14, 2011 4:08 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>@Valentinas – Good catch about the wp_login_url() function, thanks for pointing that out.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169992" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169992" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">71</span>
<div class="c" id="comment-169993">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/61a894194ade535460a0e34ed4b56c31?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Gavin Potts</h3>
<span class="dati">
<a title="Commentlink #71" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169993">
March 14, 2011 7:34 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Awesome post. 9 of 10 i’ve found extremely interesting and enlightening…</p>
<p>I’d just like to query the tip: “Use bloginfo(‘wpurl’) Instead of bloginfo(‘url’)”. I believe this is bad advice.</p>
<p>When developing a WordPress website, developers may be forced to work in a live environment with a holding page in place. If you use ‘wpurl’ in your themes/plugins, this will fail, as you will need to rename index.php and point ‘siteurl’ to the index page to have the website up for development.</p>
<p>If all of your internal links are output with the ‘wpurl’ parameter, these will link to your holding page and you will have to type permalinks into your browser manually instead of clicking on links within the website.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169993" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169993" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">72</span>
<div class="c" id="comment-169994">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/c92d3f3fe8e5b19bd7dc3d08142b400e?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Jim Krill</h3>
<span class="dati">
<a title="Commentlink #72" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169994">
March 14, 2011 6:54 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is a great article for anyone wanting to develop a WordPress plugin. Hopefully it will lead to some brilliant plug-ins which will enrich the WordPress community even more.</p>
<p>Thanks Dave!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169994" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169994" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">73</span>
<div class="c" id="comment-169996">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/e94a2e120ad98cc9d2708b156c6a1c69?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Philip Norton</h3>
<span class="dati">
<a title="Commentlink #73" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169996">
March 15, 2011 1:58 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>This is a great list, but one thing that every WordPress developer should know about (more important than knowing about require_once() etc) is nonces. Nonces are a very important part of WordPress that help to combat security problems and should definitely be on this list.<br />
<a href="http://codex.wordpress.org/WordPress_Nonces" rel="nofollow">http://codex.wordpress.org/WordPress_Nonces</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169996" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169996" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">74</span>
<div class="c" id="comment-169997">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7ac2e44aeff39f6df1187cb0e4f7fb92?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Jason LaRose</h3>
<span class="dati">
<a title="Commentlink #74" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169997">
March 15, 2011 9:15 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>One thing every WordPress plugin developer should do is NOT include default styles for their generated HTML. Doing so means reverse engineering for other WordPress developers. If you do add default styles, add in the option to deactivate the CSS.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169997" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169997" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">75</span>
<div class="c" id="comment-169999">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/25c608d2c1b076011369920bfcd889a3?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Dan Coulter</h3>
<span class="dati">
<a title="Commentlink #75" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-169999">
March 15, 2011 12:12 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Nothing about wp_enqueue_script()?</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_169999" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="169999" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">76</span>
<div class="c" id="comment-170000">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/5c65fecb4e4179a59ebecb18034dcb64?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Permana Jayanta</h3>
<span class="dati">
<a title="Commentlink #76" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170000">
March 15, 2011 6:40 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Really helpful post as I’m writing WordPress plugin now. Maybe should added list of functions that can help plugin development, instead of writing a functions again.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170000" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170000" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">77</span>
<div class="c" id="comment-170001">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/0445bfc3e671c35b39d6036658c57a0e?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Kyathi</h3>
<span class="dati">
<a title="Commentlink #77" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170001">
March 16, 2011 10:24 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thank you.. superb.. !!! its really helpful…</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170001" class="inpsyde_extended_comments_rate positive">1</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170001" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">78</span>
<div class="c" id="comment-170003">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/b80742b6d859d848f839c270c2543f3c?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Sterling Hamilton</h3>
<span class="dati">
<a title="Commentlink #78" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170003">
April 9, 2011 11:15 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Hey there!</p>
<p>A few things…</p>
<p>In regards to dbDelta:<br />
“require_once(ABSPATH . ‘wp-admin/includes/upgrade.php’);”</p>
<p>That means you are now including a core WP file into your plugin…not really recommended. Further more, by doing that – it will start throwing aggressive cache busting headers. This will get in the way of caching plugins and proxies.</p>
<p>Also – rather than prefixing every function, it’s better to just do an Object in PHP and give that a unique name. That way prefixing is not needed – just a unique object name.</p>
<p>And the BlackBox plugin has been known to drastically slow down servers, so it should not be used in any sort of production environment.</p>
<p>Also – you want to load your plugins meta data rather than creating your own. So version number/plugin path/etc are able to be loaded like this: <a href="https://gist.github.com/911684" rel="nofollow">https://gist.github.com/911684</a></p>
<p>Another really good tip…do NOT rely on environment variables like HTTP_HOST, REQUEST_URI and such.</p>
<p>These tend to be unreliable – its best to use the wordpress variables for determining locations and what not.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170003" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170003" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">79</span>
<div class="c" id="comment-170004">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7a831efd240c56f74f4c4f2618d9a51a?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>cogmios`</h3>
<span class="dati">
<a title="Commentlink #79" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170004">
May 6, 2011 10:30 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Because of the topic the “Objective Best Practices for Plugin Development?” on <a href="http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development" rel="nofollow">http://wordpress.stackexchange.com/questions/715/objective-best-practices-for-plugin-development</a> is also a good addition.</p>
<p>Maybe to add to the debugging part: I also found using Zend Server community edition together with PHP PDT increase my debugging abilities (I dumped xampp for it).</p>
<p> For making names unique well… I use php 5.3 with namespaces -end of problem- the language solves it for me. So I just state “this plugin is only for php 5.3 onwards” (although some discussion exist on “only 5.3″ <a href="http://groups.google.com/group/wp-hackers/browse_thread/thread/19dc7c7197f66754/9a60ad0b37ccaf1b?show_docid=9a60ad0b37ccaf1b&pli=1" rel="nofollow">http://groups.google.com/group/wp-hackers/browse_thread/thread/19dc7c7197f66754/9a60ad0b37ccaf1b?show_docid=9a60ad0b37ccaf1b&pli=1</a>)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170004" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170004" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">80</span>
<div class="c" id="comment-170005">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/8c06582f15e2a41ca172044202c426eb?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>anyon</h3>
<span class="dati">
<a title="Commentlink #80" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170005">
May 7, 2011 2:25 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>rule #1 wordpress is coded badly you will not learn anything about design patterns or best practices from looking at the wordpress source code, use your initiative ;)</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170005" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170005" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">81</span>
<div class="c" id="comment-170006">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/216c409be1cbf323cbd714f4010e6797?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Brett Widmann</h3>
<span class="dati">
<a title="Commentlink #81" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170006">
May 10, 2011 7:22 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for these really awesome tips! They will be really helpful.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170006" class="inpsyde_extended_comments_rate negative">-2</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170006" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">82</span>
<div class="c" id="comment-170007">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/827b430098defd203fa74ed9ce92e0d9?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>mikaweb</h3>
<span class="dati">
<a title="Commentlink #82" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170007">
September 11, 2011 2:28 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Nice tips. I’m currently writing my first plugin and it helped me a lot especially for the upgrade system.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170007" class="inpsyde_extended_comments_rate positive">2</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170007" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-even depth-1 clearfix">
<span class="cn">83</span>
<div class="c" id="comment-170008">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/78d5156936de65aac7e00ea273db82e7?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>liskel</h3>
<span class="dati">
<a title="Commentlink #83" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170008">
August 25, 2012 4:22 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Really nice things to keep in mind and great for beginners exploring the deep depths of wordpress plugin development!<br />
Thanks!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170008" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170008" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-odd thread-alt depth-1 clearfix">
<span class="cn">84</span>
<div class="c" id="comment-170009">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/0fa974dbdfd8afc7390131f9fd4c097c?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Ryan S</h3>
<span class="dati">
<a title="Commentlink #84" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170009">
September 14, 2012 12:09 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Hi thanks for the tip, I just notice in Settings link, I think there is the better way to declare setting link.</p>
<p>something like this<br />
$settings_link = ‘<a href="'.admin_url('admin.php?page=plugin-settings').'" rel="nofollow">Settings</a>‘;</p>
<p>Ryan S</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170009" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170009" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
<ul class="children">
<li class="comment even depth-2 clearfix">
<span class="cn">85</span>
<div class="c" id="comment-170010">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/0fa974dbdfd8afc7390131f9fd4c097c?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Ryan S</h3>
<span class="dati">
<a title="Commentlink #85" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170010">
September 14, 2012 12:10 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Oops sorry for this second comment, it does not look good on my previous comment.</p>
<p><code>$settings_link = '<a href="'.admin_url('admin.php?page=cx-events').'" rel="nofollow">Settings</a>';</code></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170010" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170010" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ul><!– .children –>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">86</span>
<div class="c" id="comment-170011">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/98d0a24074949185147845293651e72c?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Arch!tect</h3>
<span class="dati">
<a title="Commentlink #86" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170011">
January 7, 2013 11:27 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>thanks dude!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170011" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170011" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">87</span>
<div class="c" id="comment-170012">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/1cde71fd2000a3649df05c3be7fd7ba9?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>David Hazelden</h3>
<span class="dati">
<a title="Commentlink #87" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170012">
February 17, 2013 8:04 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Good stuff!</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170012" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170012" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">88</span>
<div class="c" id="comment-170013">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/2af83baa1864c442b08865d2f9ed8223?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Byron Dunn</h3>
<span class="dati">
<a title="Commentlink #88" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170013">
February 28, 2013 7:50 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Great article. Being new to WP development, this is really helpful. Even for those of us struggling to tweak plugins we use.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170013" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170013" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">89</span>
<div class="c" id="comment-170014">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/1441f3f17c4f72a0153415048e442bf0?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Manuel Marquez</h3>
<span class="dati">
<a title="Commentlink #89" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170014">
March 21, 2013 1:43 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks Dave,</p>
<p>These are fantastic tips to start quality plugin development. Please keep up the good work!<br />
Much appreciated.</p>
<p>Cheers,<br />
Manuel</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170014" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170014" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">90</span>
<div class="c" id="comment-170019">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/ad64f6ef4b9c5b4f8b3c90be203be4d2?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Alex Buri</h3>
<span class="dati">
<a title="Commentlink #90" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170019">
June 28, 2013 3:04 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>Clear and well-written – you’ve allowed me to understand php even in the middle of the night….<br />
thanks</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170019" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170019" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">91</span>
<div class="c" id="comment-170018">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://1.gravatar.com/avatar/7807fb5b55bfd79bc0c36c307b3a4bd8?s=38&d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Juergen</h3>
<span class="dati">
<a title="Commentlink #91" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170018">
October 14, 2013 11:31 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Hello,<br />
a really really good tutorial.<br />
Thanks</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170018" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170018" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">92</span>
<div class="c" id="comment-170017">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/c1b4eb8751a973da835b8fb6588586aa?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Will</h3>
<span class="dati">
<a title="Commentlink #92" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170017">
January 3, 2014 12:10 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Thanks for the article. The menu stuff in particular was very helpful. </p>
<p>I’d add 11): Understand how/when WordPress loads things. This flow chart of what happens during a WP request cycle is pretty illuminating: <a href="http://www.rarst.net/script/wordpress-core-load/" rel="nofollow">http://www.rarst.net/script/wordpress-core-load/</a> </p>
<p>Couple of other handy flow charts linked from that page as well in particular this chart that explains WP Query Functions <a href="http://www.rarst.net/script/wordpress-query-functions/" rel="nofollow">http://www.rarst.net/script/wordpress-query-functions/</a></p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170017" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170017" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment even thread-odd thread-alt depth-1 clearfix">
<span class="cn">93</span>
<div class="c" id="comment-170015">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/e85eff52524a64e38ddc4316fb079c22?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>jack</h3>
<span class="dati">
<a title="Commentlink #93" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170015">
January 20, 2014 12:02 am </a>
</span>
</div>
</div>
<div class="ctx">
<p>i have developed a plugin for paggination along with a shortcode but the output is showing in dashboad and when adding shortcode in any pages then it displays output in pages.<br />
Kindly suggest how to hide the output from dashbord.</p>
<p>Thank You in advance</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170015" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170015" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
<li class="comment odd alt thread-even depth-1 clearfix">
<span class="cn">94</span>
<div class="c" id="comment-170016">
<div class="cau clearfix">
<img alt="" src="http://www.smashingmagazine.com/wp-content/plugins/inpsyde-gravatar-load-delay/inc/frontend/../../assets/img/avatar-placeholder.png" data-gravatar-url="http://0.gravatar.com/avatar/6c94850a0051b2ab23ab7a18c7d4d181?s=38&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D38&r=G" class="avatar avatar-38 photo" height="38" width="38" /> <div class="aum">
<h3>Wordpress plugins</h3>
<span class="dati">
<a title="Commentlink #94" href="http://www.smashingmagazine.com/2011/03/08/ten-things-every-wordpress-plugin-developer-should-know/#comment-170016">
February 20, 2014 10:04 pm </a>
</span>
</div>
</div>
<div class="ctx">
<p>Good post. I learn something totally new and challenging on blogs I stumbleupon on a daily basis. It will always be helpful to read through content from other authors and use something from their sites.</p>
</div>
<div class="com">
<div class="reply"></div>
<div class="inpsyde_extended_comments_rate_wrapper clearfix" aria-live="polite">
<div id="inpsyde_extended_comments_rate_170016" class="inpsyde_extended_comments_rate">0</div>
<div class="inpsyde_extended_comments_rate_stars" data-comment_id="170016" data-action="inpsyde_extended_comments_rate"></div>
</div> </div>
</div>
</li><!– #comment-## –>
</ol>
</div>
</div>
</div></div><p><a href="#top" class="top" title="Jump to the top of the page">↑ Back to top</a></p>
</div><div class="fo-na">
<div class="mn" id="mn">
<ul id="menu-smashing-mobile-network" class="mnu"><li class="mnh">Smashing Pages:</li><li id="menu-item-188956" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-188956 menu-item-books"><a href="http://www.smashingmagazine.com/books/">Books</a></li>
<li id="menu-item-188957" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-188957 menu-item-ebooks"><a href="http://www.smashingmagazine.com/ebooks/">eBooks</a></li>
<li id="menu-item-188955" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-188955 menu-item-workshops"><a href="http://www.smashingmagazine.com/smashing-workshops/">Workshops</a></li>
<li id="menu-item-188959" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-188959 menu-item-email-newsletter"><a href="http://www.smashingmagazine.com/the-smashing-newsletter/">Email Newsletter</a></li>
<li id="menu-item-188961" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-188961 menu-item-job-board"><a href="http://jobs.smashingmagazine.com">Job Board</a></li>
<li id="menu-item-188958" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-188958 menu-item-about-us-impressum"><a href="http://www.smashingmagazine.com/about/">About us / Impressum</a></li>
</ul>
<ul id="menu-mobile-categories" class="mnu"><li class="mnh">Categories:</li><li id="menu-item-181575" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-181575 menu-item-coding"><a href="http://www.smashingmagazine.com/category/coding/">Coding</a></li>
<li id="menu-item-181576" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-181576 menu-item-design"><a href="http://www.smashingmagazine.com/category/design/">Design</a></li>
<li id="menu-item-181580" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-181580 menu-item-mobile"><a href="http://www.smashingmagazine.com/category/mobile/">Mobile</a></li>
<li id="menu-item-181579" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-181579 menu-item-graphics"><a href="http://www.smashingmagazine.com/category/graphics/">Graphics</a></li>
<li id="menu-item-181577" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-181577 menu-item-ux-design"><a href="http://www.smashingmagazine.com/category/uxdesign/">UX Design</a></li>
<li id="menu-item-181578" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-181578 menu-item-wordpress"><a href="http://www.smashingmagazine.com/category/wordpress/"><span class="long"><span>Word</span><span>Press</span></span><span class="short">WP</span></a></li>
</ul>
<a href="#top" class="top" title="Jump to the top of the page">↑ Back to top</a>
</div><div class="ms" id="ms">
<form id="searching" class="sfm" method="get" action="http://www.smashingmagazine.com/search-results/" target="_top">
<div class="clearfix">
<input name="q" id="mobile-search-input" type="text" placeholder="e.g. CSS" />
<button class="search_submit" type="submit">Search</button>
<input type="hidden" name="cx" value="partner-pub-6779860845561969:5884617103">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="UTF-8">
</div>
</form>
<a href="#top" class="top" title="Jump to the top of the page">↑ Back to top</a>
</div> <!– Search form –></div>
</div><div id="wpsidebar" class="sb">
<div class="col side">
<div class="sf">
<form method="get" action="http://www.smashingmagazine.com/search-results/" target="_top">
<label for="magazine-search">Search on Smashing Magazine</label>
<input id="magazine-search" name="q" type="text" placeholder="e.g. Responsive design" />
<button type="submit">Search</button>
<input type="hidden" name="cx" value="partner-pub-6779860845561969:5884617103">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="UTF-8">
</form>
</div>
<div class="bw faw">
<span class="declare">Advertisement</span>
<span class="awithus"><a class="sprite ed-us" href="mailto:advertising@smashingmagazine.com" title="Advertise with us!">Advertise with us!</a></span>
<div id="spnsrlist-a"></div>
</div>
<div class="sf wg">
<h3>
<a href="http://www.smashingmagazine.com/the-smashing-newsletter/">
<img src="http://www.smashingmagazine.com/files/smashing-widget/v006/img/smnl.png" alt="Smashing Newsletter" /> Smashing Newsletter
</a>
</h3>
<p>Subscribe to our email newsletter for useful tips and valuable resources, sent out every second Tuesday.</p>
<form action="http://smashingmagazine.us1.list-manage1.com/subscribe/post?u=16b832d9ad4b28edf261f34df&id=a1666656e0" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate">
<input name="EMAIL" type="text" placeholder="email address" />
<button class="search_submit" type="submit">Subscribe</button>
</form>
</div>
<div class="bw">
<div id="spnsrlist-b"></div>
</div>
<div class="so wg">
<div class="fir">
<a href="http://www.smashingmagazine.com/books/#digital-adaptation" style="border: none;">
<img src="http://www.smashingmagazine.com/wp-content/uploads/2013/04/sidebar-digital-adaptation-paul-boag-v5-opt.png" alt="Digital Adaptation by Paul Boag">
</a>
<p>Nothing is more frustrating than <strong>stubborn management</strong>. That's why we have published <a href="http://www.smashingmagazine.com/books/#digital-adaptation">Digital Adaptation</a>, a new book by Paul Boag on how to help management overcome legacy practices – for good.</p>
</div>
<div class="sec">
<a href="http://www.smashingmagazine.com/smashing-book-4-new-perspectives/?pk_campaign=sb4-sidebar"><img src="http://www.smashingmagazine.com/wp-content/uploads/2013/04/Smashing-Book-4-sidebar-transparent-opt.png" alt="Smashing Book #4"></a>
<p>It's done. The <a href="http://www.smashingmagazine.com/smashing-book-4-new-perspectives/?pk_campaign=sb4-sidebar">Smashing Book #4</a>, our brand new book with smart <strong>front-end techniques</strong> and design approaches. Written by respected designers and developers, neatly packed in a gorgeous hardcover.</p>
</div>
<div class="thi">
<a href="http://www.smashingmagazine.com/ebooks/?pk_campaign=sb4-sidebar">
<img src="http://www.smashingmagazine.com/wp-content/uploads/2014/08/sidebar-smashing-library.png" alt="Smashing Library">
</a>
<p>Hungry for more content? Over 60 <strong>eBooks</strong> are waiting to be discovered in our lovely <a href="http://www.smashingmagazine.com/ebooks/?pk_campaign=sb4-sidebar">Smashing Library</a>. And guess what? You can watch Smashing Conference talks there, too.</p>
</div>
</div>
<div class="bw">
<div id="spnsrlist-c"></div>
</div>
<div class="wg">
<div id="jobs">
<h3>
<a href="http://jobs.smashingmagazine.com/?pk_campaign=sm&piwik_kwd=widget">
<span>Smashing Job Board</span>
<img src="http://www.smashingmagazine.com/files/smashing-widget/v006/img/sm-jobs.png" alt="Smashing Jobs">
</a>
</h3>
<ul class="tl">
<li style="display:none;"></li>
<ul class="tl"><li class="clearfix"><a href="http://feedproxy.google.com/~r/smjobs/~3/l1iopv9T-xg/2415960">Senior Web/Graphic Designer – RateHub – (Toronto, ON) – FullTime</a><p>Position for hire: Senior Web / Graphic designer
Location: Downtown Toronto, ON
Start Date: As soon as possible
About us
We’re a talen…</p></li><li class="clearfix"><a href="http://feedproxy.google.com/~r/smjobs/~3/ODntye-bheY/2415959">Senior Front-End Engineer (Yes, You can Work from Home) – Twin Technologies – (Altamont, New York) – FullTime</a><p>About the Opportunity
We are seeking a few good men and women to help build a “best of breed” eCommerce platform that supports the creation, maintenance…</p></li></ul> </ul>
<a class="cr" href="http://jobs.smashingmagazine.com?pk_campaign=sm&piwik_kwd=widget">View more job openings…</a>
</div>
</div>
<div id="sidebar_special-1"></div>
<div id="sidebar_special-2"></div>
<div class="sidebar_sky" id="sidebar_sky-1"></div>
<div class="sidebar_sky" id="sidebar_sky-2"></div>
</div>
</div><div id="footer">
<div class="fp clearfix">
<a class="pi" href="http://www.smashingmagazine.com/smashing-book-4-new-perspectives/?pk_campaign=sb4-footer"><img src="http://www.smashingmagazine.com/wp-content/uploads/2013/10/smashing-book-4-footer-opt.png" alt="Smashing Book #4"></a>
<p class="pd">
<a href="http://www.smashingmagazine.com/smashing-book-4-new-perspectives/?pk_campaign=sb4-footer"><strong>Smashing Book #4</strong></a><br />Get our brand new Smashing Book #4, available as print and eBook. <a href="http://www.smashingmagazine.com/smashing-book-4-new-perspectives/?pk_campaign=sb4-footer">Learn more…</a>
</p>
</div>
<div class="fp clearfix">
<a class="pi" href="https://shop.smashingmagazine.com/smashing-library-complete.html?pk_campaign=smashingmagazine-footer"><img src="http://www.smashingmagazine.com/wp-content/uploads/2013/10/smashing-library-footer-new-opt.png" alt="The Smashing Library"></a>
<p class="pd">
<a href="https://shop.smashingmagazine.com/smashing-library-complete.html?pk_campaign=smashingmagazine-footer"><strong>The Smashing Library</strong></a><br />Grab all published and upcoming Smashing eBooks, in one swoop. <a href="https://shop.smashingmagazine.com/smashing-library-complete.html?pk_campaign=smashingmagazine-footer">Learn more…</a>
</p>
</div>
<div class="fp clearfix">
<a class="pi" href="http://www.smashingmagazine.com/smashing-workshops/"><img src="http://www.smashingmagazine.com/wp-content/uploads/2013/08/footer-brad-frost-opt.jpg" alt="Smashing Workshops"></a>
<p class="pd">
<a href="http://www.smashingmagazine.com/smashing-workshops/"><strong>Smashing Workshops</strong></a><br />Join our hands-on full-day workshops, run by experts of the industry. Good stuff. <a href="http://www.smashingmagazine.com/smashing-workshops/">Learn more…</a>
</p>
</div><p class="stmt"><em>With a commitment to quality content for the design community.</em><br />Founded by Vitaly Friedman and Sven Lennartz. 2006-2014.<br />Made in Germany. ? <a href="http://www.smashingmagazine.com/write-for-us/">Write for us</a> – <a href="http://www.smashingmagazine.com/contact/">Contact us</a> – <a href="http://www.smashingmagazine.com/about/">Impressum</a>.</p>
</div>
<script type="text/javascript">var clicky_site_ids=clicky_site_ids||[];clicky_site_ids.push(2727),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//static.getclicky.com/js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)}();</script><noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/2727ns.gif" /></p></noscript>
<script type='text/javascript' src='http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/javascripts/ads.min.js?ver=2014.1.3'></script>
<script type="text/javascript">var elements=["http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/javascripts/onload.min.js?ver=2014.12.0","http://www.smashingmagazine.com/wp-content/themes/smashing-magazine/javascripts/prism.js"],downloadJSAtOnload=function(n){if("[object Array]"!==Object.prototype.toString.call(n))return 0;var t,e;for(t=0;t<n.length;t++)e=document.createElement("script"),e.src=n[t],document.body.appendChild(e);return !0};window.addEventListener ? window.addEventListener("load",function(){downloadJSAtOnload(elements)},!1):window.attachEvent ? window.attachEvent("onload",function(){downloadJSAtOnload(elements)}):window.onload=function(){downloadJSAtOnload(elements)};window.onload=function(){var avatars=document.querySelectorAll('.avatar');for(var i=0,length=avatars.length;i<length;i++){var gravatar_url=avatars[i].getAttribute('data-gravatar-url');avatars[i].src=gravatar_url;}};</script>
<script type='text/javascript'>/* <![CDATA[ */ SmashingAds.load(); /* ]]> */</script><script type='text/javascript'>/* <![CDATA[ */ SmashingAds.postLoad(); /* ]]> */</script><script type='text/javascript'>/* <![CDATA[ */ SmashingAds.postPostLoad(); /* ]]> */</script>
<script type="text/javascript">(function(){"use strict";if("querySelector" in document){var forEach=function(array,callback,scope){for(var i=0;i<array.length;i++){callback.call(scope,i,array[i]);}};var articles=document.getElementsByTagName("article");forEach(articles,function(i,el){var tagElements=el.querySelectorAll("li.tags a");var tags=[];forEach(tagElements,function(i,el){var content=el.innerText||el.textContent;tags.push(content.toLowerCase());});var image=el.querySelector(".at");if(image)image.setAttribute("data-adt-keywords",tags);});adtile("[data-adt-keywords]",{apiKey:"4624ca9f-0982-442f-b691-bb5f04643a74",channel:"technology",keywords:["Smashing Conference","Smashingconf","Whistler","Front-end","CSS","Javascript"],taglineFontFamily:"'Proxima Nova Bold','Helvetica Neue',Helvetica,Arial,sans-serif",taglineBorderRadius:"1.25em",colors:{iconBackground:"#e53b2c",closeButtonBackground:"#e53b2c"}});}})();</script>
</body></html>
<end node> 5P9i0s8y19Z
dt=
<node>WARNINGS
1
[FORMS]
DO not use name="name" into inputs. RETURNS PAGE NOT FOUND
<end node> 5P9i0s8y19Z
