diff -r 5e2f62d02dcd -r 490d5cc509ed wp/wp-content/themes/IN-MOTION-package-u1/in-motion/portfolio-post.php --- a/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/portfolio-post.php Tue Jun 09 03:35:32 2015 +0200 +++ b/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/portfolio-post.php Tue Jun 09 11:14:17 2015 +0000 @@ -1,149 +1,208 @@ - - - -ID, 'portfolio_type_selected' , true); - $portfolioDate = get_post_meta($post->ID, 'portfolio_date' , true); - $portfolioClient = get_post_meta($post->ID, 'portfolio_client' , true); - $portfolioURL = get_post_meta($post->ID, 'portfolio_url' , true); - $portfolioABSTRACT = get_post_meta($post->ID, 'portfolio_abstract' , true); - $portfolioEMBED = get_post_meta($post->ID, 'portfolio_embed' , true); - $portfolioTWITTER = get_post_meta($post->ID, 'portfolio_twitter' , true); - -?> -
- - -

- ID,'portfolio_categories', '', ', '); - $terms = strip_tags( $terms ); - ?> -

-
- -

- -
- Controverse -
- - -
- Abstract -
- - -
- Site de l'intervenant - -
- - - - -
- @ -
- - - -
- -
- - - - -
- -
- ID ), 'single-post-thumbnail' ); - ?> - - ID, 'portfolio_video_url' , true); - if(!empty($video_url)) - { - echo '
'.$video_url.'
'; - } - } - // end if video - - //slideshow portfolio - if($portfolioType == 'Slideshow') - { - $attachments = get_children(array('post_parent' => $post->ID, - 'post_status' => 'inherit', - 'post_type' => 'attachment', - 'post_mime_type' => 'image', - 'order' => 'ASC', - 'orderby' => 'menu_order ID')); - - - - echo '
'; - echo '
'; - - foreach($attachments as $att_id => $attachment) { - $full_img_url = wp_get_attachment_url($attachment->ID); - echo '
'; - ?> - - '; - } //end foreach - echo '
'; - echo '
'; - } - ?> -
-
- - - + +
+
+
+
+ +
+ +
+
+ ID ); + $post_thumbnail_id = get_post_thumbnail_id( $post->ID ); + if ( empty ( $post_thumbnail_id ) ) { + $args = array( + 'post_parent' => $post->ID, + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'numberposts' => 1 + ); + $attachments = get_children( $args ); + $post_thumbnail_id = key($attachments); + } + $image = wp_get_attachment_image_src( $post_thumbnail_id, 'portfolio-thumb' ); + $image_large = wp_get_attachment_image_src( $post_thumbnail_id, 'large' ); + $image_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true ); + $image_desc = get_post($post_thumbnail_id); + $image_desc = $image_desc->post_content; + $full_descr = $post->post_content != "" ? $post->post_content : ''; + $post_meta = get_post_meta( $post->ID, 'prtfl_information', true ); + $date_compl = isset( $post_meta['_prtfl_date_compl'] ) ? $post_meta['_prtfl_date_compl'] : ''; + if ( ! empty( $date_compl ) && 'in progress' != $date_compl) { + $date_compl = explode( "/", $date_compl ); + $date_compl = date( get_option( 'date_format' ), strtotime( $date_compl[1] . "-" . $date_compl[0] . '-' . $date_compl[2] ) ); + } + $link = isset( $post_meta['_prtfl_link'] ) ? $post_meta['_prtfl_link'] : ''; + if ( empty( $full_descr ) ) + $full_descr = isset( $post_meta['_prtfl_short_descr'] ) ? $post_meta['_prtfl_short_descr'] : ''; + $svn = $post_meta['_prtfl_svn']; + if ( ! empty( $image[0] ) ) { ?> +
+ + <?php echo $image_alt; ?> + +
+ +
+ +

+ +

+ + +

+ +

+ +

+ +

", $full_descr); ?>

+ +

+ ID, 'portfolio_executor_profile' ); ?> +

+ 0 ) + echo ', '; ?> + name; ?> + +

+ +
+
+ $post->ID, + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'numberposts' => -1, + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'exclude' => $post_thumbnail_id + ); + $attachments = get_children( $args ); + $array_post_thumbnail_id = array_keys( $attachments ); + $count_element = count( $array_post_thumbnail_id ); + + while ( list( $key, $value ) = each( $array_post_thumbnail_id ) ) { + $image = wp_get_attachment_image_src( $value, 'portfolio-photo-thumb' ); + $image_large = wp_get_attachment_image_src( $value, 'large' ); + $image_alt = get_post_meta( $value, '_wp_attachment_image_alt', true ); + $image_title = get_post_meta( $value, '_wp_attachment_image_title', true ); + $image_desc = get_post($value); + $image_desc = $image_desc->post_content; + + if ( 0 == $key ) { ?> + +
+ + + +
+
+ +
+ +
+
+ +
+ + + +
+
+
+ + \ No newline at end of file