Sacconi69

$output_distanze

Feb 26th, 2024
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. $numero = get_post_meta( $post->ID, 'function_ospiti', true );
  2.  
  3. $pianoapp = get_post_meta( $post->ID, 'piano', true );
  4. $pianoapp_str = empty( $pianoapp ) ? '' : "$pianoapp ";
  5.  
  6. $mq = get_post_meta( $post->ID, 'function_mq', true );
  7. $mq_str = empty( $mq ) ? '' : "$mq m2, ";
  8.  
  9. //variante
  10.  
  11. $output_distanze = array();
  12.  
  13. $sea = get_post_meta( $post->ID, 'function_number', true );
  14. if ( ! empty( $sea )) { $content[] = __( 'distance from the sea: ','sacconicase' ). "$sea m., ";}
  15.  
  16. $beach = get_post_meta( $post->ID, 'function_spiaggia', true );
  17. if ( ! empty( $beach )) { $content[] = __( 'distance from the beach: ','sacconicase' ). "$beach m., ";}
  18.  
  19. $center = get_post_meta( $post->ID, 'function_centro', true );
  20. if ( ! empty( $center )) { $content[] = __( 'distance from the center: ','sacconicase' ). "$center m., ";}
  21.  
  22. $shops = get_post_meta( $post->ID, 'function_negozi', true );
  23. if ( ! empty( $shops )) { $content[] = __( 'distance from the shops: ','sacconicase' ). "$shops m., ";}
  24.  
  25. $content = get_post_meta( $post->ID, 'description_'.$lang, true );
  26.  
  27. $post_tags = get_the_tags();
  28. $separator = ', ';
  29. $output = '';
  30.  
  31. if ( ! empty( $post_tags ) ) {
  32. foreach ( $post_tags as $tag ) {
  33. if ('animali permessi su richiesta' == $tag->name ) continue;
  34. $output .= $tag->name . $separator;
  35. }
  36. }
  37. if (!has_tag ('animali permessi su richiesta', $post)) {
  38. $output2 = "__( 'Pets not allowed', 'sacconicase' )" . '. ';
  39.  
  40. }
  41.  
  42.  
  43. return '<span class="incipit_description">'. $category . ' '. $terms . '</span>' . ' ' . __( 'for','sacconicase' ) .' '. $numero .' '. __( 'persons, ','sacconicase' ). ' ' . $mq_str . $pianoapp_str . implode( $output_distanze, ', ').'.' . $output2 . __( 'Facilities','sacconicase' ) . ': ' . trim( $output, $separator ) . $content ;
  44. }
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment