code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php /** * WordPress 基础配置文件。 * * 本文件包含以下配置选项:MySQL 设置、数据库表名前缀、密钥、 * WordPress 语言设定以及 ABSPATH。如需更多信息,请访问 * {@link http://codex.wordpress.org/zh-cn:%E7%BC%96%E8%BE%91_wp-config.php * 编辑 wp-config.php} Codex 页面。MySQL 设置具体信息请咨询您的空间提供商。 * * 这个文件用在于安装程序自动生成 wp-config.php 配置文件, * 您可以手动复制这个文件,并重命名为“wp-conf...
PHP
<?php /** * Loads the WordPress environment and template. * * @package WordPress */ if ( !isset($wp_did_header) ) { $wp_did_header = true; require_once( dirname(__FILE__) . '/wp-load.php' ); wp(); require_once( ABSPATH . WPINC . '/template-loader.php' ); }
PHP
<?php /** Sets up the WordPress Environment. */ require( dirname(__FILE__) . '/wp-load.php' ); add_action( 'wp_head', 'wp_no_robots' ); require( './wp-blog-header.php' ); if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) =...
PHP
<?php /** * Facilitates adding of the WordPress editor as used on the Write and Edit screens. * * @package WordPress * @since 3.3.0 * * Private, not included by default. See wp_editor() in wp-includes/general-template.php. */ final class _WP_Editors { public static $mce_locale; private static $mce_settings =...
PHP
<?php /** * Deprecated functions from past WordPress versions. You shouldn't use these * functions and look for the alternatives instead. The functions will be * removed in a later version. * * @package WordPress * @subpackage Deprecated */ /* * Deprecated functions come here to die. */ /** * Entire Post da...
PHP
<?php /** * API for fetching the HTML to embed remote content based on a provided URL. * Used internally by the {@link WP_Embed} class, but is designed to be generic. * * @link http://codex.wordpress.org/oEmbed oEmbed Codex Article * @link http://oembed.com/ oEmbed Homepage * * @package WordPress * @subpackage ...
PHP
<?php /** * BackPress Styles enqueue. * * These classes were refactored from the WordPress WP_Scripts and WordPress * script enqueue API. * * @package BackPress * @since r74 */ /** * BackPress Styles enqueue class. * * @package BackPress * @uses WP_Dependencies * @since r74 */ class WP_Styles extends WP_...
PHP
<?php /** * Navigation Menu template functions * * @package WordPress * @subpackage Nav_Menus * @since 3.0.0 */ /** * Create HTML list of nav menu items. * * @package WordPress * @since 3.0.0 * @uses Walker */ class Walker_Nav_Menu extends Walker { /** * @see Walker::$tree_type * @since 3.0.0 * @var...
PHP
<?php /** * Author Template functions for use in themes. * * These functions must be used within the WordPress Loop. * * @link http://codex.wordpress.org/Author_Templates * * @package WordPress * @subpackage Template */ /** * Retrieve the author of the current post. * * @since 1.5 * @uses $authordata The ...
PHP
<?php /** * Main WordPress API * * @package WordPress */ require( ABSPATH . WPINC . '/option.php' ); /** * Converts given date string into a different format. * * $format should be either a PHP date format string, e.g. 'U' for a Unix * timestamp, or 'G' for a Unix timestamp assuming that $date is GMT. * * I...
PHP
<?php /** * General API for generating and formatting diffs - the differences between * two sequences of strings. * * The original PHP version of this code was written by Geoffrey T. Dairiki * <dairiki@dairiki.org>, and is used/adapted with his permission. * * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki....
PHP
<?php /** * Class used internally by Diff to actually compute the diffs. * * This class uses the xdiff PECL package (http://pecl.php.net/package/xdiff) * to compute the differences between the two input arrays. * * Copyright 2004-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING f...
PHP
<?php /** * Class used internally by Diff to actually compute the diffs. * * This class uses the Unix `diff` program via shell_exec to compute the * differences between the two input arrays. * * Copyright 2007-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license informati...
PHP
<?php /** * Class used internally by Text_Diff to actually compute the diffs. * * This class is implemented using native PHP code. * * The algorithm used here is mostly lifted from the perl module * Algorithm::Diff (version 1.06) by Ned Konz, which is available at: * http://www.perl.com/CPAN/authors/id/N/NE/NEDK...
PHP
<?php /** * A class to render Diffs in different formats. * * This class renders the diff in classic diff format. It is intended that * this class be customized via inheritance, to obtain fancier outputs. * * Copyright 2004-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for lic...
PHP
<?php /** * "Inline" diff renderer. * * Copyright 2004-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, see http://opensource.org/licenses/lgpl-license.php. * * @author Ciprian Popovici * @package Text_Diff */...
PHP
<?php /** * Defines constants and global variables that can be overridden, generally in wp-config.php. * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ /** * Defines Multisite upload constants. * * @since 3.0.0 */ function ms_upload_constants( ) { global $wpdb; /** @since 3.0.0 */ // Bas...
PHP
<?php /** * RSS2 Feed Template for displaying RSS2 Comments feed. * * @package WordPress */ header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> <rss version="2.0" xmlns:content="h...
PHP
<?php /** * BackPress Scripts enqueue. * * These classes were refactored from the WordPress WP_Scripts and WordPress * script enqueue API. * * @package BackPress * @since r74 */ /** * BackPress enqueued dependiences class. * * @package BackPress * @uses _WP_Dependency * @since r74 */ class WP_Dependencie...
PHP
<?php /** * Taxonomy API * * @package WordPress * @subpackage Taxonomy * @since 2.3.0 */ // // Taxonomy Registration // /** * Creates the initial taxonomies. * * This function fires twice: in wp-settings.php before plugins are loaded (for * backwards compatibility reasons), and again on the 'init' action. W...
PHP
<?php /** * WordPress Rewrite API * * @package WordPress * @subpackage Rewrite */ /** * Add a straight rewrite rule. * * @see WP_Rewrite::add_rule() for long description. * @since 2.1.0 * * @param string $regex Regular Expression to match request against. * @param string $redirect Page to redirect to. * @...
PHP
<?php /** * BackPress styles procedural API. * * @package BackPress * @since r79 */ /** * Display styles that are in the queue or part of $handles. * * @since r79 * @uses do_action() Calls 'wp_print_styles' hook. * @global object $wp_styles The WP_Styles object for printing styles. * * @param array|bool $h...
PHP
<?php if ( ! defined( 'ABSPATH' ) ) exit; // deprecated, not used function mce_escape($text) { return esc_js($text); } function wp_mce_translation() { $default = array( 'common' => array( 'edit_confirm' => __('Do you want to use the WYSIWYG mode for this textarea?'), 'apply' => __('Apply'), 'insert' =...
PHP
<?php /** * config.php * * @package MCManager.includes */ // General settings $config['general.engine'] = 'GoogleSpell'; //$config['general.engine'] = 'PSpell'; //$config['general.engine'] = 'PSpellShell'; //$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php'; // PSpell settings $c...
PHP
<?php /** * @package TinyMCE * @author Moxiecode * @copyright Copyright © 2005-2006, Moxiecode Systems AB, All rights reserved. */ /** @ignore */ require_once('../../../wp-load.php'); header('Content-Type: text/html; charset=' . get_bloginfo('charset')); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml...
PHP
<?php /** * Disable error reporting * * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging */ error_reporting(0); $basepath = dirname(__FILE__); function get_file($path) { if ( function_exists('realpath') ) $path = realpath($path); if ( ! $path || ! @is_file($path) ) ...
PHP
<?php /** * Multisite upload handler. * * @since 3.0.0 * * @package WordPress * @subpackage Multisite */ define( 'SHORTINIT', true ); require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); if( !is_multisite() ) die( 'Multisite support not enabled' ); ms_file_constants(); error_reporting( 0 ); if ...
PHP
<?php /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | | Version: 5.2.1 | | Site: https://code.google.com/a/apache-extras.org...
PHP
<?php /** * Simple and uniform HTTP request API. * * Will eventually replace and standardize the WordPress HTTP requests made. * * @link http://trac.wordpress.org/ticket/4779 HTTP API Proposal * * @package WordPress * @subpackage HTTP * @since 2.7.0 */ /** * Returns the initialized WP_Http Object * * @sin...
PHP
<?php /** * WP_Theme Class * * @package WordPress * @subpackage Theme */ final class WP_Theme implements ArrayAccess { /** * Headers for style.css files. * * @static * @access private * @var array */ private static $file_headers = array( 'Name' => 'Theme Name', 'ThemeURI' => 'Theme UR...
PHP
<?php /** * API for creating dynamic sidebar without hardcoding functionality into * themes. Includes both internal WordPress routines and theme use routines. * * This functionality was found in a plugin before WordPress 2.2 release which * included it in the core from that point on. * * @link http://codex.wordp...
PHP
<?php /** * mail_fetch/setup.php * * Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved * Modified by Philippe Mingo 2001-2009 mingo@rotedic.com * An RFC 1939 compliant wrapper class for the POP3 protocol. * * Licensed under the GNU GPL. For full terms see the file COPYING. * * POP3 class ...
PHP
<?php /** * Manages WordPress comments * * @package WordPress * @subpackage Comment */ /** * Checks whether a comment passes internal checks to be allowed to add. * * If comment moderation is set in the administration, then all comments, * regardless of their type and whitelist will be set to false. If the nu...
PHP
<?php /** * Customize Control Class * * @package WordPress * @subpackage Customize * @since 3.4.0 */ class WP_Customize_Control { public $manager; public $id; // All settings tied to the control. public $settings; // The primary setting for the control (if there is one). public $setting = 'default'; pu...
PHP
<?php /** * WordPress Diff bastard child of old MediaWiki Diff Formatter. * * Basically all that remains is the table structure and some method names. * * @package WordPress * @subpackage Diff */ if ( !class_exists( 'Text_Diff' ) ) { /** Text_Diff class */ require( dirname(__FILE__).'/Text/Diff.php' ); /** T...
PHP
<?php /** * General template tags that can go anywhere in a template. * * @package WordPress * @subpackage Template */ /** * Load header template. * * Includes the header template for a theme or if a name is specified then a * specialised header will be included. * * For the parameter, if the file is called...
PHP
<?php /** * Customize Setting Class * * @package WordPress * @subpackage Customize * @since 3.4.0 */ class WP_Customize_Setting { public $manager; public $id; public $type = 'theme_mod'; public $capability = 'edit_theme_options'; public $theme_supports = ''; public $default = ''; ...
PHP
<?php /** * WordPress implementation for PHP functions either missing from older PHP versions or not included by default. * * @package PHP * @access private */ // If gettext isn't available if ( !function_exists('_') ) { function _($string) { return $string; } } if ( !function_exists('mb_substr') ): functio...
PHP
<?php /** * WordPress DB Class * * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)} * * @package WordPress * @subpackage Database * @since 0.71 */ /** * @since 0.71 */ define( 'EZSQL_VERSION', 'WP1.25' ); /** * @since 0.71 */ define( 'OBJECT', 'OBJECT', true ); /...
PHP
<?php /** * Deprecated. No longer needed. * * @package WordPress */ _deprecated_file( basename(__FILE__), '3.1', null, __( 'This file no longer needs to be included.' ) );
PHP
<?php /** * Send XML response back to AJAX request. * * @package WordPress * @since 2.1.0 */ class WP_Ajax_Response { /** * Store XML responses to send. * * @since 2.1.0 * @var array * @access private */ var $responses = array(); /** * Constructor - Passes args to {@link WP_Ajax_Response::add()}....
PHP
<?php /** * A simple set of functions to check our version 1.0 update service. * * @package WordPress * @since 2.3.0 */ /** * Check WordPress version against the newest version. * * The WordPress version, PHP version, and Locale is sent. Checks against the * WordPress server at api.wordpress.org server. Will ...
PHP
<?php /** * Multisite WordPress API * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ /** * Gets the network's site and user counts. * * @since MU 1.0 * @uses get_blog_count() * @uses get_user_count() * * @return array Site and user count for the network. */ function get_sitestats() { glo...
PHP
<?php /** * Theme, template, and stylesheet functions. * * @package WordPress * @subpackage Theme */ /** * Returns an array of WP_Theme objects based on the arguments. * * Despite advances over get_themes(), this function is quite expensive, and grows * linearly with additional themes. Stick to wp_get_theme()...
PHP
<?php class WP_Admin_Bar { private $nodes = array(); private $bound = false; public $user; public function __get( $name ) { switch ( $name ) { case 'proto' : return is_ssl() ? 'https://' : 'http://'; break; case 'menu' : _deprecated_argument( 'WP_Admin_Bar', '3.3', 'Modify admin bar nodes with ...
PHP
<?php /** * WP_HTTP_IXR_Client * * @package WordPress * @since 3.1.0 * */ class WP_HTTP_IXR_Client extends IXR_Client { function __construct($server, $path = false, $port = false, $timeout = 15) { if ( ! $path ) { // Assume we have been given a URL instead $bits = parse_url($server); $this->scheme = ...
PHP
<?php if ( ! class_exists( 'SimplePie' ) ) : /** * SimplePie * * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * * Copyright (c) 2004-2011, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and us...
PHP
<?php /** * Portable PHP password hashing framework. * @package phpass * @since 2.5 * @version 0.3 / WordPress * @link http://www.openwall.com/phpass/ */ # # Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in # the public domain. Revised in subsequent years, still public domain. # # Th...
PHP
<?php /** * Used to set up and fix common variables and include * the Multisite procedural and class library. * * Allows for some configuration in wp-config.php (see ms-default-constants.php) * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ /** Include Multisite initialization functions */ req...
PHP
<?php /** * WordPress scripts and styles default loader. * * Most of the functionality that existed here was moved to * {@link http://backpress.automattic.com/ BackPress}. WordPress themes and * plugins will only be concerned about the filters and actions set in this * file. * * Several constants are used to ma...
PHP
<?php /** * Navigation Menu functions * * @package WordPress * @subpackage Nav_Menus * @since 3.0.0 */ /** * Returns a navigation menu object. * * @since 3.0.0 * * @uses get_term * @uses get_term_by * * @param string $menu Menu id, slug or name * @return mixed false if $menu param isn't supplied or term...
PHP
<?php /** * IXR - The Incutio XML-RPC Library * * Copyright (c) 2010, Incutio Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the ab...
PHP
<?php /** * Deprecated. Use WP_HTTP (http.php, class-http.php) instead. */ _deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/http.php' ); if ( !class_exists( 'Snoopy' ) ) : /************************************************* Snoopy - the PHP net client Author: Monte Ohrt <monte@ispi.net> Copyright (c): 1999-...
PHP
<?php /** * kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes * Copyright (C) 2002, 2003, 2005 Ulf Harnhammar * * This program is free software and open source software; you can redistribute * it and/or modify it under the terms of the GNU General Public License as * published by the F...
PHP
<?php /** * Category Template Tags and API. * * @package WordPress * @subpackage Template */ /** * Retrieve category link URL. * * @since 1.0.0 * @see get_term_link() * * @param int|object $category Category ID or object. * @return string Link on success, empty string if category does not exist. */ functi...
PHP
<?php /** * Bookmark Template Functions for usage in Themes * * @package WordPress * @subpackage Template */ /** * The formatted output of a list of bookmarks. * * The $bookmarks array must contain bookmark objects and will be iterated over * to retrieve the bookmark to be used in the output. * * The output...
PHP
<?php /** * RSS 0.92 Feed Template for displaying RSS 0.92 Posts feed. * * @package WordPress */ header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); $more = 1; echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> <rss version="0.92">...
PHP
<?php /** * WordPress Post Template Functions. * * Gets content for the current post in the loop. * * @package WordPress * @subpackage Template */ /** * Display the ID of the current item in the WordPress Loop. * * @since 0.71 */ function the_ID() { echo get_the_ID(); } /** * Retrieve the ID of the curre...
PHP
<?php /** * WordPress API for media display. * * @package WordPress */ /** * Scale down the default size of an image. * * This is so that the image is a better fit for the editor and theme. * * The $size parameter accepts either an array or a string. The supported string * values are 'thumb' or 'thumbnail' f...
PHP
<?php /** * @package WordPress * @subpackage Theme_Compat * @deprecated 3.0 * * This file is here for Backwards compatibility with old themes and will be removed in a future version * */ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s t...
PHP
<?php /** * @package WordPress * @subpackage Theme_Compat * @deprecated 3.0 * * This file is here for Backwards compatibility with old themes and will be removed in a future version * */ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s t...
PHP
<?php /** * @package WordPress * @subpackage Theme_Compat * @deprecated 3.0 * * This file is here for Backwards compatibility with old themes and will be removed in a future version * */ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s t...
PHP
<?php /** * @package WordPress * @subpackage Theme_Compat * @deprecated 3.0 * * This file is here for Backwards compatibility with old themes and will be removed in a future version * */ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s t...
PHP
<?php /** * @package WordPress * @subpackage Theme_Compat * @deprecated 3.0 * * This file is here for Backwards compatibility with old themes and will be removed in a future version * */ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s t...
PHP
<?php if ( !class_exists('SimplePie') ) require_once (ABSPATH . WPINC . '/class-simplepie.php'); class WP_Feed_Cache extends SimplePie_Cache { /** * Create a new SimplePie_Cache object * * @static * @access public */ function create($location, $filename, $extension) { return new WP_Feed_Cache_Transient...
PHP
<?php /** * Deprecated functions from WordPress MU and the multisite feature. You shouldn't * use these functions and look for the alternatives instead. The functions will be * removed in a later version. * * @package WordPress * @subpackage Deprecated * @since 3.0.0 */ /* * Deprecated functions come here to ...
PHP
<?php /** * Deprecated. Use rss.php instead. * * @package WordPress */ _deprecated_file( basename(__FILE__), '2.1', WPINC . '/rss.php' ); require_once (ABSPATH . WPINC . '/rss.php');
PHP
<?php /** * Link/Bookmark API * * @package WordPress * @subpackage Bookmark */ /** * Retrieve Bookmark data * * @since 2.1.0 * @uses $wpdb Database Object * * @param mixed $bookmark * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant * @param string $filter Optional, default is '...
PHP
<?php /** * Default Widgets * * @package WordPress * @subpackage Widgets */ /** * Pages widget class * * @since 2.8.0 */ class WP_Widget_Pages extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'widget_pages', 'description' => __( 'Your site&#8217;s WordPress Pages') ); pare...
PHP
<?php /** * Creates common globals for the rest of WordPress * * Sets $pagenow global which is the current page. Checks * for the browser to set which one is currently being used. * * Detects which user environment WordPress is being used on. * Only attempts to check for Apache and IIS. Two web servers * with k...
PHP
<?php /** * Atom Feed Template for displaying Atom Posts feed. * * @package WordPress */ header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true); $more = 1; echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> <feed xmlns="http://www.w3.org...
PHP
<?php /** * WordPress Translation API * * @package WordPress * @subpackage i18n */ /** * Gets the current locale. * * If the locale is set, then it will filter the locale in the 'locale' filter * hook and return the value. * * If the locale is not set already, then the WPLANG constant is used if it is * de...
PHP
<?php /** * These functions are needed to load Multisite. * * @since 3.0.0 * * @package WordPress * @subpackage Multisite */ /** * Whether a subdomain configuration is enabled. * * @since 3.0.0 * * @return bool True if subdomain configuration is enabled, false otherwise. */ function is_subdomain_install()...
PHP
<?php /** * Loads the correct template based on the visitor's url * @package WordPress */ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) do_action('template_redirect'); // Process feeds and trackbacks even if not using themes. if ( is_robots() ) : do_action('do_robots'); return; elseif ( is_feed() ) : do_feed...
PHP
<?php /** * WordPress Query API * * The query API attempts to get which part of WordPress to the user is on. It * also provides functionality to getting URL query information. * * @link http://codex.wordpress.org/The_Loop More information on The Loop. * * @package WordPress * @subpackage Query */ /** * Retr...
PHP
<?php /** * Customize Section Class * * @package WordPress * @subpackage Customize * @since 3.4.0 */ class WP_Customize_Section { public $manager; public $id; public $priority = 10; public $capability = 'edit_theme_options'; public $theme_supports = ''; public $title = ''; public $descr...
PHP
<?php /** * Metadata API * * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata * for an object is a represented by a simple key-value pair. Objects may contain multiple * metadata entries that share the same key and differ only in their value. * * @package WordPress ...
PHP
<?php /** * RSS 1 RDF Feed Template for displaying RSS 1 Posts feed. * * @package WordPress */ header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true); $more = 1; echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> <rdf:RDF xmlns="http://pur...
PHP
<?php /** * A class for displaying various tree-like structures. * * Extend the Walker class to use it, see examples at the below. Child classes * do not need to implement all of the abstract methods in the class. The child * only needs to implement the methods that are needed. Also, the methods are * not strictl...
PHP
<?php /** * WordPress User API * * @package WordPress */ /** * Authenticate user with remember capability. * * The credentials is an array that has 'user_login', 'user_password', and * 'remember' indices. If the credentials is not given, then the log in form * will be assumed and used if set. * * The variou...
PHP
<?php /** * Option API * * @package WordPress */ /** * Retrieve option value based on name of option. * * If the option does not exist or does not have a value, then the return value * will be false. This is useful to check whether you need to install an option * and is commonly used during installation of pl...
PHP
<?php /** * WordPress API for creating bbcode like tags or what WordPress calls * "shortcodes." The tag and attribute parsing or regular expression code is * based on the Textpattern tag parser. * * A few examples are below: * * [shortcode /] * [shortcode foo="bar" baz="bing" /] * [shortcode foo="bar"]content[...
PHP
<?php /** * Deprecated. No longer needed. * * @package WordPress */ _deprecated_file( basename(__FILE__), '2.1', null, __( 'This file no longer needs to be included.' ) );
PHP
<?php /** * WordPress Roles and Capabilities. * * @package WordPress * @subpackage User */ /** * WordPress User Roles. * * The role option is simple, the structure is organized by role name that store * the name in value of the 'name' key. The capabilities are stored as an array * in the value of the 'capabi...
PHP
<?php /** * Atom Syndication Format PHP Library * * @package AtomLib * @link http://code.google.com/p/phpatomlib/ * * @author Elias Torres <elias@torrez.us> * @version 0.4 * @since 2.3 */ /** * Structure that store common Atom Feed Properties * * @package AtomLib */ class AtomFeed { /** * Stores Links ...
PHP
<?php /** * The WordPress version string * * @global string $wp_version */ $wp_version = '3.4.1'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ $wp_db_version = 21115; /** * Holds the TinyMCE version * * @global string ...
PHP
<?php /** * XML-RPC protocol support for WordPress * * @package WordPress */ /** * WordPress XMLRPC server implementation. * * Implements compatibility for Blogger API, MetaWeblog API, MovableType, and * pingback. Additional WordPress API for managing comments, pages, posts, * options, etc. * * Since WordPr...
PHP
<?php /** * RSS2 Feed Template for displaying RSS2 Posts feed. * * @package WordPress */ header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); $more = 1; echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> <rss version="2.0" xmlns:c...
PHP
<?php /** * WordPress Error API. * * Contains the WP_Error class and the is_wp_error() function. * * @package WordPress */ /** * WordPress Error class. * * Container for checking for WordPress errors and error messages. Return * WP_Error and use {@link is_wp_error()} to check if this class is returned. * Ma...
PHP
<?php /** * WordPress Feed API * * Many of the functions used in here belong in The Loop, or The Loop for the * Feeds. * * @package WordPress * @subpackage Feed */ /** * RSS container for the bloginfo function. * * You can retrieve anything that you can using the get_bloginfo() function. * Everything will ...
PHP
<?php if ( !class_exists( 'Services_JSON' ) ) : /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * Converts to and from JSON format. * * JSON (JavaScript Object Notation) is a lightweight data-interchange * format. It is easy for humans to read and write. It is easy for machines * to parse and ge...
PHP
<?php /** * Main WordPress Formatting API. * * Handles many functions for formatting output. * * @package WordPress **/ /** * Replaces common plain text characters into formatted entities * * As an example, * <code> * 'cause today's effort makes it worth tomorrow's "holiday"... * </code> * Becomes: * <co...
PHP
<?php /** * Defines constants and global variables that can be overridden, generally in wp-config.php. * * @package WordPress */ /** * Defines initial WordPress constants * * @see wp_debug_mode() * * @since 3.0.0 */ function wp_initial_constants( ) { global $blog_id; // set memory limits if ( !defined('W...
PHP
<?php /** * Date and Time Locale object * * @package WordPress * @subpackage i18n */ /** * Class that loads the calendar locale. * * @since 2.1.0 */ class WP_Locale { /** * Stores the translated strings for the full weekday names. * * @since 2.1.0 * @var array * @access private */ var $weekday; ...
PHP
<?php /** * WordPress environment setup class. * * @package WordPress * @since 2.0.0 */ class WP { /** * Public query variables. * * Long list of public query variables. * * @since 2.0.0 * @access public * @var array */ var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments',...
PHP
<?php /** * Comment template functions * * These functions are meant to live inside of the WordPress loop. * * @package WordPress * @subpackage Template */ /** * Retrieve the author of the current comment. * * If the comment has an empty comment_author field, then 'Anonymous' person is * assumed. * * @sin...
PHP
<?php /** * BackPress script procedural API. * * @package BackPress * @since r16 */ /** * Prints script tags in document head. * * Called by admin-header.php and by wp_head hook. Since it is called by wp_head * on every page load, the function does not instantiate the WP_Scripts object * unless script names ...
PHP
<?php /** * Template loading functions. * * @package WordPress * @subpackage Template */ /** * Retrieve path to a template * * Used to quickly retrieve the path of a template without including the file * extension. It will also check the parent theme, if the file exists, with * the use of {@link locate_templ...
PHP
<?php /** * These functions can be replaced via plugins. If plugins do not redefine these * functions, then these will be used instead. * * @package WordPress */ if ( !function_exists('wp_set_current_user') ) : /** * Changes the current user by ID or name. * * Set $id to null and specify a name if you do not k...
PHP
<?php /** * Deprecated pluggable functions from past WordPress versions. You shouldn't use these * functions and look for the alternatives instead. The functions will be removed in a * later version. * * Deprecated warnings are also thrown if one of these functions is being defined by a plugin. * * @package Word...
PHP