This file contains 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
function pn_get_attachment_id_from_url( $attachment_url = '' ) { | |
global $wpdb; | |
$attachment_id = false; | |
// If there is no url, return. | |
if ( '' == $attachment_url ) | |
return; | |
// Get the upload directory paths |