wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-builder-import-export.php
/**
     * Replace shortcode gallery with image path
     * 
     * @access public
     * @param string $shortcode
     * @return string
     */
Replace shortcode gallery with image path

@access public
@param string $shortcode
@return string
Replace shortcode gallery with image path @access public @param string $shortcode @return string
private static function replace_with_image_path($shortcode) {
        $images = themify_get_gallery_shortcode($shortcode);
        if (!empty($images)) {
            preg_match('/\[gallery.*ids=.(.*).\]/', $shortcode, $ids);
            $ids = trim($ids[1], '\\');
            $ids = trim($ids, '"');
            $path = array();
            foreach ($images as $img) {
                $path[] = wp_get_attachment_image_url($img->ID, 'full');
            }
            if (!empty($path)) {
                $path = implode(',', $path);
                $shortcode = str_replace('[gallery', '[gallery path="' . $path . '" ', $shortcode);
            }
        }
        return $shortcode;
    }
private static function replace_with_image_path ( $ shortcode ) { $ images = themify_get_gallery_shortcode ( $ shortcode ) ; if ( ! empty ( $ images ) ) { preg_match ( '/\[gallery.*ids=.(.*).\]/' , $ shortcode , $ ids ) ; $ ids = trim ( $ ids [ 1 ] , '\\' ) ; $ ids = trim ( $ ids , '"' ) ; $ path = array ( ) ; foreach ( $ images as $ img ) { $ path [ ] = wp_get_attachment_image_url ( $ img -> ID , 'full' ) ; } if ( ! empty ( $ path ) ) { $ path = implode ( ',' , $ path ) ; $ shortcode = str_replace ( '[gallery' , '[gallery path="' . $ path . '" ' , $ shortcode ) ; } } return $ shortcode ; }
Replace shortcode gallery with image path
Replace shortcode gallery with image path