function flag_layout_sort($flag_sorts = array()) { global $easy_translation_manager_plugin; if (!empty($easy_translation_manager_plugin->etm_tools_retrive['flag_sort'])) { $flag_sorts = $easy_translation_manager_plugin->etm_tools_retrive['flag_sort']; } if (!empty($flag_sorts)) { $flag_sorts = etm_tools_retrive_languages_data($flag_sorts, false, false); } else { $active_langs = etm_tools_retrive_aktiv_languages('', true); $active_langs = array_keys($active_langs); $flag_sorts = etm_tools_retrive_languages_data($active_langs, false, true); } return $flag_sorts; }
function chek_current_page() { require_once EASY_TRANSLATION_MANAGER_PATH . 'inc/fn.php_mo.php'; global $wpdb, $userdata; $Error = ''; if (!empty($_POST['status']) and $_POST['status'] == 'import') { $tmp_textdomain = ''; $tmp_lang = ''; if (!empty($_FILES["file"])) { $_FILES["file"]["name"] = substr($_FILES["file"]["name"], 0, -3); $pieces = explode("-", $_FILES["file"]["name"]); if (count($pieces) > 0) { $tmp_textdomain = $pieces[0]; $tmp_lang = $pieces[count($pieces) - 1]; if (count($pieces) > 2) { $tmp_textdomain = ''; for ($i = 0; $i < count($pieces) - 1; $i++) { if (!empty($tmp_textdomain)) { $tmp_textdomain .= '-'; } $tmp_textdomain .= $pieces[$i]; } } } } if (empty($_POST['plugintheme'])) { $Error = "Error: Please select a Theme and Plugin"; } else { if (empty($tmp_lang) or strlen($tmp_lang) != 2 and strlen($tmp_lang) != 5) { $Error = "Error: No languash is found"; } else { if (empty($tmp_textdomain)) { $Error = "Error: No textdomain is found"; } else { if ($_FILES["file"]["error"] > 0) { $Error = "Error: " . $_FILES["file"]["error"]; } else { if ($_FILES["file"]["type"] != 'application/octet-stream') { $Error = "Error: wrong format (.po)"; } else { $pies = explode("|||", $_POST['plugintheme']); $etm_folder = $pies[0]; $etm_tag = $pies[1]; if (empty($_POST['overwrite'])) { $_POST['overwrite'] = 'off'; } if (strlen($tmp_lang) > 2) { $lang_total = etm_languages_flags(); if (!empty($lang_total)) { foreach ($lang_total as $key => $lang_t) { if ($lang_t['default_locale'] == $tmp_lang) { $tmp_lang = $key; break; } } } } $has_input_data_checkup = false; //preg_match_all('/msgid (\")(.*?)(\")\s*msgstr (\")(.*?)(\")/', $str, $matches, PREG_SET_ORDER); $matches = phpmo_parse_po_file($_FILES["file"]["tmp_name"]); if (!empty($matches)) { echo '<table cellpadding="5"><tr><td>'; echo '<h3 style="margin-bottom: 0px;">' . __('Importede strings', 'evt') . '</h3>'; echo '</td><td></td></tr>'; echo '</table>'; echo '<div style="overflow: auto; height: 400px; width: 800px; border: 1px solid lightgray;"><table cellpadding="5"><tr><td>'; echo '<tr><td>'; echo 'Status'; echo '</td><td>'; echo 'Translate string'; echo '</td></tr>'; foreach ($matches as $matche) { if (!empty($matche['msgid'])) { $sql_tmp = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}etm_plugin_index WHERE default_string=\"" . $matche['msgid'] . "\" and default_string2=\"" . $matche['msgid_plural'] . "\" and default_placeholder=\"" . $matche['msgctxt'] . "\" and mo_tag=\"" . $tmp_textdomain . "\" and category_type =\"" . $etm_tag . "\" and folder_name=\"" . $etm_folder . "\" LIMIT 1"); $string_id = 0; if (!empty($sql_tmp)) { $string_id = $sql_tmp; if (!empty($matche['msgstr'][0]) and !empty($tmp_lang) and !empty($string_id)) { $sql_tmp3 = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}etm_plugin_string WHERE lang_code = \"" . $tmp_lang . "\" and lang_index_id =\"" . $string_id . "\""); if (empty($sql_tmp3)) { $has_input_data_checkup = true; $sqlinsert = "INSERT INTO {$wpdb->prefix}etm_plugin_string (lang_code,lang_index_id,translatede_string,translatede_string2,create_user,create_ip) \n\t\t\t\t\t\t\t\t \t VALUES (\"" . $tmp_lang . "\",\"" . $string_id . "\",\"" . $matche['msgstr'][0] . "\",\"" . $matche['msgstr'][1] . "\"," . $userdata->ID . ",\"" . $_SERVER['REMOTE_ADDR'] . "\")"; $wpdb->query($sqlinsert); echo '<tr style="font-size:10px;"><td>'; echo 'Insert'; echo '</td><td>'; if (!empty($matche['msgctxt'])) { echo 'placeholder (' . $matche['msgctxt'] . ')<br>'; } echo $matche['msgid'] . ' -- ' . $matche['msgstr'][0]; if (!empty($matche['msgstr'][1])) { echo '<br>'; echo $matche['msgid_plural'] . ' -- ' . $matche['msgstr'][1]; } echo '</td></tr>'; } else { if ($_POST['overwrite'] == 'on') { $has_input_data_checkup = true; $sqlupdate = "UPDATE {$wpdb->prefix}etm_plugin_string SET translatede_string=\"" . $matche['msgstr'][0] . "\",translatede_string2=\"" . $matche['msgstr'][1] . "\" WHERE lang_code = \"" . $tmp_lang . "\" and lang_index_id =\"" . $string_id . "\""; $wpdb->query($sqlupdate); echo '<tr style="font-size:10px;"><td>'; echo 'Update'; echo '</td><td>'; if (!empty($matche['msgctxt'])) { echo 'placeholder (' . $matche['msgctxt'] . ')<br>'; } echo $matche['msgid'] . ' -- ' . $matche['msgstr'][0]; if (!empty($matche['msgstr'][1])) { echo '<br>'; echo $matche['msgid_plural'] . ' -- ' . $matche['msgstr'][1]; } echo '</td></tr>'; } } } } else { $sql_tmp2 = "INSERT INTO {$wpdb->prefix}etm_plugin_index (default_string,default_string2,default_placeholder,folder_name,mo_tag,category_type,file,manual_added,create_user,create_ip) \n \t VALUES (\"" . $matche['msgid'] . "\",\"" . $matche['msgid_plural'] . "\",\"" . $matche['msgctxt'] . "\",\"" . $etm_folder . "\",\"" . $tmp_textdomain . "\",\"" . $etm_tag . "\",' ','0'," . $userdata->ID . ",\"" . $_SERVER['REMOTE_ADDR'] . "\")"; $wpdb->query($sql_tmp2); $string_id = $wpdb->insert_id; if (!empty($matche['msgstr'][0]) and !empty($tmp_lang) and !empty($string_id)) { $sql_tmp3 = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}etm_plugin_string WHERE lang_code = \"" . $tmp_lang . "\" and lang_index_id =\"" . $string_id . "\""); if (empty($sql_tmp3)) { $has_input_data_checkup = true; $sqlinsert = "INSERT INTO {$wpdb->prefix}etm_plugin_string (lang_code,lang_index_id,translatede_string,translatede_string2,create_user,create_ip) \n\t\t\t\t\t\t\t\t \t VALUES (\"" . $tmp_lang . "\",\"" . $string_id . "\",\"" . $matche['msgstr'][0] . "\",\"" . $matche['msgstr'][1] . "\"," . $userdata->ID . ",\"" . $_SERVER['REMOTE_ADDR'] . "\")"; $wpdb->query($sqlinsert); echo '<tr style="font-size:10px;"><td>'; echo 'Insert'; echo '</td><td>'; if (!empty($matche['msgctxt'])) { echo 'placeholder (' . $matche['msgctxt'] . ')<br>'; } echo $matche['msgid'] . ' -- ' . $matche['msgstr'][0]; if (!empty($matche['msgstr'][1])) { echo '<br>'; echo $matche['msgid_plural'] . ' -- ' . $matche['msgstr'][1]; } echo '</td></tr>'; } else { if ($_POST['overwrite'] == 'on') { $has_input_data_checkup = true; $sqlupdate = "UPDATE {$wpdb->prefix}etm_plugin_string SET translatede_string=\"" . $matche['msgstr'][0] . "\",translatede_string2=\"" . $matche['msgstr'][1] . "\" WHERE lang_code = \"" . $tmp_lang . "\" and lang_index_id =\"" . $string_id . "\""; $wpdb->query($sqlupdate); echo '<tr style="font-size:10px;"><td>'; echo 'Update'; echo '</td><td>'; if (!empty($matche['msgctxt'])) { echo 'placeholder (' . $matche['msgctxt'] . ')<br>'; } echo $matche['msgid'] . ' -- ' . $matche['msgstr'][0]; if (!empty($matche['msgstr'][1])) { echo '<br>'; echo $matche['msgid_plural'] . ' -- ' . $matche['msgstr'][1]; } echo '</td></tr>'; } } } } } } if (empty($has_input_data_checkup)) { echo '<tr><td colspan="2">'; echo '<span style="color:red;">No data has been Insert/Update</span>'; echo '</td></tr>'; } echo '</table>'; echo '</div><table cellpadding="5"><tr><td>'; echo '<tr><td>Done</td><td>'; echo '<a href="' . $this->curPageURL() . '"><- Back</a>'; echo '</td></tr>'; echo '</table>'; if (!empty($has_input_data_checkup)) { echo "<script>jQuery( function( \$ ) {jQuery.post('" . admin_url() . "',{etm_data: true,'etm_fn':'mo_generator' })});</script>"; } die; } else { $Error = 'Cannot find any strings'; } } } } } } } if (!empty($Error)) { echo '<table cellpadding="5"><tr><td>'; echo '<h3 style="margin-bottom: 0px;">' . __('Error', 'evt') . '</h3>'; echo '</td></tr>'; echo '<tr><td>'; echo $Error; echo '</td></tr>'; echo '<tr><td>'; echo '<a href="' . $this->curPageURL() . '"><- Back</a>'; echo '</td></tr>'; echo '</table>'; } else { echo '<table cellpadding="5" width="100%"><tr><td width="50%">'; echo '<h3 style="margin-bottom: 0px;">' . __('Import .po file', 'evt') . '</h3>'; echo '</td><td width="50%">'; echo '<h3 style="margin-bottom: 0px;">' . __('Export .po file', 'evt') . '</h3>'; echo '</td></tr>'; echo '</tr><td width="50%" valign="top">'; echo '<p style="padding-right: 150px;font-size:12px">Import .po file to a plugin or theme. Remember the file name must follow this syntax "[textdomain]-[language].po" eg. our textdomain is <b>"EVT"</b> and the language of the file is English <b>"en"</b> or <b>"en_UK"</b>. In this case will it look like this <b>EVT-en.po</b> or <b>EVT-en_UK.po</b></p>'; $plugins = get_plugins(); $themes = wp_get_themes(); echo '<form method="post" enctype="multipart/form-data">'; echo '<select name="plugintheme" style="font-size:12px;width:450px;">'; echo '<option value="" style="font-size:12px;">' . __('Select plugin / theme', 'evt') . '</option>'; echo '<option value="" disabled="disabled">----------------' . __('Plugin', 'evt') . '----------------</option>'; if (!empty($plugins)) { foreach ($plugins as $key => $plugin) { $folder = explode("/", $key); echo '<option style="font-size:12px;" value="' . $folder[0] . '|||plugin">' . utf8_decode(strip_tags($plugin['Title'])) . ' (' . utf8_decode(strip_tags($plugin['Version'])) . ')</option>'; } } echo '<option value="" disabled="disabled">----------------' . __('Themes', 'evt') . '----------------</option>'; if (!empty($themes)) { foreach ($themes as $key => $theme) { echo '<option style="font-size:12px;" value="' . $theme['Template'] . '|||theme">' . utf8_decode(strip_tags($theme['Title'])) . ' (' . utf8_decode(strip_tags($theme['Version'])) . ')</option>'; } } echo '</select><br>'; echo '<input type="file" name="file" id="file" style="font-size:12px;;width:450px;">'; echo '<input type="hidden" name="status" value="import"><br>'; echo '<label for="file" style="font-size: 12px;margin-left:8px;">Overwrite the existing translations:</label> <input name="overwrite" type="checkbox" value="on"><br>'; echo '<input type="submit" name="submit" style="font-size: 12px;margin-left:400px;" value="Submit"><br>'; echo '</form>'; echo '</td><td width="50%" valign="top">'; echo '<p style="font-size:12px">If you cannot find your textdomain then go to Theme translation or Plugin translation and rescan the folder. Once you know the textdomain return to this page.</p>'; $sql_tmp4 = "SELECT count(mo_tag) as counttag , mo_tag FROM {$wpdb->prefix}etm_plugin_index\nwhere mo_tag != '' and mo_tag != 'Variable textdomain' group by mo_tag order by mo_tag"; $sqldata_tmp4 = $wpdb->get_results($sql_tmp4); echo '<select id="etm_texdomains" style="font-size:12px;width:450px;">'; echo '<option value="" style="font-size:12px;">' . __('Select Textdomain', 'evt') . '</option>'; if (!empty($sqldata_tmp4)) { foreach ($sqldata_tmp4 as $key => $sqltmp4) { echo '<option style="font-size:12px;" value="' . $sqltmp4->mo_tag . '">' . $sqltmp4->mo_tag . ' (' . $sqltmp4->counttag . ')</option>'; } } echo '</select><br>'; $current_active_tmp_lang = etm_tools_retrive_languages_data(etm_tools_retrive_aktiv_languages('', false), true); echo '<select id="etm_languages" style="font-size:12px;width:450px;">'; echo '<option value="" style="font-size:12px;">' . __('Select Languages', 'evt') . '</option>'; if (!empty($current_active_tmp_lang)) { foreach ($current_active_tmp_lang as $key => $current_active_tmp) { echo '<option style="font-size:12px;" value="' . $current_active_tmp['code'] . '|||' . $current_active_tmp['default_locale'] . '">' . $current_active_tmp['english_name'] . ' (' . $current_active_tmp['org_name'] . ')</option>'; } } echo '</select><br>'; echo '<input type="submit" name="submit" onClick="etm_download_click();return false;" style="font-size: 12px;margin-left:400px;" value="Submit"><br>'; echo "<script>\n\t\t\t\tjQuery(document).ready(function(\$){\n\t\t\t\t\tjQuery.download = function(url, data, method){\n\t\t\t\t\t\tif( url && data ){ \n\t\t\t\t\t\t\tdata = typeof data == 'string' ? data : jQuery.param(data);\n\t\n\t\t\t\t\t\t\tvar inputs = '';\n\t\t\t\t\t\t\tjQuery.each(data.split('&'), function(){ \n\t\t\t\t\t\t\t\tvar pair = this.split('=');\n\t\t\t\t\t\t\t\tinputs+='<input type=\"hidden\" name=\"'+ pair[0] +'\" value=\"'+ pair[1] +'\" />'; \n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tjQuery('<form action=\"'+ url +'\" method=\"'+ (method||'post') +'\">'+inputs+'</form>')\n\t\t\t\t\t\t\t.appendTo('body').submit().remove();\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\n\n\t\t\t\t});\n\t\t\t\tfunction etm_download_click(){\t\n\t\t\t\t\tif(jQuery('#etm_languages').val() != '' && jQuery('#etm_texdomains').val() != '' ){\n\t\t\t\t\t\n\t\t\t\t\t\tjQuery.download('" . admin_url() . "','lang='+jQuery('#etm_languages').val()+'&mo='+jQuery('#etm_texdomains').val()+'&etm_data=true&etm_fn=mo_export');\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t</script>"; echo '</td></tr></table>'; } }
function get_active_flags() { global $easy_translation_manager_plugin; $active_langs = etm_tools_retrive_aktiv_languages('', false); // if default is not active in flags then add if (!empty($easy_translation_manager_plugin->etm_tools_retrive['default_language']) && empty($active_langs[$easy_translation_manager_plugin->etm_tools_retrive['default_language']])) { $active_langs[$easy_translation_manager_plugin->etm_tools_retrive['default_language']] = 2; } // Sort the flags if (!empty($easy_translation_manager_plugin->etm_tools_retrive['flag_sort'])) { $flag_sorts = $easy_translation_manager_plugin->etm_tools_retrive['flag_sort']; foreach ($flag_sorts as $_key => $_data) { if (empty($active_langs[$_data])) { unset($flag_sorts[$_key]); } } $flag_sorts = array_values($flag_sorts); $flag_sorts = etm_tools_retrive_languages_data($flag_sorts, false, false); return $flag_sorts; } // reset index and get alternativ data $active_langs = array_keys($active_langs); $active_langs = etm_tools_retrive_languages_data($active_langs, false, true); $active_langs = etm_tools_subval_sort($active_langs, 'org_name', 'desc'); return $active_langs; }
function etm_tools_check_lang($languashed, $category_type, $folder) { global $wpdb; $langed_string = ''; $current_aktive_lang = etm_tools_retrive_aktiv_languages(); if ($languashed) { $flag_array = array(); if ($category_type == 'plugin' or $category_type == 'theme' or $category_type == 'addon') { $sql_flag_tag = " SELECT tl.lang_code , count(tl.lang_code) as lang_count FROM {$wpdb->prefix}etm_plugin_index as ti, {$wpdb->prefix}etm_plugin_string as tl WHERE ti.mo_tag != '' and ti.deleted = 0 and ti.category_type ='" . $category_type . "' and ti.folder_name = '" . $folder . "' and tl.lang_index_id = ti.id and tl.translatede_string != '' group by lang_code"; $sqldata_flag_tag = $wpdb->get_results($sql_flag_tag); foreach ($sqldata_flag_tag as $tmp) { $flag_array[$tmp->lang_code] = $tmp->lang_count; } $sqltotal_count = "SELECT count(id) `total_count` ,count(NULLIF(mo_tag, '')) `active_count` FROM {$wpdb->prefix}etm_plugin_index WHERE deleted = 0 and category_type ='" . $category_type . "' and folder_name ='" . $folder . "'"; $sqldatatotal_count = $wpdb->get_results($sqltotal_count); $total_count = $sqldatatotal_count[0]->active_count; } else { if ($category_type == 'post') { $args = array('posts_per_page' => 9999999999, 'post_status' => array('publish', 'pending', 'draft', 'private', 'static', 'object', 'attachment', 'inherit', 'future'), 'post_type' => $folder); $posts_array = query_posts($args); if ($posts_array) { $total_count = count($posts_array); $tmparray = ''; foreach ($posts_array as $tmp) { foreach ($current_aktive_lang as $lang_key => $tmp_lang) { $tmp_val = get_post_meta($tmp->ID, 'ect_tran_content_' . $lang_key, true); if (!empty($tmp_val[$tmp->ID]) and !empty($flag_array[$lang_key])) { $flag_array[$lang_key] += 1; } else { if (!empty($tmp_val[$tmp->ID]) and empty($flag_array[$lang_key])) { $flag_array[$lang_key] = 1; } } } } } } else { if ($category_type == 'menu') { $menu_name = wp_get_nav_menu_items($folder); if ($menu_name) { $total_count = count($menu_name); $tmparray = ''; foreach ($menu_name as $tmp) { foreach ($current_aktive_lang as $lang_key => $tmp_lang) { $tmp_val = get_option('ect_tran_menu_' . $lang_key); if (!empty($tmp_val[$tmp->ID]) and !empty($flag_array[$lang_key])) { $flag_array[$lang_key] += 1; } else { if (!empty($tmp_val[$tmp->ID]) and empty($flag_array[$lang_key])) { $flag_array[$lang_key] = 1; } } } } } } } } if (!empty($flag_array) and !empty($total_count) and $total_count > 0) { $langed_string = etm_tools_check_lang_createstring($total_count, $languashed, $flag_array); } } if (empty($langed_string)) { $langed_string = '<span style="color:#cccccc">none</span>'; } return $langed_string; }
function etm_sub_page_installation($check_install) { global $wpdb; if (version_compare($check_install, '3.0.5', '<')) { $queries = array(); $queries[] = "ALTER TABLE `#__etm_plugin_index` ADD `default_string2` TEXT character set utf8 collate utf8_unicode_ci NOT NULL;"; $queries[] = "ALTER TABLE `#__etm_plugin_string` ADD `translatede_string2` TEXT character set utf8 collate utf8_unicode_ci NOT NULL;"; foreach ($queries as $query) { $query = str_replace('#__', $wpdb->prefix, $query); $wpdb->query($query); } } if (version_compare($check_install, '4.0.2', '<')) { $queries = array(); $queries[] = "ALTER TABLE `#__etm_plugin_index` ADD `default_placeholder` TEXT NOT NULL;"; foreach ($queries as $query) { $query = str_replace('#__', $wpdb->prefix, $query); $wpdb->query($query); } } $option_value_check = $wpdb->get_var("SELECT option_value FROM " . $wpdb->prefix . 'options WHERE option_name="etm_version" limit 1'); $langs_active = etm_tools_retrive_aktiv_languages(); foreach ($langs_active as $key_lang => $data_lang) { $getval_menus = ''; $getval_menus = get_option('ect_tran_menu_' . $key_lang); if (!empty($getval_menus)) { foreach ($getval_menus as $key_menu => $getval_menu) { if (!is_object($getval_menu)) { $getval_menus[$key_menu] = ''; $getval_menus[$key_menu]->title = $getval_menu; } } update_option('ect_tran_menu_' . $key_lang, $getval_menus); } $getval_terms = ''; $getval_terms = get_option('ect_tran_terms_' . $key_lang); if (!empty($getval_terms)) { foreach ($getval_terms as $key_term => $getval_term) { if (!is_object($getval_term)) { $getval_terms[$key_term] = ''; $getval_terms[$key_term]->name = $getval_term; } } update_option('ect_tran_terms_' . $key_lang, $getval_terms); } } if (empty($option_value_check)) { $sql_post = "SELECT post_id,lang_code,translatede_header,translatede_body FROM {$wpdb->prefix}etm_post WHERE deleted != 1"; $sqldata_posts = $wpdb->get_results($sql_post); foreach ($sqldata_posts as $sqldata_post) { update_post_meta($sqldata_post->post_id, 'ect_tran_title_' . $sqldata_post->lang_code, $sqldata_post->translatede_header); update_post_meta($sqldata_post->post_id, 'ect_tran_content_' . $sqldata_post->lang_code, $sqldata_post->translatede_body); } $sql_terms = "SELECT terms_id,lang_code,translatede_string,terms_type FROM {$wpdb->prefix}etm_post_terms WHERE deleted != 1"; $sqldata_termss = $wpdb->get_results($sql_terms); foreach ($sqldata_termss as $sqldata_terms) { $getval = ''; $getval = get_option('ect_tran_terms_' . $sqldata_terms->lang_code); $getval[$sqldata_terms->terms_id] = $sqldata_terms->translatede_string; update_option('ect_tran_terms_' . $sqldata_terms->lang_code, $getval); } $sql_menu = "SELECT menu_id,lang_code,translatede_string FROM {$wpdb->prefix}etm_menu WHERE deleted != 1"; $sqldata_menus = $wpdb->get_results($sql_menu); foreach ($sqldata_menus as $sqldata_menu) { $getval = ''; $getval = get_option('ect_tran_menu_' . $sqldata_menu->lang_code); $getval[$sqldata_menu->menu_id] = $sqldata_menu->translatede_string; update_option('ect_tran_menu_' . $sqldata_menu->lang_code, $getval); } } etm_install_capabilities(); $option_value = $wpdb->get_var("SELECT option_value FROM " . $wpdb->prefix . 'options WHERE option_name="etm_options" limit 1'); if (empty($option_value)) { $wpdb->insert($wpdb->prefix . 'options', array('option_name' => 'etm_options', 'option_value' => 'a:265:{s:7:"GP_name";s:2:"la";s:7:"test_ip";s:0:"";s:16:"browser_languash";s:1:"0";s:16:"default_language";s:2:"en";s:11:"hide_auther";s:0:"";s:12:"hide_plugins";s:1:"0";s:16:"hide_plugins_all";s:0:"";s:20:"hide_plugins_akismet";s:0:"";s:25:"hide_plugins_allow-images";s:0:"";s:33:"hide_plugins_easy-contextual-help";s:0:"";s:28:"hide_plugins_easy-pagination";s:0:"";s:37:"hide_plugins_easy-translation-manager";s:0:"";s:22:"hide_plugins_hello.php";s:0:"";s:20:"hide_plugins_jetpack";s:0:"";s:32:"hide_plugins_jquery-website-tour";s:0:"";s:31:"hide_plugins_pages-by-user-role";s:0:"";s:23:"hide_plugins_private-wp";s:0:"";s:26:"hide_plugins_support-forum";s:0:"";s:43:"hide_plugins_timthumb-vulnerability-scanner";s:0:"";s:25:"hide_plugins_wp-dbmanager";s:0:"";s:32:"hide_plugins_wp-status-dashboard";s:0:"";s:10:"hide_theme";s:1:"0";s:15:"hide_themes_all";s:0:"";s:24:"hide_themes_PlatformBase";s:0:"";s:23:"hide_themes_PlatformPro";s:0:"";s:25:"hide_themes_Twenty+Eleven";s:0:"";s:18:"hide_pages_publish";s:1:"0";s:21:"hide_page_publish_all";s:0:"";s:19:"hide_page_publish_2";s:0:"";s:18:"hide_pages_pending";s:1:"0";s:21:"hide_page_pending_all";s:0:"";s:16:"hide_pages_draft";s:1:"0";s:19:"hide_page_draft_all";s:0:"";s:18:"hide_pages_private";s:1:"0";s:21:"hide_page_private_all";s:0:"";s:21:"hide_pages_attachment";s:1:"0";s:24:"hide_page_attachment_all";s:0:"";s:22:"hide_page_attachment_2";s:0:"";s:18:"hide_pages_inherit";s:1:"0";s:21:"hide_page_inherit_all";s:0:"";s:25:"hide_posts_status_publish";s:1:"0";s:28:"hide_post_status_publish_all";s:0:"";s:26:"hide_post_status_publish_1";s:0:"";s:25:"hide_posts_status_pending";s:1:"0";s:28:"hide_post_status_pending_all";s:0:"";s:23:"hide_posts_status_draft";s:1:"0";s:26:"hide_post_status_draft_all";s:0:"";s:25:"hide_posts_status_private";s:1:"0";s:28:"hide_post_status_private_all";s:0:"";s:28:"hide_posts_status_attachment";s:1:"0";s:31:"hide_post_status_attachment_all";s:0:"";s:29:"hide_post_status_attachment_3";s:0:"";s:29:"hide_post_status_attachment_1";s:0:"";s:25:"hide_posts_status_inherit";s:1:"0";s:28:"hide_post_status_inherit_all";s:0:"";s:21:"hide_posts_types_post";s:1:"0";s:25:"hide_posts_types_post_all";s:0:"";s:23:"hide_posts_types_post_1";s:0:"";s:27:"hide_posts_types_attachment";s:1:"0";s:31:"hide_posts_types_attachment_all";s:0:"";s:23:"hide_posts_types_echelp";s:1:"0";s:27:"hide_posts_types_echelp_all";s:0:"";s:25:"hide_posts_types_echelpms";s:1:"0";s:29:"hide_posts_types_echelpms_all";s:0:"";s:20:"hide_posts_types_jwt";s:1:"0";s:24:"hide_posts_types_jwt_all";s:0:"";s:26:"hide_posts_types_jwt-slide";s:1:"0";s:30:"hide_posts_types_jwt-slide_all";s:0:"";s:10:"hide_menus";s:1:"0";s:13:"hide_menu_all";s:0:"";s:14:"limit_interval";s:2:"50";s:22:"sort_group_list_plugin";s:5:"title";s:32:"sort_group_list_direction_plugin";s:4:"decs";s:23:"sort_single_list_plugin";s:14:"default_string";s:33:"sort_single_list_direction_plugin";s:4:"decs";s:21:"sort_group_list_theme";s:5:"title";s:31:"sort_group_list_direction_theme";s:4:"decs";s:22:"sort_single_list_theme";s:14:"default_string";s:32:"sort_single_list_direction_theme";s:4:"decs";s:20:"sort_group_list_page";s:2:"id";s:30:"sort_group_list_direction_page";s:4:"decs";s:20:"sort_group_list_post";s:5:"title";s:30:"sort_group_list_direction_post";s:4:"decs";s:21:"sort_single_list_post";s:2:"id";s:31:"sort_single_list_direction_post";s:4:"decs";s:20:"sort_group_list_menu";s:2:"id";s:30:"sort_group_list_direction_menu";s:4:"decs";s:21:"sort_single_list_menu";s:2:"id";s:31:"sort_single_list_direction_menu";s:4:"decs";s:15:"desing_menu_pos";s:1:"0";s:16:"desing_menu_info";s:1:"0";s:21:"desing_menu_flag_size";s:1:"0";s:16:"desing_menu_type";s:1:"3";s:15:"desing_menu_css";s:0:"";s:7:"lang_en";s:1:"2";s:7:"lang_us";s:1:"0";s:7:"lang_es";s:1:"0";s:7:"lang_zh";s:1:"0";s:7:"lang_fr";s:1:"0";s:7:"lang_de";s:1:"0";s:7:"lang_pt";s:1:"0";s:7:"lang_ru";s:1:"0";s:7:"lang_ar";s:1:"0";s:7:"lang_ja";s:1:"0";s:7:"lang_sq";s:1:"0";s:7:"lang_hy";s:1:"0";s:7:"lang_eu";s:1:"0";s:7:"lang_bs";s:1:"0";s:7:"lang_bg";s:1:"0";s:7:"lang_ca";s:1:"0";s:7:"lang_hr";s:1:"0";s:7:"lang_cs";s:1:"0";s:7:"lang_da";s:1:"0";s:7:"lang_nl";s:1:"0";s:7:"lang_eo";s:1:"0";s:7:"lang_et";s:1:"0";s:7:"lang_fi";s:1:"0";s:7:"lang_el";s:1:"0";s:7:"lang_he";s:1:"0";s:7:"lang_hi";s:1:"0";s:7:"lang_hu";s:1:"0";s:7:"lang_is";s:1:"0";s:7:"lang_id";s:1:"0";s:7:"lang_ga";s:1:"0";s:7:"lang_it";s:1:"0";s:7:"lang_ko";s:1:"0";s:7:"lang_ku";s:1:"0";s:7:"lang_la";s:1:"0";s:7:"lang_lv";s:1:"0";s:7:"lang_lt";s:1:"0";s:7:"lang_mk";s:1:"0";s:7:"lang_mt";s:1:"0";s:7:"lang_mo";s:1:"0";s:7:"lang_mn";s:1:"0";s:7:"lang_ne";s:1:"0";s:7:"lang_nb";s:1:"0";s:7:"lang_fa";s:1:"0";s:7:"lang_pl";s:1:"0";s:7:"lang_pa";s:1:"0";s:7:"lang_qu";s:1:"0";s:7:"lang_ro";s:1:"0";s:7:"lang_sr";s:1:"0";s:7:"lang_sl";s:1:"0";s:7:"lang_so";s:1:"0";s:7:"lang_sv";s:1:"0";s:7:"lang_ta";s:1:"0";s:7:"lang_th";s:1:"0";s:7:"lang_tr";s:1:"0";s:7:"lang_uk";s:1:"0";s:7:"lang_ur";s:1:"0";s:7:"lang_uz";s:1:"0";s:7:"lang_vi";s:1:"0";s:7:"lang_cy";s:1:"0";s:7:"lang_yi";s:1:"0";s:7:"lang_zu";s:1:"0";s:18:"rtl_front_page_css";s:7:"rtl.css";s:9:"old_flags";s:1:"0";s:16:"deactivate_seach";s:1:"0";s:26:"fade_none_translation_menu";s:1:"0";s:13:"use_permalink";s:1:"0";s:15:"change_wp_admin";s:1:"1";s:23:"default_language_wp_etm";s:2:"en";s:19:"hide_elements_pages";s:0:"";s:19:"hide_elements_posts";s:0:"";s:18:"hide_elements_tags";s:0:"";s:24:"hide_elements_categories";s:0:"";s:19:"hide_elements_menus";s:0:"";s:21:"hide_elements_default";s:0:"";s:24:"hide_plugins_modal-login";s:0:"";s:24:"hide_plugins_woocommerce";s:0:"";s:26:"hide_plugins_wordpress-seo";s:0:"";s:31:"hide_plugins_wp-multibyte-patch";s:0:"";s:19:"hide_themes_classic";s:0:"";s:19:"hide_themes_default";s:0:"";s:26:"hide_themes_twentyfourteen";s:0:"";s:26:"hide_themes_twentythirteen";s:0:"";s:24:"hide_themes_twentytwelve";s:0:"";s:24:"hide_posts_types_product";s:1:"0";s:34:"hide_posts_types_product_variation";s:1:"0";s:27:"hide_posts_types_shop_order";s:1:"0";s:34:"hide_posts_types_shop_order_refund";s:1:"0";s:28:"hide_posts_types_shop_coupon";s:1:"0";s:29:"hide_posts_types_shop_webhook";s:1:"0";s:21:"sort_group_list_addon";s:5:"title";s:31:"sort_group_list_direction_addon";s:4:"decs";s:22:"sort_single_list_addon";s:14:"default_string";s:32:"sort_single_list_direction_addon";s:4:"decs";s:23:"desing_menu_lang_string";s:13:"[ORG] ([ENG])";s:17:"desing_menu_align";s:9:"alignleft";s:17:"desing_menu_width";s:0:"";s:23:"desing_menu_pos_overlay";s:1:"0";s:24:"desing_menu_type_overlay";s:1:"3";s:29:"desing_menu_flag_size_overlay";s:1:"0";s:24:"desing_menu_info_overlay";s:1:"1";s:28:"desing_menu_lockdonw_overlay";s:5:"fixed";s:29:"desing_menu_placement_overlay";s:7:"topleft";s:28:"desing_menu_xpostion_overlay";s:1:"0";s:28:"desing_menu_ypostion_overlay";s:1:"0";s:35:"desing_menu_backgroundalpha_overlay";s:1:"0";s:35:"desing_menu_backgroundcolor_overlay";s:7:"#ffffff";s:28:"desing_menu_boxalpha_overlay";s:1:"0";s:28:"desing_menu_boxcolor_overlay";s:7:"#000000";s:16:"showonlyonpostID";s:0:"";s:25:"desing_menu_pos_dashboard";s:1:"1";s:26:"desing_menu_type_dashboard";s:1:"3";s:31:"desing_menu_flag_size_dashboard";s:1:"0";s:26:"desing_menu_info_dashboard";s:1:"1";s:27:"desing_menu_align_dashboard";s:9:"alignleft";s:27:"desing_menu_title_dashboard";s:29:"Select your wp-admin Language";s:27:"desing_menu_width_dashboard";s:0:"";s:7:"lang_az";s:1:"0";s:7:"lang_br";s:1:"0";s:7:"lang_kh";s:1:"0";s:7:"lang_fo";s:1:"0";s:7:"lang_fe";s:1:"0";s:7:"lang_gl";s:1:"0";s:7:"lang_zn";s:1:"0";s:7:"lang_ib";s:1:"0";s:7:"lang_lk";s:1:"0";s:7:"lang_sk";s:1:"0";s:7:"lang_zw";s:1:"0";s:9:"flag_sort";a:1:{i:0;s:2:"en";}s:17:"translator_yandex";s:0:"";s:19:"seo_plugin_by_yoast";s:1:"0";s:11:"domain_list";a:1:{s:2:"en";s:0:"";}s:16:"domain_list_fast";a:1:{s:0:"";s:2:"en";}s:27:"hide_plugins_righthere-menu";s:0:"";s:11:"hide_menu_8";s:0:"";s:21:"desing_menu_hidearrow";s:1:"0";s:29:"desing_menu_hidearrow_overlay";s:1:"0";s:30:"desing_menu_pixel_jump_overlay";s:1:"0";s:31:"desing_menu_hidearrow_dashboard";s:1:"0";s:18:"hide_themes_canvas";s:0:"";s:15:"hide_themes_duo";s:0:"";s:29:"hide_posts_types_wooframework";s:0:"";s:22:"hide_posts_types_slide";s:0:"";s:26:"hide_posts_types_portfolio";s:0:"";s:24:"hide_plugins_fusion-core";s:0:"";s:24:"hide_plugins_LayerSlider";s:0:"";s:22:"hide_plugins_revslider";s:0:"";s:29:"hide_themes_Avada-Child-Theme";s:0:"";s:17:"hide_themes_Avada";s:0:"";s:25:"hide_themes_Jupiter-child";s:0:"";s:29:"hide_themes_Karma-Child-Theme";s:0:"";s:17:"hide_themes_Karma";s:0:"";s:17:"hide_themes_awake";s:0:"";s:19:"hide_themes_infocus";s:0:"";s:19:"hide_themes_jupiter";s:0:"";s:19:"hide_themes_salient";s:0:"";s:25:"hide_themes_betheme-child";s:0:"";s:19:"hide_themes_betheme";s:0:"";s:24:"hide_themes_bridge-child";s:0:"";s:18:"hide_themes_bridge";s:0:"";s:26:"hide_themes_brooklyn-child";s:0:"";s:20:"hide_themes_brooklyn";s:0:"";s:19:"hide_themes_dt-the7";s:0:"";s:18:"hide_themes_enfold";s:0:"";s:26:"hide_themes_flatsome-child";s:0:"";s:20:"hide_themes_flatsome";s:0:"";s:20:"hide_themes_u-design";s:0:"";s:23:"hide_posts_types_client";s:0:"";s:22:"hide_posts_types_offer";s:0:"";s:23:"hide_posts_types_layout";s:0:"";s:28:"hide_posts_types_testimonial";s:0:"";s:31:"hide_plugins_custom-widget-area";s:0:"";}', 'autoload' => 'yes'), array('%s', '%s', '%s')); } if (version_compare($check_install, '4.0.0', '<')) { update_option('etm_version', ETM_VERSION); wp_redirect(admin_url('admin.php?page=etm-opt&pop_open_tabs=languages-fields')); die; } if (version_compare($check_install, '4.0.9', '<')) { $wpdb->query("DELETE FROM " . $wpdb->prefix . "options WHERE SUBSTRING(option_name,1,9)= '_tmp_etm_'"); } update_option('etm_version', ETM_VERSION); return true; }
function manage_posts_custom_column($column, $post_id) { if ($column == 'etmlang') { $admin_url = admin_url('post.php?post=' . $post_id . '&action=edit'); $languashed = etm_tools_retrive_languages_data(etm_tools_retrive_aktiv_languages(), true); echo $this->etm_tools_check_lang_createstring($languashed, '', $admin_url, $post_id, 24, 'text-align: left'); } }
function activ_lang_array() { $tmp_lang = etm_tools_retrive_aktiv_languages('', false); if (!empty($this->etm_tools_retrive['default_language'])) { $tmp_lang[$this->etm_tools_retrive['default_language']] = 2; } $languashed = etm_tools_retrive_languages_data($tmp_lang, true); $return_array = ''; foreach ($languashed as $tmp) { $return_array[$tmp['code']] = $tmp['english_name'] . ' (' . $tmp['org_name'] . ')'; } return $return_array; }
/** * Build a sub-sitemap for a specific post type -- example.com/post_type-sitemap.xml * * @param string $post_type Registered post type's slug */ function build_post_type_map($post_type) { global $wpseo_sitemaps; $options = get_wpseo_options(); if (isset($options['post_types-' . $post_type . '-not_in_sitemap']) && $options['post_types-' . $post_type . '-not_in_sitemap'] || in_array($post_type, array('revision', 'nav_menu_item', 'attachment'))) { $this->bad_sitemap = true; $wpseo_sitemaps->set_bad_sitemap(true); return; } $output = ''; $front_id = get_option('page_on_front'); if (!$front_id && $post_type == 'post') { $output .= $wpseo_sitemaps->sitemap_url(array('loc' => home_url('/'), 'pri' => 1, 'chf' => 'daily')); } else { if ($front_id && $post_type == 'post') { $page_for_posts = get_option('page_for_posts'); if ($page_for_posts) { $output .= $wpseo_sitemaps->sitemap_url(array('loc' => get_permalink($page_for_posts), 'pri' => 1, 'chf' => 'daily')); } } } if (function_exists('get_post_type_archive_link')) { $archive = get_post_type_archive_link($post_type); if ($archive) { $output .= $wpseo_sitemaps->sitemap_url(array('loc' => $archive, 'pri' => 0.8, 'chf' => 'weekly', 'mod' => $wpseo_sitemaps->get_last_modified($post_type))); } } global $wpdb; $join_filter = ''; $join_filter = apply_filters('wpseo_typecount_join', $join_filter, $post_type); $where_filter = ''; $where_filter = apply_filters('wpseo_typecount_where', $where_filter, $post_type); $typecount = $wpdb->get_var("SELECT COUNT(ID) FROM {$wpdb->posts} {$join_filter} WHERE post_status = 'publish' AND post_password = '' AND post_type = '{$post_type}' {$where_filter}"); if ($typecount == 0 && empty($archive)) { $this->bad_sitemap = true; $wpseo_sitemaps->set_bad_sitemap(true); return; } // Let's flush the object cache so we're not left with garbage from other plugins wp_cache_flush(); $stackedurls = array(); $steps = 25; $n = (int) get_query_var('sitemap_n'); $offset = $n > 1 ? ($n - 1) * 1000 : 0; $total = $offset + 1000; if ($total > $typecount) { $total = $typecount; } // We grab post_date, post_name, post_author and post_status too so we can throw these objects into get_permalink, which saves a get_post call for each permalink. while ($total > $offset) { $join_filter = ''; $join_filter = apply_filters('wpseo_posts_join', $join_filter, $post_type); $where_filter = ''; $where_filter = apply_filters('wpseo_posts_where', $where_filter, $post_type); $posts = $wpdb->get_results("SELECT ID, post_content, post_name, post_author, post_parent, post_modified_gmt, post_date, post_date_gmt\n\t\t\tFROM {$wpdb->posts} {$join_filter}\n\t\t\tWHERE post_status = 'publish'\n\t\t\tAND\tpost_password = ''\n\t\t\tAND post_type = '{$post_type}'\n\t\t\t{$where_filter}\n\t\t\tORDER BY post_modified ASC\n\t\t\tLIMIT {$steps} OFFSET {$offset}"); $offset = $offset + $steps; $etm_current_data = etm_tools_retrive_aktiv_languages(); $etm_tag_string = etm_tools_retrive_options('GP_name'); $etm_permalinktilladelse = etm_tools_retrive_options('use_permalink'); $etm_default_lang = etm_tools_retrive_options('default_language'); $etm_tag_array = ''; if (!empty($etm_tag_string)) { $etm_tag_array = explode('|', $etm_tag_string); $etm_tag_string = ''; } foreach ($posts as $p) { $p->post_type = $post_type; $p->post_status = 'publish'; $p->filter = 'sample'; $runethrowlang = array(); $runethrowlang[] = ''; if ($post_type == 'post' || $post_type == 'page') { $tmp_meta_data = ''; $tmp_meta_data = get_post_custom($p->ID); foreach ($etm_current_data as $etm_lang_key => $etm_lang_data) { $_tran_focuskw = ''; $_tran_title = ''; $_tran_metadesc = ''; $translations_header = ''; $translations_body = ''; $translations_permalink = ''; $_tran_focuskw = $tmp_meta_data['_yoast_wpseo_focuskw_' . $etm_lang_key][0]; $_tran_title = $tmp_meta_data['_yoast_wpseo_title_' . $etm_lang_key][0]; $_tran_metadesc = $tmp_meta_data['_yoast_wpseo_metadesc_' . $etm_lang_key][0]; $translations_header = $tmp_meta_data['ect_tran_title_' . $etm_lang_key][0]; $translations_body = $tmp_meta_data['ect_tran_content_' . $etm_lang_key][0]; $translations_permalink = $tmp_meta_data['ect_tran_permalink_' . $etm_lang_key][0]; if ($translations_permalink == '/' || !$etm_permalinktilladelse) { $translations_permalink = ''; } if (!empty($_tran_focuskw) || !empty($_tran_title) || !empty($_tran_metadesc) || !empty($translations_header) || !empty($translations_body)) { $etm_tag_string = ''; $etm_permalin_string = ''; if (!empty($etm_tag_array) && empty($translations_permalink)) { foreach ($etm_tag_array as $temp_dat) { if (!empty($etm_tag_string)) { $etm_tag_string .= '&'; } $etm_tag_string .= $temp_dat . '=' . $etm_lang_key; } } else { if (!empty($translations_permalink)) { $etm_permalin_string = $translations_permalink; } } if (!empty($etm_tag_string)) { $runethrowlang[$etm_lang_key]->url = $etm_tag_string; $runethrowlang[$etm_lang_key]->permalink = 'false'; } else { if (!empty($etm_permalin_string)) { $runethrowlang[$etm_lang_key]->url = $etm_permalin_string; $runethrowlang[$etm_lang_key]->permalink = 'true'; } } } } } unset($tmp_meta_data); unset($_tran_focuskw); unset($_tran_title); unset($_tran_metadesc); unset($translations_header); unset($translations_body); unset($translations_permalink); foreach ($runethrowlang as $etm_translatede_key => $etm_translatede_data) { if (wpseo_get_value('meta-robots-noindex', $p->ID) && wpseo_get_value('sitemap-include', $p->ID) != 'always') { continue; } if (wpseo_get_value('sitemap-include', $p->ID) == 'never') { continue; } if (wpseo_get_value('redirect', $p->ID) && strlen(wpseo_get_value('redirect', $p->ID)) > 0) { continue; } $url = array(); $url['mod'] = isset($p->post_modified_gmt) && $p->post_modified_gmt != '0000-00-00 00:00:00' ? $p->post_modified_gmt : $p->post_date_gmt; $url['chf'] = 'weekly'; $url['loc'] = get_permalink($p); if (!empty($etm_translatede_data) && $etm_translatede_data->permalink == 'true') { if (!empty($etm_translatede_data->url)) { $url['loc'] = trailingslashit(get_option('siteurl')) . $etm_translatede_data->url; } } else { if (!empty($etm_translatede_data)) { $pieces = explode("?", $url['loc']); if (count($pieces) > 1) { $url['loc'] = $url['loc'] . '&' . $etm_translatede_data->url; } else { $url['loc'] = $url['loc'] . '?' . $etm_translatede_data->url; } } } $canonical = wpseo_get_value('canonical', $p->ID); if ($canonical && $canonical != '' && $canonical != $url['loc']) { continue; } else { if (isset($options['trailingslash']) && $options['trailingslash'] && $p->post_type != 'post') { $url['loc'] = trailingslashit($url['loc']); } } $pri = wpseo_get_value('sitemap-prio', $p->ID); if (is_numeric($pri)) { $url['pri'] = $pri; } elseif ($p->post_parent == 0 && $p->post_type == 'page') { $url['pri'] = 0.8; } else { $url['pri'] = 0.6; } if ($p->ID == $front_id) { $url['pri'] = 1.0; } $url['images'] = array(); if (preg_match_all('/<img [^>]+>/', $p->post_content, $matches)) { foreach ($matches[0] as $img) { // FIXME: get true caption instead of alt / title if (preg_match('/src=("|\')([^"|\']+)("|\')/', $img, $match)) { $src = $match[2]; if (strpos($src, 'http') !== 0) { if ($src[0] != '/') { continue; } $src = get_bloginfo('url') . $src; } if ($src != esc_url($src)) { continue; } if (isset($url['images'][$src])) { continue; } $image = array(); if (preg_match('/title=("|\')([^"\']+)("|\')/', $img, $match)) { $image['title'] = str_replace(array('-', '_'), ' ', $match[2]); } if (preg_match('/alt=("|\')([^"\']+)("|\')/', $img, $match)) { $image['alt'] = str_replace(array('-', '_'), ' ', $match[2]); } $url['images'][$src] = $image; } } } if (preg_match_all('/\\[gallery/', $p->post_content, $matches)) { $attachments = get_children(array('post_parent' => $p->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image')); foreach ($attachments as $att_id => $attachment) { $src = wp_get_attachment_image_src($att_id, 'large', false); $src = $src[0]; $image = array(); if ($alt = get_post_meta($att_id, '_wp_attachment_image_alt', true)) { $image['alt'] = $alt; } $image['title'] = $attachment->post_title; $url['images'][$src] = $image; } } $url['images'] = apply_filters('wpseo_sitemap_urlimages', $url['images'], $p->ID); if (!in_array($url['loc'], $stackedurls)) { $output .= $wpseo_sitemaps->sitemap_url($url); $stackedurls[] = $url['loc']; } } // Clear the post_meta and the term cache for the post, as we no longer need it now. wp_cache_delete($p->ID, 'post_meta'); // clean_object_term_cache( $p->ID, $post_type ); } } if (empty($output)) { $this->bad_sitemap = true; $wpseo_sitemaps->set_bad_sitemap(true); return; } $this->sitemap = '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" '; $this->sitemap .= 'xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" '; $this->sitemap .= 'xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n"; $this->sitemap .= $output . '</urlset>'; $wpseo_sitemaps->set_sitemap($this->sitemap); }