示例#1
0
文件: ajax.php 项目: agiper/wordpress
     $iclsettings['sync_comment_status'] = @intval($_POST['icl_sync_comment_status']);
     $iclsettings['sync_ping_status'] = @intval($_POST['icl_sync_ping_status']);
     $iclsettings['sync_sticky_flag'] = @intval($_POST['icl_sync_sticky_flag']);
     $iclsettings['sync_password'] = @intval($_POST['icl_sync_password']);
     $iclsettings['sync_private_flag'] = @intval($_POST['icl_sync_private_flag']);
     $iclsettings['sync_post_format'] = @intval($_POST['icl_sync_post_format']);
     $iclsettings['sync_delete'] = @intval($_POST['icl_sync_delete']);
     $iclsettings['sync_delete_tax'] = @intval($_POST['icl_sync_delete_tax']);
     $iclsettings['sync_post_taxonomies'] = @intval($_POST['icl_sync_post_taxonomies']);
     $iclsettings['sync_post_date'] = @intval($_POST['icl_sync_post_date']);
     $iclsettings['sync_comments_on_duplicates'] = @intval($_POST['icl_sync_comments_on_duplicates']);
     $this->save_settings($iclsettings);
     echo 1;
     break;
 case 'language_domains':
     $language_domains_helper = new WPML_Lang_Domains_Box($this);
     echo $language_domains_helper->render();
     break;
 case 'icl_theme_localization_type':
     $icl_tl_type = @intval($_POST['icl_theme_localization_type']);
     $iclsettings['theme_localization_type'] = $icl_tl_type;
     $iclsettings['theme_localization_load_textdomain'] = @intval($_POST['icl_theme_localization_load_td']);
     $filtered_textdomain_value = filter_input(INPUT_POST, 'textdomain_value', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE);
     $iclsettings['gettext_theme_domain_name'] = $filtered_textdomain_value;
     if ($icl_tl_type == 1) {
         do_action('wpml_scan_theme_for_strings', true);
     } elseif ($icl_tl_type == 2) {
         $parent_theme = get_template_directory();
         $child_theme = get_stylesheet_directory();
         $languages_folders = array();
         if ($found_folder = icl_tf_determine_mo_folder($parent_theme)) {
示例#2
0
                                        <?php 
                }
                ?>
                                    </label>
                                    <?php 
                wp_nonce_field('language_domains_nonce', '_icl_nonce_ldom', false);
                ?>
                                    <?php 
                wp_nonce_field('validate_language_domain', 'validate_language_domain_nonce', false);
                ?>
                                    <div id="icl_lnt_domains_box">
		                                <?php 
                if ((int) $language_negotiation_type === 2) {
                    ?>
			                                <?php 
                    $domains_box = new WPML_Lang_Domains_Box($sitepress);
                    echo $domains_box->render();
                    ?>
                                                <?php 
                }
                ?>
                                    </div>
                                    <div id="language_domain_xdomain_options" class="sub-section" <?php 
                if ($language_negotiation_type != 2) {
                    echo ' style="display:none"';
                }
                ?>
>
                                        <p><?php 
                _e('Pass session arguments between domains through the language switcher', 'sitepress');
                ?>