Changeset 36646 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 02/23/2016 08:06:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r36494 r36646 908 908 * 909 909 * @since 3.1.0 910 * @since 4.5.0 The `$taxonomy` argument was made optional. 910 911 * 911 912 * @param int $term_id Term ID. 912 * @param string $taxonomy Taxonomy.913 * @param string $object_type The object type. Used to highlight the proper post type menu on the linked page.913 * @param string $taxonomy Optional. Taxonomy. Defaults to the taxonomy of the term identified by `$term_id`. 914 * @param string $object_type Optional. The object type. Used to highlight the proper post type menu on the linked page. 914 915 * Defaults to the first object_type associated with the taxonomy. 915 916 * @return string|null The edit term link URL for the given term, or null on failure. 916 917 */ 917 function get_edit_term_link( $term_id, $taxonomy, $object_type = '' ) { 918 $tax = get_taxonomy( $taxonomy ); 919 if ( ! $tax || ! current_user_can( $tax->cap->edit_terms ) ) { 920 return; 921 } 922 918 function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) { 923 919 $term = get_term( $term_id, $taxonomy ); 924 920 if ( ! $term || is_wp_error( $term ) ) { 921 return; 922 } 923 924 $tax = get_taxonomy( $term->taxonomy ); 925 if ( ! $tax || ! current_user_can( $tax->cap->edit_terms ) ) { 925 926 return; 926 927 }
Note: See TracChangeset
for help on using the changeset viewer.