当前位置: 首页>>代码示例>>PHP>>正文


PHP icl_pop_info函数代码示例

本文整理汇总了PHP中icl_pop_info函数的典型用法代码示例。如果您正苦于以下问题:PHP icl_pop_info函数的具体用法?PHP icl_pop_info怎么用?PHP icl_pop_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了icl_pop_info函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: copy_from_original

    function copy_from_original()
    {
        global $wpdb;
        $show = false;
        $trid = false;
        $source_lang = false;
        $source_lang_name = false;
        $disabled = '';
        if (isset($_GET['source_lang']) && isset($_GET['trid'])) {
            $source_lang = $_GET['source_lang'];
            $trid = intval($_GET['trid']);
            $_lang_details = $this->get_language_details($source_lang);
            $source_lang_name = $_lang_details['display_name'];
            $show = true;
        } elseif (isset($_GET['post']) && isset($_GET['lang']) && $_GET['lang'] != $this->get_default_language()) {
            global $post;
            if (trim($post->post_content)) {
                $disabled = ' disabled="disabled"';
            }
            $trid = $this->get_element_trid($post->ID, 'post_' . $post->post_type);
            $source_lang = $wpdb->get_var($wpdb->prepare("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE source_language_code IS NULL AND trid=%d", $trid));
            $_lang_details = $this->get_language_details($source_lang);
            $source_lang_name = $_lang_details['display_name'];
            $show = true && $source_lang;
        }
        if ($show) {
            wp_nonce_field('copy_from_original_nonce', '_icl_nonce_cfo_' . $trid);
            echo '<input id="icl_cfo" class="button-secondary" type="button" value="' . sprintf(__('Copy content from %s', 'sitepress'), $source_lang_name) . '"
				onclick="icl_copy_from_original(\'' . esc_js($source_lang) . '\', \'' . esc_js($trid) . '\')"' . $disabled . ' style="white-space:normal;height:auto;line-height:normal;"/>';
            icl_pop_info(__("This operation copies the content from the original language onto this translation. It's meant for when you want to start with the original content, but keep translating in this language. This button is only enabled when there's no content in the editor.", 'sitepress'), 'question');
            echo '<br clear="all" />';
        }
    }
开发者ID:pablomarsan,项目名称:iftheme-docs,代码行数:33,代码来源:sitepress.class.php

示例2: str_replace

            $link['flag'] = str_replace('<img ', '<img style="float:right;margin-right:0;margin-left:4px;" ', $link['flag']);
        }
        ?>
                    <div class="icl-als-action"><a href="<?php 
        echo $link['url'];
        ?>
"><?php 
        echo $link['flag'];
        echo $link['anchor'];
        ?>
</a></div>
                <?php 
    }
}
?>
            </div>
    </div>

    <?php 
if (!$this->is_rtl()) {
    ?>
    <div id="icl-als-info">
    <?php 
    icl_pop_info(sprintf(__('This language selector determines which content to display. You can choose items in a specific language or in all languages. To change the language of the WordPress Admin interface, go to <a%s>your profile</a>.', 'sitepress'), ' href="' . admin_url('profile.php') . '"'), 'question');
    ?>
    </div>
    <?php 
}
?>

</span>
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:admin-language-switcher.php

示例3: elseif

    } elseif ($element->field_format == 'csv_base64') {
        ?>
                                <?php 
        foreach ($icl_tm_original_content as $c) {
            ?>
                                <div class="icl_multiple"<?php 
            echo $rtl_original_attribute;
            ?>
>
                                    <div style="float: left;margin-right:4px;"><?php 
            echo $c;
            ?>
</div>
                                    <?php 
            if (isset($term_descriptions[$c])) {
                icl_pop_info($term_descriptions[$c], 'info', array('icon_size' => 10));
            }
            ?>
                                    <br clear="all"/>
                                </div>
                                <?php 
        }
        ?>
                                <?php 
    } else {
        ?>
                                <div class="icl_single"<?php 
        if ($rtl_original) {
            echo ' dir="rtl" style="text-align:right;"';
        } else {
            echo ' dir="ltr" style="text-align:left;"';
开发者ID:GeographicaGS,项目名称:gis-coast,代码行数:31,代码来源:translation-editor.php

示例4: display_set_as_dupl_btn

    /**
     * Renders the "Overwrite" button on the post edit screen that allows setting the post as a duplicate of its
     * original.
     *
     * @param WP_Post $post
     * @param string  $source_lang_name
     * @param int     $original_post_id
     * @param string  $post_lang
     */
    private function display_set_as_dupl_btn($post, $source_lang_name, $original_post_id, $post_lang)
    {
        wp_nonce_field('set_duplication_nonce', '_icl_nonce_sd');
        ?>
		<input id="icl_set_duplicate" type="button" class="button-secondary"
		       value="<?php 
        printf(__('Overwrite with %s content.', 'sitepress'), $source_lang_name);
        ?>
"
		       style="white-space:normal;height:auto;line-height:normal;"
		       data-wpml_original_post_id="<?php 
        echo $original_post_id;
        ?>
"
		       data-post_lang="<?php 
        echo $post_lang;
        ?>
"/>
		<span style="display: none;"><?php 
        echo esc_js(sprintf(__('The current content of this %s will be permanently lost. WPML will copy the %s content and replace the current content.', 'sitepress'), $post->post_type, $source_lang_name));
        ?>
</span>
		<?php 
        icl_pop_info(__("This operation will synchronize this translation with the original language. When you edit the original, this translation will update immediately. It's meant when you want the content in this language to always be the same as the content in the original language.", 'sitepress'), 'question');
        ?>
		<br clear="all"/>
		<?php 
    }
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:37,代码来源:wpml-meta-boxes-post-edit-html.class.php

示例5: wp_nonce_field

            }
        }
    }
    if ($tr_original_id != $post->ID && $show_dup_button) {
        ?>
    <?php 
        wp_nonce_field('set_duplication_nonce', '_icl_nonce_sd');
        ?>
    <input id="icl_set_duplicate" type="button" class="button-secondary" value="<?php 
        printf(__('Overwrite with %s content.', 'sitepress'), $original_language);
        ?>
" style="float: left;" />
    <span style="display: none;"><?php 
        echo esc_js(sprintf(__('The current content of this %s will be permanently lost. WPML will copy the %s content and replace the current content.', 'sitepress'), $post->post_type, $original_language));
        ?>
</span>
    <?php 
        icl_pop_info(__("This operation will synchronize this translation with the original language. When you edit the original, this translation will update immediately. It's meant when you want the content in this language to always be the same as the content in the original language.", 'sitepress'), 'question');
        ?>
    <br clear="all" />
    
    
<?php 
    }
    ?>
    
<?php 
}
?>

开发者ID:jimlongo56,项目名称:bhouse,代码行数:29,代码来源:post-menu.php

示例6: render_current_element_field_original_csv_base64

    private function render_current_element_field_original_csv_base64()
    {
        foreach ($this->current_element_content_original as $c) {
            ?>
			<div class="icl_multiple"<?php 
            echo $this->rtl_original_attribute_object;
            ?>
>
				<div style="float: left;margin-right:4px;"><?php 
            echo $c;
            ?>
</div>
				<?php 
            if (isset($term_descriptions[$c])) {
                icl_pop_info($term_descriptions[$c], 'info', array('icon_size' => 10));
            }
            ?>
				<br clear="all"/>
			</div>
		<?php 
        }
    }
开发者ID:ryuqing,项目名称:cake,代码行数:22,代码来源:translation-editor.php


注:本文中的icl_pop_info函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。