$serial ) ); update_option( 'mfrh_pro_status', _( "Your subscription is manually enabled." ) ); update_option( 'mfrh_pro_serial', _( $serial ) ); set_transient( 'mfrh_validated', $serial, 3600 * 24 * 100 ); /* add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } */ /**/ //add_action( 'init', 'add_author_rules' ); /* function add_author_rules() { add_rewrite_rule( "en-cours-2-page-?([0-9]{1,})/?", "index.php?page_id=804&toto=$matches[1]", "top"); $wp_rewrite->flush_rules(); } */ function google_jquery() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', false, '3.1.1'); wp_enqueue_script('jquery'); } } add_action('init', 'google_jquery'); function enqueue_my_scripts() { $lightbox_choice = dess_setting('dess_lightbox_choice'); if ($lightbox_choice == 'c') { //featherlight : http://noelboss.github.io/featherlight/ //selector: class="gallery" //wp_enqueue_script('jquery'); //include jQuery version bundled with Wordpress in your page //wp_enqueue_style( 'featherlight', get_template_directory_uri() . '/css/featherlight.min.css' ); //wp_enqueue_script('featherlight', get_template_directory_uri() . '/js/featherlight.min.js', array( 'jquery' ) ); wp_enqueue_style( 'featherlight', 'http://cdn.rawgit.com/noelboss/featherlight/1.7.0/release/featherlight.min.css' ); wp_enqueue_style( 'featherlight-gallery', 'http://cdn.rawgit.com/noelboss/featherlight/1.3.4/release/featherlight.gallery.min.css' ); wp_enqueue_style( 'featherlight2', get_stylesheet_directory_uri() . '/css/my-featherlight.css' ); wp_enqueue_script( 'featherlight', 'http://cdn.rawgit.com/noelboss/featherlight/1.7.0/release/featherlight.min.js', array( 'jquery' ), '',true ); wp_enqueue_script( 'featherlight-gallery', 'http://cdn.rawgit.com/noelboss/featherlight/1.3.4/release/featherlight.gallery.min.js', array( 'jquery', 'featherlight' ), '',true ); wp_enqueue_script( 'featherlight-script', get_stylesheet_directory_uri() . '/js/featherlight.js', array( 'jquery', 'featherlight' ), '',true ); } if ($lightbox_choice == 'b') { //colorbox : http://www.jacklmoore.com/colorbox/ //selector: class="slideshow" (ou "gallery") wp_enqueue_script( 'colorbox', get_stylesheet_directory_uri() . '/js/jquery.colorbox-min.js', array( 'jquery' ), '',false ); wp_enqueue_style( 'colorbox', get_stylesheet_directory_uri() . '/css/colorbox.css' ); wp_enqueue_script( 'colorbox-options', get_stylesheet_directory_uri() . '/js/my-colorbox.js', array( 'jquery', 'colorbox' ), '',true ); } if ($lightbox_choice == 'a') { //meow-box } } add_action( 'wp_enqueue_scripts', 'enqueue_my_scripts' ); /**/ function my_theme_enqueue_styles() { //$parent_style = 'CreatorThemeRes-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme. $parent_style = 'parent_style'; //wp_enqueue_style( 'genericons', get_stylesheet_directory_uri() . '/genericons/genericons.css' ); wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); add_filter( 'body_class', 'custom_class' ); function custom_class( $classes ) { /* if ( is_page_template( 'page-example.php' ) ) { $classes[] = 'example'; } */ if (is_archive()) { $classes[] = 'page-template-tpl-blog'; } return $classes; } function RelativeTime() { $jour = get_the_date('U'); $aujourdhui = date('U'); $delta = round(($aujourdhui - $jour) / (3600 * 24)); if ($delta == 0) $text = "aujourd'hui"; elseif ($delta == 1) $text = __("yesterday", 'CreatorThemeRes-child'); elseif ($delta == 2) $text = __("the day before yesterday", 'CreatorThemeRes-child'); elseif ($delta == 3) $text = __("two days ago", 'CreatorThemeRes-child'); elseif (($delta > 3) and ($delta <= 7)) $text = sprintf( __('%1$s days ago', 'CreatorThemeRes-child'), $delta ); elseif (($delta > 7) and ($delta <= 14)) { $nb = round ($delta / 7); if ($nb < 2) $text = sprintf( __('%1$s week ago', 'CreatorThemeRes-child'), $nb ); else $text = sprintf( __('%1$s weeks ago', 'CreatorThemeRes-child'), $nb ); } else $text = get_the_date(); /* printf( __( '%1$s', 'CreatorThemeRes-child' ), sprintf( ''.$text.'', get_permalink(), esc_attr( get_the_date() . ' ' . get_the_time() ) ) ); */ echo $text; } function getRandomFile($start_dir) { chdir($start_dir); $dir = opendir('.'); while (($myfile = readdir($dir)) !==false) { if ($myfile != '.' && $myfile != '..' && is_file($myfile) && $myfile != 'resource.frk') { $files[] = $myfile; } } closedir($dir); chdir('../'); srand ((float) microtime() * 10000000); $file = array_rand($files); return $files[$file]; } function preprint($s, $return=false) { $x = "
"; 
    $x .= print_r($s, 1); 
    $x .= "
"; if ($return) return $x; else print $x; } /* photo du mois */ function exif_date($date,$apn) { //'Model' => string 'Canon EOS 50D' (length=13) //50D: 'DateTimeOriginal' => string '2009:12:05 12:42:33' (length=19) //'Model' => string 'Canon EOS 7D' (length=12) //7D: DateTimeOriginal' => string '2010-02-20T15:07:05.24+01:00' (length=28) // -> 50D if (!preg_match("/7D/", $apn)) { $pieces = explode(' ', $date); list($yy, $mm, $dd) = explode(':', $pieces[0]); list($hh, $min, $ss) = explode(':', $pieces[1]); } // 7D else { $pieces = explode('T', $date); list($yy, $mm, $dd) = explode('-', $pieces[0]); $pieces_h = explode('.', $pieces[1]); list($hh, $min, $ss) = explode(':', $pieces_h[0]); } $timestamp = mktime((int) $hh, (int) $min, (int) $ss, (int) $mm, (int) $dd, (int) $yy, '-1'); $date = date('d.m.Y à H:i',$timestamp); return $date; } function mois2 ($mois) { switch ($mois) { case 00: $mois = "00"; break; case 1: $mois = __('January','CreatorThemeRes-child'); break; case 2: $mois = __('February','CreatorThemeRes-child'); break; case 3: $mois = __('March','CreatorThemeRes-child'); break; case 4: $mois = __('April','CreatorThemeRes-child'); break; case 5: $mois = __('May','CreatorThemeRes-child'); break; case 6: $mois = __('June','CreatorThemeRes-child'); break; case 7: $mois = __('July','CreatorThemeRes-child'); break; case 8: $mois = __('August','CreatorThemeRes-child'); break; case 9: $mois = __('September','CreatorThemeRes-child'); break; case 10: $mois = __('October','CreatorThemeRes-child'); break; case 11: $mois = __('November','CreatorThemeRes-child'); break; case 12: $mois = __('December','CreatorThemeRes-child'); break; } return $mois; } function display ($filename,$album) { $display = '
'. '
' . ''. ''. ''. '
'. '
'. ''. ''.date_archive($filename).''. '
'. '
'; return $display; } function displayRetina ($filename,$album) { global $ppage; if ($ppage == "1") { $fullpath = "../../zenphoto/"; } else { $fullpath = "../../../zenphoto/"; } $file = explode(".", $filename); $thumbpath = "../zenphoto/cache/" . $album . "/"; $a = $path . $filename; //echo $a. "
"; $file_sd = $thumbpath . $file[0] . "_180_thumb.jpg"; $file_hd = $thumbpath . $file[0] . "_360_thumb.jpg"; /* $file_sd = $path . $file[0] . "_180_watermark.jpg"; $file_hd = $path . $file[0] . "_360_watermark.jpg"; */ // $th_sd = false; $th_hd = false; if (file_exists($file_sd)) { $th_sd = true; $size_sd = getimagesize($file_sd, $info); $thumb['sd'] = array( 'url' => "../../" . $file_sd, 'width' => $size_sd[0], 'height' => $size_sd[1] ); } if (file_exists($file_hd)) { $th_hd = true; $size_hd = getimagesize($file_hd, $info); $thumb['hd'] = array( 'url' => "../../" . $file_hd, 'width' => $size_hd[0], 'height' => $size_hd[1] ); } //preprint($thumb); if (($th_sd == true) && ($th_hd == true)) { $standard = $thumb['sd']['url'] . ', ' . $thumb['hd']['url'] . ' 2x'; } elseif ($th_sd == true) { $standard = $thumb['sd']['url']; } elseif ($th_hd == true) { $standard = $thumb['hd']['url'] . ' 2x'; } $display = '
'; $display .= '
'; $display .= ''; $display .= ''; $display .= ''; $display .= ''; $display .= ''; $display .= ''; $display .= ''; $display .= ''; $display .= '
'; $display .= '
'; $display .= ''; $display .= ''.date_archive($filename).''; $display .= '
'; $display .= '
'; return $display; } function get_image_title ($photo) { $photo = '../zenphoto/albums/photos-du-mois/' . $photo; $size = getimagesize($photo, $info); if (isset($info["APP13"])) { $iptc = iptcparse($info["APP13"]); //print_r($iptc); $caption = isset($iptc['2#120'][0]); $graphic_name = isset($iptc['2#005'][0]); } return $caption; } function date_archive ($chaine) { $pieces = explode(".", $chaine); $b = explode("_", $pieces[0]); $mois = $b[0]; $an = $b[1]; $chaine = mois2($mois) . ' '. $an; return $chaine; } function zenphoto_handler($atts, $content=null) { //utilise le cacheManager de zenphoto (extensions/utilitaires/cacheManager) //utilisation: [zenphoto album="lievres" image="2008-08-18_Lievre_8927.jpg"] // [zenphoto album="sports-mecaniques/gp-france" image="2010-05-23_gp-france-2010_5321.jpg"] //taille des photos dans Worpress, theme Twenty Ten Child : 610x406 $selector = dess_setting('dess_lightbox_select'); $host = (($_SERVER['HTTPS'] != "") ? "https" : "http") . '://' . $_SERVER['HTTP_HOST'] . '/zenphoto/'; //$zenphoto_url2 = get_option( 'zenphoto_url' ); $zenphoto_url2 = 'http://macbook-pro.lcal/zenphoto/'; //echo $zenphoto_url2 . "
"; //preprint($zenphoto_url2); //echo substr_count($zenphoto_url2, "https"); //echo $_SERVER['HTTPS']; if (substr_count($zenphoto_url2, "https") == 1) { //echo "toto"; $zenphoto_url = (($_SERVER['HTTPS'] != "") ? substr_replace($zenphoto_url2, 'https', 0, 4) : $zenphoto_url2); } $zenphoto_url = $host; //echo $zenphoto_url; //$size = get_option( 'img_size' ); $size = 610; $folder = false; $zenphoto_img = ""; //preprint($atts); $a = $atts['image']; $b = zp_query($a); // ligne 808 if (isset($atts['folder'])) { if ($atts['folder'] == "true") $folder = true; } $img = substr($atts['image'], 0, strlen($atts['image']) - 4); $filename = $zenphoto_url . 'cache/' . $atts['album'] . '/' . urlencode($img) . '_' . $size . '_watermark.jpg'; $zp_size = getimagesize(htmlentities($filename)); //if ($folder == false) $zenphoto_link = ''; //if ($folder == false) $zenphoto_link = ''; if ($folder == false) $zenphoto_link = ''; else $zenphoto_link = ''; $zenphoto_img .= $zenphoto_link; $zenphoto_img .= ' '; $zenphoto_img .= ''; /* if ($b['image_meta']['description'] != "") { $caption = ""; $caption .= '

'; $caption .= $b['image_meta']['description'] . '

'; $zenphoto_img .= $caption; } */ return $zenphoto_img; } add_shortcode( 'zenphoto', 'zenphoto_handler' ); function zp_query($zpimage) { $exif = array(); require('../Connections/cnx.php'); $mysqli = new mysqli($dbhost, $dbuser, $dbpassword, $dbtable); if (mysqli_connect_errno()) { printf("Échec de la connexion : %s\n", mysqli_connect_error()); exit(); } $excquery = "SELECT `EXIFModel`, `EXIFDateTimeOriginal`, `EXIFExposureTime`, `EXIFFNumber`, `EXIFISOSpeedRatings`, `EXIFFocalLength`, `EXIFGPSLatitude`, `EXIFGPSLatitudeRef`, `EXIFGPSLongitude`, `EXIFGPSLongitudeRef`, `EXIFGPSAltitude`, `EXIFGPSAltitudeRef`, `desc`, `title` FROM `" . $zp_prefix . "images` WHERE `filename` = \"$zpimage\""; //echo $excquery; if ($result = $mysqli->query($excquery)) { $exif = $result->fetch_row(); $result->close(); } //preprint($exif); /* Array ( [0] => Canon EOS 7D [1] => 2011:06:30 20:43:30 [2] => 1/400 sec [3] => f/6,3 [4] => 640 [5] => 600 mm [6] => lat [7] => lat ref [8] => long [9] => long ref [10] => alt [11] => alt ref [12] => desc [13] => title )*/ $meta = array(); $meta['image_meta']['camera'] = $exif[0]; $meta['image_meta']['created_timestamp'] = $exif[1]; $meta['image_meta']['shutter_speed'] = $exif[2]; $meta['image_meta']['aperture'] = $exif[3]; $meta['image_meta']['iso'] = $exif[4]; $meta['image_meta']['focal_length'] = $exif[5]; $meta['image_meta']['latitude'] = $exif[6]; $meta['image_meta']['latitude_ref'] = $exif[7]; $meta['image_meta']['longitude'] = $exif[8]; $meta['image_meta']['longitude_ref'] = $exif[9]; $meta['image_meta']['altitude'] = $exif[10]; $meta['image_meta']['altitude_ref'] = $exif[11]; if ($exif[12] != "") { $desc = explode(':', $exif[12]); $description = explode('"', end($desc)); //print_r($description); $meta['image_meta']['description'] = utf8_encode($description[1]); } else $meta['image_meta']['description'] = ""; if ($exif[13] != "") { //echo "exif: " . $exif[13] . "
"; // a:1:{s:5:"fr_FR";s:30:"2011-05-15_GP-France-2011_9798";} $titr = explode(':', $exif[13]); //echo count($titr) . "
"; if (count($titr) == 1) { //print_r($titr); //$titr[0] $meta['image_meta']['title'] = utf8_encode($titr[0]); } else { $titre = explode('"', end($titr)); //print_r($titre); //$titre[1] $meta['image_meta']['title'] = utf8_encode($titre[1]); } /* echo "titr: "; print_r($titr); echo "
"; $titre = explode('"', end($titr)); print_r($titre); foreach ($titr as $var) { echo "" . $var . "
"; } */ //$meta['image_meta']['title'] = utf8_encode($titre[1]); } else $meta['image_meta']['title'] = ""; //echo "

"; $meta['image_meta']['file'] = $image; //preprint($meta['image_meta']); /* [camera] => Canon EOS-1D Mark IV [created_timestamp] => 2014:10:21 14:42:26 [shutter_speed] => 1/80 sec [aperture] => f/9 [iso] => 320 [focal_length] => 17 mm [latitude] => 44,381861666667 [latitude_ref] => N [longitude] => 4,4162216666667 [longitude_ref] => E [altitude] => 104,1771m [altitude_ref] => [description] => [title] => */ return $meta; } function add_class_lightbox($content) { $selector = dess_setting('dess_lightbox_select'); //$selector = "gallery"; //Check the page for link images direct to image (no trailing attributes) $string = '/<\/a>/i'; preg_match_all( $string, $content, $matches, PREG_SET_ORDER); //Check which attachment is referenced foreach ($matches as $val) { $slimbox_caption = ''; $post = get_post($val[5]); $slimbox_caption = esc_attr( $post->post_content ); //Replace the instance with the lightbox and title(caption) references. Won't fail if caption is empty. $string = ''; //echo "string" . "
" . $string; //$replace = ''; $replace = ''; //echo "replace" . "
" . $replace; $content = str_replace( $string, $replace, $content); } return $content; } add_filter('the_content', 'add_class_lightbox', 2); if ( ! function_exists( 'creator_post_nav' ) ) : /** * Display navigation to next/previous post when applicable. * * @since Twenty Thirteen 1.0 */ function creator_post_nav() { global $post; // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; ?> ' . esc_html__( 'Sticky', 'CreatorThemeRes-child' ) . ''; if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) twentythirteen_entry_date(); // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'CreatorThemeRes-child' ) ); if ( $categories_list ) { echo '' . $categories_list . ''; } // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'CreatorThemeRes-child' ) ); if ( $tag_list ) { echo '' . $tag_list . ''; } // Post author if ( 'post' == get_post_type() ) { printf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'CreatorThemeRes-child' ), get_the_author() ) ), get_the_author() ); } } endif; if ( ! function_exists( 'twentythirteen_entry_date' ) ) : /** * Print HTML with date information for current post. * * Create your own twentythirteen_entry_date() to override in a child theme. * * @since Twenty Thirteen 1.0 * * @param boolean $echo (optional) Whether to echo the date. Default true. * @return string The HTML-formatted post date. */ function twentythirteen_entry_date( $echo = true ) { if ( has_post_format( array( 'chat', 'status' ) ) ) $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); else $format_prefix = '%2$s'; $date = sprintf( '', esc_url( get_permalink() ), esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ), esc_attr( get_the_date( 'c' ) ), esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) ); if ( $echo ) echo $date; return $date; } endif; /** * Create a definition list containing EXIF data of featured image (if exists) * * @param string $post ID * @return echo definition list */ function pa_the_post_thumbnail_exif_data($postID = NULL) { // if $postID not specified, then get global post and assign ID if (!$postID) { global $post; $postID = $post->ID; } if (has_post_thumbnail($postID)) { // get the meta data from the featured image $postThumbnailID = get_post_thumbnail_id( $postID ); $photoMeta = wp_get_attachment_metadata( $postThumbnailID ); // if the shutter speed is not equal to 0 if ($photoMeta['image_meta']['shutter_speed'] != 0) { // Convert the shutter speed to a fraction if ((1 / $photoMeta['image_meta']['shutter_speed']) > 1) { if ((number_format((1 / $photoMeta['image_meta']['shutter_speed']), 1)) == 1.3 or number_format((1 / $photoMeta['image_meta']['shutter_speed']), 1) == 1.5 or number_format((1 / $photoMeta['image_meta']['shutter_speed']), 1) == 1.6 or number_format((1 / $photoMeta['image_meta']['shutter_speed']), 1) == 2.5) { $photoShutterSpeed = "1/" . number_format((1 / $photoMeta['image_meta']['shutter_speed']), 1, '.', '') . " second"; } else { $photoShutterSpeed = "1/" . number_format((1 / $photoMeta['image_meta']['shutter_speed']), 0, '.', '') . " second"; } } else { $photoShutterSpeed = $photoMeta['image_meta']['shutter_speed'] . " seconds"; } // print our definition list ?>
Date Taken
Camera
Focal Length
mm
Aperture
f/
ISO
Shutter Speed
EXIF data not found

'; } // if no featured image, echo error message } else { echo '

Featured image not found

'; } } //http://cssmary.com/wordpress/customizer-api-child-theme/ function childtheme_customize_register( $wp_customize ) { // remove $remove_socials = array('google-plus','instagram','pinterest','linkedin'); for($i=0;$iremove_setting( 'dess_'.$remove_socials[$i] ); $wp_customize->remove_control( 'dess_'.$remove_socials[$i] ); } $wp_customize->remove_setting( 'dess_hoursup' ); $wp_customize->remove_control( 'dess_hoursup' ); $wp_customize->remove_setting( 'dess_tel' ); $wp_customize->remove_control( 'dess_tel' ); // add $add_socials = array('500px','flickr','rss','mail'); for($i=0;$iadd_setting('dess_'.$add_socials[$i], array( 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'dess_sanitize_url', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dess_'.$add_socials[$i], array( 'settings' => 'dess_'.$add_socials[$i], 'label' => $name.' URL', 'section' => 'sm_section', 'type' => 'text', ))); } $wp_customize->get_setting( 'dess_rss' )->default = get_bloginfo('rss2_url'); // new section $wp_customize->add_section('settings_section', array( 'title' => __('Settings','creator'), 'capability' => 'edit_theme_options', 'description' => __('Theme settings','CreatorThemeRes-child') ) ); // new options $wp_customize->add_setting('dess_zenphoto', array( 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'dess_sanitize_html', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dess_zenphoto', array( 'settings' => 'dess_zenphoto', 'label' => __('Zenphoto path','CreatorThemeRes-child'), 'section' => 'settings_section', 'type' => 'text', ))); $wp_customize->add_setting('dess_social_size', array( 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'dess_sanitize_html', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dess_social_size', array( 'settings' => 'dess_social_size', 'label' => __('Socials icons size (16 or 32px)','CreatorThemeRes-child'), 'section' => 'settings_section', 'type' => 'text', ))); $wp_customize->add_setting('dess_lightbox_select', array( 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'dess_sanitize_html', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dess_lightbox_select', array( 'settings' => 'dess_lightbox_select', 'label' => __('Lightbox selector (class="xxx")','CreatorThemeRes-child'), 'section' => 'settings_section', 'type' => 'text', ))); $wp_customize->add_setting( 'dess_lightbox_choice', array( 'default' => 'b', ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dess_lightbox_choice', array( 'label' => __('Choice of lightbox','CreatorThemeRes-child'), 'section' => 'settings_section', 'settings' => 'dess_lightbox_choice', 'type' => 'radio', 'choices' => array( 'a' => 'Meow box', 'b' => 'Colorbox', 'c' => 'Featherlight', ), ))); } add_action( 'customize_register', 'childtheme_customize_register', 12); /* function choice_a_callback( $control ) { if ( $control->manager->get_setting('dess_lightbox_choice')->value() == 'a' ) { return true; } else { return false; } } function choice_b_callback( $control ) { if ( $control->manager->get_setting('dess_lightbox_choice')->value() == 'b' ) { return true; } else { return false; } } function choice_c_callback( $control ) { if ( $control->manager->get_setting('dess_lightbox_choice')->value() == 'c' ) { return true; } else { return false; } } */ function show_bookmark_list(){ ?> get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'href' => get_permalink( $attachment->ID ), 'src' => $attachment->guid, 'title' => $attachment->post_title ); } ?>