web/app/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php
// shows post content for visual mode (iframe) in translation editor
shows post content for visual mode (iframe) in translation editor
shows post content for visual mode ( iframe ) in translation editor
function _show_post_content(){
        global $tinymce_version;
        if($id = @intval($_GET['post_id'])){
            $post = get_post($id);
            if($post){
                if(@intval($_GET['rtl'])){
                    $rtl = ' dir="rtl"';
                }else{
                    $rtl = '';
                }
                echo '<html'.$rtl.'>';
                echo '<head>';
                $csss = array(
                    '/' . WPINC . '/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver='.$tinymce_version,
                    '/' . WPINC . '/js/tinymce/plugins/spellchecker/css/content.css?ver='.$tinymce_version,
                    '/' . WPINC . '/js/tinymce/plugins/wordpress/css/content.css?ver='.$tinymce_version    
                );
                foreach($csss as $css){
                    echo '<link rel="stylesheet" href="'.get_option('siteurl') . $css . '">' . "\n";
                }
                echo '</head>';
                echo '<body>';
                switch($_GET['field_type']){                    
                    default: 
                        if(0 === strpos($_GET['field_type'], 'field-')){
                            echo get_post_meta($id, preg_replace('#^field-#', '', $_GET['field_type']), true);
                        }else{
                            remove_filter('the_content', 'do_shortcode', 11);
                            echo apply_filters('the_content', $post->post_content);
                        }
                }
                echo '</body>';
                echo '</html>';
                exit;
            }else{
                wp_die(__('Post not found!', 'sitepress'));
            }
            exit;
        }else{
            wp_die(__('Post not found!', 'sitepress'));
        }
    }
function _show_post_content ( ) { global $ tinymce_version ; if ( $ id = @ intval ( $ _GET [ 'post_id' ] ) ) { $ post = get_post ( $ id ) ; if ( $ post ) { if ( @ intval ( $ _GET [ 'rtl' ] ) ) { $ rtl = ' dir="rtl"' ; } else { $ rtl = '' ; } echo '<html' . $ rtl . '>' ; echo '<head>' ; $ csss = array ( '/' . WPINC . '/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=' . $ tinymce_version , '/' . WPINC . '/js/tinymce/plugins/spellchecker/css/content.css?ver=' . $ tinymce_version , '/' . WPINC . '/js/tinymce/plugins/wordpress/css/content.css?ver=' . $ tinymce_version ) ; foreach ( $ csss as $ css ) { echo '<link rel="stylesheet" href="' . get_option ( 'siteurl' ) . $ css . '">' . " \n " ; } echo '</head>' ; echo '<body>' ; switch ( $ _GET [ 'field_type' ] ) { default : if ( 0 === strpos ( $ _GET [ 'field_type' ] , 'field-' ) ) { echo get_post_meta ( $ id , preg_replace ( '#^field-#' , '' , $ _GET [ 'field_type' ] ) , true ) ; } else { remove_filter ( 'the_content' , 'do_shortcode' , 11 ) ; echo apply_filters ( 'the_content' , $ post -> post_content ) ; } } echo '</body>' ; echo '</html>' ; exit ; } else { wp_die ( __ ( 'Post not found!' , 'sitepress' ) ) ; } exit ; } else { wp_die ( __ ( 'Post not found!' , 'sitepress' ) ) ; } }
shows post content for visual mode (iframe) in translation editor
shows post content for visual mode ( iframe ) in translation editor