This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP Docs Collection Class | |
* | |
* Stores data sets commonly referenced in WordPress inline documentation. | |
* | |
* @since 3.7.0 | |
*/ | |
class WP_Docs { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Unnamed_Theme { | |
public function __construct() { | |
add_filter( 'login_redirect', array( $this, 'login_redirect' ), 10, 3 ); | |
} | |
public function login_redirect( $redirect_to, $request, $user ) { | |
return admin_url( 'media-new.php' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Unnamed_Theme { | |
public function __construct() { | |
add_filter( 'wp_update_attachment_metadata', array( $this, 'update_image_date' ), 10, 2 ); | |
} | |
/** | |
* Update the 'post_date' field with the date in the image meta | |
* | |
* @param array $data The attachment meta array. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update one or more post fields | |
* | |
* @global wpdb $wpdb | |
* | |
* @param array $field Array of field/value pairs to update. | |
* @param WP_Post|int $post Post object or id. | |
* | |
* @return int|bool Number of updated rows, false on failure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @type string 'sort_column' What columns to sort pages by, comma-separated. | |
* Default 'post_title'. Accepts 'post_author', 'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'ID', 'rand', 'comment_count'). | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the link query arguments. | |
* | |
* Allows modification of the link query arguments before querying. | |
* | |
* @since 3.7.0 | |
* | |
* @param array $query { | |
* An array of query arguments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param array $query { | |
* WP_Query parameters. | |
* | |
* @type int 'author' Author id, or comma-separated list of ids | |
* @type string 'author_name' Use 'user_nicename' | |
* @type array 'author__in' Array of author ids to query from. | |
* @type array 'author__not_in' Array of author ids not to query from. | |
* @type int 'cat' Category id or comma-separated list of ids (this or any children) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @type string|bool $avatar_dir The name of the subdirectory where the requested avatar should | |
* be found. If no value is passed, 'avatar_dir' is inferred from 'object': 'user' becomes | |
* 'avatars', 'group' becomes 'group-avatars', 'blog' becomes 'blog-avatars'. Remember that | |
* this string denotes a subdirectory of BP's main avatar directory (usually based on | |
* {@link wp_upload_dir()}); it's a string like 'group-avatars' rather than the full directory | |
* path. Generally, it'll only be necessary to override the default value if storing avatars | |
* in a non-default location. Defaults to false (auto-detected). | |
* @type int|bool $width Requested avatar width. The unit is px. This value is used to build the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function can_haz_link( $id ) { | |
?> | |
<a href="#">Can haz link?</a> | |
<?php | |
} | |
add_action( 'wpmublogsaction', 'can_haz_link' ); |