Skip to content

Instantly share code, notes, and snippets.

View MakarandMane's full-sized avatar
🎯
Focusing

Makarand Mane MakarandMane

🎯
Focusing
View GitHub Profile
@MrVibe
MrVibe / functions.php
Last active August 30, 2020 17:36
Get top 15 quiz scorers
add_shortcode('wplms_quiz_top_scorers',function($atts,$content = null){
extract(shortcode_atts(array(
'count' => 5,
)));
global $wpdb;
@ahmadawais
ahmadawais / aa_URLtoAttachmentID.php
Created August 16, 2014 12:06
Get the Attachment ID from an Image URL in WordPress
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