Changeset 30544
- Timestamp:
- 11/24/2014 06:04:10 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin.php
r30199 r30544 15 15 * and the same goes for the plugin data. The below is formatted for printing. 16 16 * 17 * <code> 18 * /* 19 * Plugin Name: Name of Plugin 20 * Plugin URI: Link to plugin information 21 * Description: Plugin Description 22 * Author: Plugin author's name 23 * Author URI: Link to the author's web site 24 * Version: Must be set in the plugin for WordPress 2.3+ 25 * Text Domain: Optional. Unique identifier, should be same as the one used in 26 * plugin_text_domain() 27 * Domain Path: Optional. Only useful if the translations are located in a 28 * folder above the plugin's base path. For example, if .mo files are 29 * located in the locale folder then Domain Path will be "/locale/" and 30 * must have the first slash. Defaults to the base folder the plugin is 31 * located in. 32 * Network: Optional. Specify "Network: true" to require that a plugin is activated 33 * across all sites in an installation. This will prevent a plugin from being 34 * activated on a single site when Multisite is enabled. 35 * * / # Remove the space to close comment 36 * </code> 17 * /* 18 * Plugin Name: Name of Plugin 19 * Plugin URI: Link to plugin information 20 * Description: Plugin Description 21 * Author: Plugin author's name 22 * Author URI: Link to the author's web site 23 * Version: Must be set in the plugin for WordPress 2.3+ 24 * Text Domain: Optional. Unique identifier, should be same as the one used in 25 * plugin_text_domain() 26 * Domain Path: Optional. Only useful if the translations are located in a 27 * folder above the plugin's base path. For example, if .mo files are 28 * located in the locale folder then Domain Path will be "/locale/" and 29 * must have the first slash. Defaults to the base folder the plugin is 30 * located in. 31 * Network: Optional. Specify "Network: true" to require that a plugin is activated 32 * across all sites in an installation. This will prevent a plugin from being 33 * activated on a single site when Multisite is enabled. 34 * * / # Remove the space to close comment 37 35 * 38 36 * Plugin data returned array contains the following: 39 * 'Name' - Name of the plugin, must be unique. 40 * 'Title' - Title of the plugin and the link to the plugin's web site. 41 * 'Description' - Description of what the plugin does and/or notes 42 * from the author. 43 * 'Author' - The author's name 44 * 'AuthorURI' - The authors web site address. 45 * 'Version' - The plugin version number. 46 * 'PluginURI' - Plugin web site address. 47 * 'TextDomain' - Plugin's text domain for localization. 48 * 'DomainPath' - Plugin's relative directory path to .mo files. 49 * 'Network' - Boolean. Whether the plugin can only be activated network wide. 37 * 38 * - 'Name' - Name of the plugin, must be unique. 39 * - 'Title' - Title of the plugin and the link to the plugin's web site. 40 * - 'Description' - Description of what the plugin does and/or notes 41 * - from the author. 42 * - 'Author' - The author's name 43 * - 'AuthorURI' - The authors web site address. 44 * - 'Version' - The plugin version number. 45 * - 'PluginURI' - Plugin web site address. 46 * - 'TextDomain' - Plugin's text domain for localization. 47 * - 'DomainPath' - Plugin's relative directory path to .mo files. 48 * - 'Network' - Boolean. Whether the plugin can only be activated network wide. 50 49 * 51 50 * Some users have issues with opening large files and manipulating the contents … … 63 62 * @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations. 64 63 * @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations. 64 * 65 65 * @since 1.5.0 66 66 * -
trunk/src/wp-includes/pluggable.php
r30412 r30544 1773 1773 * for you. 1774 1774 * 1775 * <code> 1776 * define('AUTH_KEY', ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON'); 1777 * define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~'); 1778 * define('LOGGED_IN_KEY', '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM'); 1779 * define('NONCE_KEY', '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|'); 1780 * define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW'); 1781 * define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n'); 1782 * define('LOGGED_IN_SALT', '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm'); 1783 * define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT'); 1784 * </code> 1775 * define('AUTH_KEY', ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON'); 1776 * define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~'); 1777 * define('LOGGED_IN_KEY', '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM'); 1778 * define('NONCE_KEY', '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|'); 1779 * define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW'); 1780 * define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n'); 1781 * define('LOGGED_IN_SALT', '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm'); 1782 * define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT'); 1785 1783 * 1786 1784 * Salting passwords helps against tools which has stored hashed values of … … 2091 2089 * @param string $default URL to a default image to use if no avatar is available 2092 2090 * @param string $alt Alternative text to use in image tag. Defaults to blank 2093 * @return string <img> tag for the user's avatar2091 * @return string `<img>` tag for the user's avatar. 2094 2092 */ 2095 2093 function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) { -
trunk/src/wp-includes/plugin.php
r30105 r30544 46 46 * 47 47 * The following example shows how a callback function is bound to a filter hook. 48 * Note that $example is passed to the callback, (maybe) modified, then returned: 49 * 50 * <code> 51 * function example_callback( $example ) { 52 * // Maybe modify $example in some way 53 * return $example; 54 * } 55 * add_filter( 'example_filter', 'example_callback' ); 56 * </code> 48 * 49 * Note that `$example` is passed to the callback, (maybe) modified, then returned: 50 * 51 * function example_callback( $example ) { 52 * // Maybe modify $example in some way. 53 * return $example; 54 * } 55 * add_filter( 'example_filter', 'example_callback' ); 57 56 * 58 57 * Since WordPress 1.5.1, bound callbacks can take as many arguments as are 59 * passed as parameters in the corresponding apply_filters() call. The $accepted_args58 * passed as parameters in the corresponding apply_filters() call. The `$accepted_args` 60 59 * parameter allows for calling functions only when the number of args match. 61 60 * 62 * <strong>Note:</strong> the function will return true whether or not the callback63 * is valid.It is up to you to take care. This is done for optimization purposes,61 * *Note:* the function will return true whether or not the callback is valid. 62 * It is up to you to take care. This is done for optimization purposes, 64 63 * so everything is as quick as possible. 65 64 * … … 149 148 * 150 149 * The function allows for additional arguments to be added and passed to hooks. 151 * <code>152 * // Our filter callback function153 * function example_callback( $string, $arg1, $arg2 ) {154 * 155 * 156 * }157 * add_filter( 'example_filter', 'example_callback', 10, 3 );158 * 159 * // Apply the filters by calling the 'example_callback' function we160 * // "hooked" to 'example_filter' using the add_filter() function above.161 * // - 'example_filter' is the filter hook $tag162 * // - 'filter me' is the value being filtered163 * // - $arg1 and $arg2 are the additional arguments passed to the callback.164 * $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 );165 * </code>150 * 151 * // Our filter callback function 152 * function example_callback( $string, $arg1, $arg2 ) { 153 * // (maybe) modify $string 154 * return $string; 155 * } 156 * add_filter( 'example_filter', 'example_callback', 10, 3 ); 157 * 158 * /* 159 * * Apply the filters by calling the 'example_callback' function we 160 * * "hooked" to 'example_filter' using the add_filter() function above. 161 * * - 'example_filter' is the filter hook $tag 162 * * - 'filter me' is the value being filtered 163 * * - $arg1 and $arg2 are the additional arguments passed to the callback. 164 * $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 ); 166 165 * 167 166 * @since 0.71 … … 172 171 * 173 172 * @param string $tag The name of the filter hook. 174 * @param mixed $value The value on which the filters hooked to <tt>$tag</tt>are applied on.175 * @param mixed $var Additional variables passed to the functions hooked to <tt>$tag</tt>.173 * @param mixed $value The value on which the filters hooked to `$tag` are applied on. 174 * @param mixed $var Additional variables passed to the functions hooked to `$tag`. 176 175 * @return mixed The filtered value after all hooked functions are applied to it. 177 176 */ … … 225 224 * Execute functions hooked on a specific filter hook, specifying arguments in an array. 226 225 * 226 * @see 3.0.0 227 * 227 228 * @see apply_filters() This function is identical, but the arguments passed to the 228 * functions hooked to <tt>$tag</tt> are supplied using an array. 229 * 230 * @since 3.0.0 229 * functions hooked to `$tag` are supplied using an array. 231 230 * 232 231 * @global array $wp_filter Stores all of the filters … … 435 434 * Execute functions hooked on a specific action hook. 436 435 * 437 * This function invokes all functions attached to action hook $tag. It is436 * This function invokes all functions attached to action hook `$tag`. It is 438 437 * possible to create new action hooks by simply calling this function, 439 * specifying the name of the new hook using the <tt>$tag</tt>parameter.438 * specifying the name of the new hook using the `$tag` parameter. 440 439 * 441 440 * You can pass extra arguments to the hooks, much like you can with 442 * apply_filters().441 * {@see apply_filters()}. 443 442 * 444 443 * @since 1.2.0 445 444 * 446 * @see apply_filters() This function works similar with the exception that nothing447 * is returned and only the functions or methods are called.448 445 * @global array $wp_filter Stores all of the filters 449 446 * @global array $wp_actions Increments the amount of times action was triggered. … … 534 531 * 535 532 * @param string $tag The name of the action to be executed. 536 * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>537 * @return null Will return null if $tag does not exist in $wp_filter array533 * @param array $args The arguments supplied to the functions hooked to `$tag`. 534 * @return null Will return null if `$tag` does not exist in `$wp_filter` array. 538 535 */ 539 536 function do_action_ref_array($tag, $args) {
Note: See TracChangeset
for help on using the changeset viewer.