edit_link [ WordPress Function ]
edit_link ( $link_id = 0 )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Update or insert a link using values provided in $_POST.
Source
<?php
function edit_link( $link_id = 0 ) {
if ( !current_user_can( 'manage_links' ) )
wp_die( __( 'Cheatin’ uh?' ) );
$_POST['link_url'] = esc_html( $_POST['link_url'] );
$_POST['link_url'] = esc_url($_POST['link_url']);
$_POST['link_name'] = esc_html( $_POST['link_name'] );
$_POST['link_image'] = esc_html( $_POST['link_image'] );
$_POST['link_rss'] = esc_url($_POST['link_rss']);
if ( !isset($_POST['link_visible']) || 'N' != $_POST['link_visible'] )
$_POST['link_visible'] = 'Y';
if ( !empty( $link_id ) ) {
$_POST['link_id'] = $link_id;
return wp_update_link( $_POST );
} else {
return wp_insert_link( $_POST );
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- edit_link Wordpress hook details -- Adam Brown, BYU Political ...
WordPress hook directory edit_link. Description. Runs when a blogroll link is edited. Action function ... WordPress version history for edit_link. This database has ...
adambrown.info - edit_link | A HitchHackers guide through WordPress
Feb 11, 2011 ... function edit_link( $link_id = 0 ) { if ( !current_user_can( 'manage_links' ) ) wp_die ( __( 'Cheatin' uh?' ) ); $_POST['link_url'] = esc_html( ...
hitchhackerguide.com - Function Reference/edit post link « WordPress Codex
Edit Link: edit_post_link(), edit_comment_link(), edit_tag_link(), edit_bookmark_link(). See also index of Function Reference and index of Template Tags.
codex.wordpress.org - Sending {edit_link} in a later email (not immediately after submission)
Apr 28, 2011 ... But since I didn't, is there a way to email the edit_link long after the form ... I tried adding the {edit_link} tag within that reply (which would have ...
www.jotform.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- cybot on "non HTTP links in sidebar, how?"
- cybot on "non HTTP links in sidebar, how?"
- vkaryl on "non HTTP links in sidebar, how?"
- Otto on "non HTTP links in sidebar, how?"
- vkaryl on "non HTTP links in sidebar, how?"
- Otto on "non HTTP links in sidebar, how?"
- cybot on "non HTTP links in sidebar, how?"
- cybot on "non HTTP links in sidebar, how?"