Plugin Directory

Changeset 1203001


Ignore:
Timestamp:
07/21/2015 10:05:12 AM (11 years ago)
Author:
mobileappbuilder
Message:

[SE-19437] Wordpress plugin can handle image galleries [part 4]

Location:
mobile-app-api/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-app-api/trunk/library/shoutem-sanitizer.php

    r1202991 r1203001  
    447447 */
    448448function rename_tag_pre($opening, $name, $attr, $closing) {
    449     if (strcmp($name,'figcaption') == 0) {
     449    if (strcmp($name,'se-attachment') == 0) {
     450        $name = 'seattachment';
     451    } else if (strcmp($name,'figcaption') == 0) {
    450452        $name = 'p';
    451453    } else if (strcmp($name,'tr') == 0 && strcmp($opening,'/') == 0) {
     
    467469 */
    468470function rename_tag_post($opening, $name, $attr, $closing) {
    469     if (strcmp($name,'twitterdiv') == 0) {
    470         $name = 'div';
    471     }
    472471    if (strcmp($name,'seattachment') == 0) {
    473472        $name = 'se-attachment';
     473    } else if (strcmp($name,'twitterdiv') == 0) {
     474        $name = 'div';
    474475    }
    475476
  • mobile-app-api/trunk/model/class-shoutem-smg-dao.php

    r1202991 r1203001  
    6767                $img_caption = $img_caption.' '.trim($img_caption_line->wholeText);
    6868            }
    69             $replacement_item = "<seattachment id=\"$pid\" type=\"image\" xmlns=\"urn:xmlns:shoutem-com:cms:v1\" />";
     69            $replacement_item = "<se-attachment id=\"$pid\" type=\"image\" xmlns=\"urn:xmlns:shoutem-com:cms:v1\" />";
    7070            if ($img_caption) {
    7171                $image['caption'] = $img_caption;
     
    8484            $images []= $image;
    8585        }
    86         $replacement = '<seattachment type="gallery" xmlns="urn:xmlns:shoutem-com:cms:v1">'.$replacement_list.'</seattachment>';
     86        $replacement = '<se-attachment type="gallery" xmlns="urn:xmlns:shoutem-com:cms:v1">'.$replacement_list.'</se-attachment>';
    8787        $replacement_fragment = $dom->createDocumentFragment();
    8888        $replacement_fragment->appendXML($replacement);
Note: See TracChangeset for help on using the changeset viewer.