Web

Web Applications

Wordpress

  • KGI adaptation to select different metadata (in particular to facilitate use of FB photos)
    • Title field is filled with 2#120 (Caption-Abstract) - node/scripts/fbphotos.js fills it in with FB album title
    • Caption field is filled with 2#105 (Heading) - node/scripts/fbphotos.js fills it in with FB comment
    • changed code: wp-admin/includes/image.php
      /* orig
      // Headline, "A brief synopsis of the caption".
      if ( ! empty( $iptc['2#105'][0] ) ) {
        $meta['title'] = trim( $iptc['2#105'][0] );
      } elseif ( ! empty( $iptc['2#005'][0] ) ) {
        $meta['title'] = trim( $iptc['2#005'][0] );
      }
      if ( ! empty( $iptc['2#120'][0] ) ) { // Description / legacy caption.
        $caption = trim( $iptc['2#120'][0] );
       
        mbstring_binary_safe_encoding();
        $caption_length = strlen( $caption );
        reset_mbstring_encoding();
       
        if ( empty( $meta['title'] ) && $caption_length < 80 ) {
          // Assume the title is stored in 2:120 if it's short.
          $meta['title'] = $caption;
        }
       
        $meta['caption'] = $caption;
      }      
      */
      /* KGI adaptation */
      // Headline, "A brief synopsis of the caption".
      if ( ! empty( $iptc['2#120'][0] ) ) {
        $meta['title'] = trim( $iptc['2#120'][0] ); // Caption-Abstract
      } elseif ( ! empty( $iptc['2#105'][0] ) ) {
        $meta['title'] = trim( $iptc['2#105'][0] ); // Headline
      }
       
      if ( ! empty( $iptc['2#105'][0] ) ) { // Headline
        $meta['caption'] = trim( $iptc['2#105'][0] );
      }