diff --git a/wp-content/plugins/buddypress-multilingual/activities.php b/wp-content/plugins/buddypress-multilingual/activities.php deleted file mode 100644 index f010dd8..0000000 --- a/wp-content/plugins/buddypress-multilingual/activities.php +++ /dev/null @@ -1,314 +0,0 @@ - $item - */ -function bpml_activities_bp_activity_before_save_hook($item) { - if ($item->type == 'new_blog') { - global $sitepress; - $item->action = bpml_filter_hrefs_from_to($item->action, ICL_LANGUAGE_CODE, - $sitepress->get_default_language(), -1, 1); - } -} - -/** - * Saves activity language. - * - * @global $sitepress - * @param $item - */ -function bpml_activities_bp_activity_after_save_hook($item) { - switch ($item->type) { - case 'new_blog_post': - $lang = bpml_get_item_language($item); - if (empty($lang)) { - return FALSE; - } else if (!empty($lang['language'])) { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['language']); - } else { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['default_language']); - } - if (!empty($lang['recorded_language'])) { - bp_activity_update_meta($item->id, 'bpml_lang_recorded', $lang['recorded_language']); - } - break; - - case 'new_blog_comment': - $lang = bpml_get_item_language($item, 'comment'); - if (empty($lang)) { - return FALSE; - } else if (!empty($lang['language'])) { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['language']); - } else { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['default_language']); - } - break; - - default: - if (defined('ICL_LANGUAGE_CODE')) { - bp_activity_update_meta($item->id, 'bpml_lang', ICL_LANGUAGE_CODE); - } - break; - } - bpml_activities_clear_cache($item->item_id, 'bpml_google_translation', 'main'); -} - -/** - * Triggers indicator that we're in activity loop. - */ -function bpml_activities_bp_before_activity_loop_hook() { - global $bpml_in_activity_loop; - $bpml_in_activity_loop = TRUE; -} - -/** - * Filters activities. - * - * @todo This filter is called twice on favorites page via hook - * 'bp_activity_get_specific'. See if that is a problem. - * - * @global $sitepress $sitepress - * @param $activity - * @param $r - * @return - */ -function bpml_activities_bp_activity_get_filter($activity, $r = NULL) { - global $sitepress, $bpml_in_activity_loop; - static $cache = array(); - $default_language = $sitepress->get_default_language(); - $current_language = $sitepress->get_current_language(); - foreach ($activity['activities'] as $key => $result) { - if (isset($cache[$result->id])) { - $activity['activities'][$key] = $cache[$result->id]; - continue; - } - $activity['activities'][$key] = bpml_activities_translate_activity($result, $default_language, $current_language); - if ($activity['activities'][$key] == FALSE) { - unset($activity['activities'][$key]); - } else { - $cache[$result->id] = $activity['activities'][$key]; - } - } -// if (!empty($bpml_in_activity_loop) && function_exists('bpml_google_translate_button')) { - if (function_exists('bpml_google_translate_button')) { - echo bpml_google_translate_button(); - } - $activity['total'] = count($activity['activities']); - return $activity; -} - -/** - * Translates activity entry. - * - * @param $result - * @param $default_language - * @param $current_language - * @param $options - * @return - */ -function bpml_activities_translate_activity($result, $default_language, $current_language) { - global $bpml; - // Record activity if isn't registered - if (!isset($bpml['collected_activities'][$result->type])) { - $bpml['collected_activities'][$result->type] = bpml_collected_activities_defaults(); - bpml_save_setting('collected_activities', $bpml['collected_activities']); - bpml_store_admin_notice($result->type, '

New activities to handle: ' . $result->type . '

'); - } - // Set options for current activity type (merge to cover missing options) - $type_options = array_merge(bpml_collected_activities_defaults(), $bpml['collected_activities'][$result->type]); - - // Get language - $lang = bp_activity_get_meta($result->id, 'bpml_lang'); - $lang_recorded = bp_activity_get_meta($result->id, 'bpml_lang_recorded'); - - // Set/fix orphans (missing lang) - if (empty($lang)) { - if ($bpml['activities']['orphans_fix']) { - $lang = bpml_activities_fix_orphan_activity($result, $default_language); - bpml_debug('

Orphaned activity FIXED ID:' . $result->id . ' (Missing language - assigning \'' . $lang . '\')

'); - } else { - bpml_debug('

Orphaned activity ID:' . $result->id . ' (Missing language - setting \'' . $default_language . '\')

'); - $lang = $default_language; - } - if (!$bpml['activities']['orphans_fix'] - && ($bpml['activities']['display_orphans'] === 'none' - || ($bpml['activities']['display_orphans'] === 'default' - && $current_language != $default_language))) { - return FALSE; - } - } - - // Filter activities - if (($bpml['activities']['filter'] && $lang == $current_language) - || (!$bpml['activities']['filter'])) { - - $result->lang = $lang; - if (!empty($lang_recorded)) { - $result->lang_recorded = $lang_recorded; - } - - // Process children - if (!empty($result->children)) { - foreach ($result->children as $child_key => $child) { - $result->children[$child_key] = bpml_activities_translate_activity($child, $default_language, $current_language, $options); - } - } - - // Filter links - if (0 !== intval($type_options['translate_links'])) { - $result->action = bpml_filter_hrefs($result->action, $result->lang, intval($type_options['translate_links'])); - } - - // Apply filters to activity - $result = apply_filters('bpml_activity_filter', $result, $default_language, $current_language, $type_options); - - return $result; - } else { - return FALSE; - } -} - -function bpml_activities_fix_orphan_activity($item, $default_language) { - switch ($item->type) { - case 'new_blog_post': - $lang = bpml_get_item_language($item, 'post_post', TRUE); - if (empty($lang)) { - bp_activity_update_meta($item->id, 'bpml_lang', $default_language); - } else if (!empty($lang['language'])) { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['language']); - } else { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['default_language']); - } - break; - - case 'new_blog_comment': - $lang = bpml_get_item_language($item, 'comment', TRUE); - if (empty($lang)) { - bp_activity_update_meta($item->id, 'bpml_lang', $default_language); - } else if (!empty($lang['language'])) { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['language']); - } else { - bp_activity_update_meta($item->id, 'bpml_lang', $lang['default_language']); - } - break; - - default: - bp_activity_update_meta($item->id, 'bpml_lang', $default_language); - break; - } - bp_activity_update_meta($result->id, 'bpml_lang_orphan', $default_language); - bpml_activities_clear_cache($item->item_id, 'bpml_google_translation', 'main'); - return bp_activity_get_meta($item->id, 'bpml_lang'); -} - -/** - * Returns default collected activity settings. - * - * @return - */ -function bpml_collected_activities_defaults() { - return array( - 'translate_title' => 0, - 'translate_title_cache' => 0, - 'translate_content' => 0, - 'translate_content_cache' => 0, - 'translate_links' => 0 - ); -} - -/** - * Clears activity cache - * - * @global $wpdb - * @param $ID - * @param $type - */ -function bpml_activities_clear_cache($ID, $type = 'bpml_google_translation', - $blog_id = NULL) { - if ($blog_id == 'main' && !is_main_site()) { - global $current_site; - $blog_id = $current_site->blog_id; - } else if ($blog_id == 'main') { - $blog_id = NULL; - } - if (!is_null($blog_id)) { - switch_to_blog($blog_id); - } - global $wpdb; - if ($ID == 'all') { - $wpdb->query("DELETE FROM {$wpdb->prefix}bp_activity_meta WHERE meta_key='" . $type . "'"); - } else { - $wpdb->query("DELETE FROM {$wpdb->prefix}bp_activity_meta WHERE meta_key='" . $type . "' AND activity_id=" . $ID); - } - if (!is_null($blog_id)) { - restore_current_blog(); - } -} - -/** - * Clears all BPML activity data. - */ -function bpml_activities_clear_all_data($ID = 'all') { - bpml_activities_clear_cache($ID, 'bpml_google_translation'); - bpml_activities_clear_cache($ID, 'bpml_lang'); - bpml_activities_clear_cache($ID, 'bpml_lang_recorded'); - bpml_activities_clear_cache($ID, 'bpml_lang_orphan'); -} - -/** - * Admin language assign dropdown for single activity. - * - * @global $activities_template - * @global $sitepress - * @return - */ -function bpml_activities_assign_language_dropdown() { - if (!current_user_can('administrator')) { - return ''; - } - global $activities_template, $sitepress; - $langs = $sitepress->get_active_languages(); - $data = ''; - foreach ($langs as $lang) { - $selected = $activities_template->activity->lang == $lang['code'] ? ' selected="selected"' : ''; - $data .= ''; - } - - echo '
  • '; - echo ' 
  • '; -} - -/** - * BPML activities AJAX process. - */ -function bpml_activities_ajax() { - if (current_user_can('administrator') && isset($_POST['bpml-activity-assign-language'])) { - $ID = key($_POST['bpml-activity-assign-language']); - $lang = $_POST['bpml-activity-assign-language'][$ID]; - bp_activity_update_meta($ID, 'bpml_lang', $lang); - bpml_activities_clear_cache($ID, 'bpml_google_translation'); - echo json_encode(array('output' => 'Language assigned')); - } -} - -/** - * Translates latest update on the fly. - * - * @global $bpml - * @param $content - * @return - */ -function bpml_bp_get_activity_latest_update_filter($content) { - global $bpml; - if ($bpml['activities']['enable_google_translation'] === 0) { - return $content; - } - require_once dirname(__FILE__) . '/google-translate.php'; - return bpml_google_translate($content, '', ICL_LANGUAGE_CODE); -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/admin-form.php b/wp-content/plugins/buddypress-multilingual/admin-form.php deleted file mode 100644 index 5c53362..0000000 --- a/wp-content/plugins/buddypress-multilingual/admin-form.php +++ /dev/null @@ -1,306 +0,0 @@ - $wpdb - */ -function bpml_admin_save_settings_submit() { - if (current_user_can('manage_options') && wp_verify_nonce(isset($_POST['_wpnonce']), 'bpml_save_options') && isset($_POST['bpml'])) { - if (isset($_POST['bpml_clear_google_cache'])) { - bpml_activities_clear_cache('all', 'bpml_google_translation'); - bpml_store_admin_notice('settings_saved', '

    Cache cleared

    '); - } else if (isset($_POST['bpml_clear_all_activity_data'])) { - bpml_activities_clear_all_data(); - bpml_store_admin_notice('settings_saved', '

    Activities data cleared

    '); - } else if (isset($_POST['bpml_admin_clear_activity_translations_single'])) { - bpml_admin_clear_activity_translations_single(key($_POST['bpml_admin_clear_activity_translations_single'])); - bpml_store_admin_notice('settings_saved', '

    Activity data cleared

    '); - } else if (isset($_POST['bpml_admin_clear_activity_data_single'])) { - bpml_admin_clear_activity_data_single(key($_POST['bpml_admin_clear_activity_data_single'])); - bpml_store_admin_notice('settings_saved', '

    Activity data cleared

    '); - } else if (isset($_POST['bpml_reset_options'])) { - bpml_save_settings(bpml_default_settings()); - bpml_store_admin_notice('settings_saved', '

    Settings set to default

    '); - } else { - bpml_admin_save_settings_submit_recursive(&$_POST['bpml']); - bpml_save_settings($_POST['bpml']); - do_action('bpml_settings_saved', $_POST['bpml']); - bpml_store_admin_notice('settings_saved', '

    Settings saved

    '); - } - wp_redirect(admin_url('options-general.php?page=bpml')); - exit; - } -} - -/** - * Sets POST values. - * - * @param $array - */ -function bpml_admin_save_settings_submit_recursive(&$array) { - foreach ($array as $key => &$value) { - if (is_array($value)) { - bpml_admin_save_settings_submit_recursive(&$value); - } else if ($value == '0' || $value == '1' || $value == '-1') { - $value = intval($value); - } - } -} - -/** - * Renders admin page. - * - * @global $bpml - */ -function bpml_admin_page() { - bpml_delete_setting('admin_notices'); - global $bpml; - echo '
    -

    -

    BuddyPress Multilingual

    '; - echo '
    '; - wp_nonce_field('bpml_save_options'); - - echo '

    General

    '; - - echo 'Enable debugging (visible on frontend for admin only)
    '; - echo '  '; - echo ''; - - echo '

    '; - - do_action('bpml_settings_form_before'); - - echo '

    Activities

    '; - - echo 'Filter activity entries per language
    Default: No (activities are all displayed and optionally translated)
    '; - echo '  '; - echo ''; - - echo '

    '; - - echo ''; - - echo '

    '; - - echo 'Show activity language assign dropdown for admin
    '; - echo '  '; - echo ''; - - echo '

    '; - - echo 'Display activity updates without language in:
    '; - echo '  '; - echo '  '; - echo ''; - - echo '

    '; - - echo 'Auto-assing default language to activities without language data
    '; - echo '  '; - echo ''; - - echo '

    '; - - echo 'Enable Google Translation for titles and content
    will not be used if filtering is enabled
    '; - echo '  '; - echo '  '; - echo ''; - echo '  '; - - echo '

    '; - - echo '
    '; - echo 'Collected activities:
    '; - echo 'Soon as some activity is registered on site it will be displayed here.

    '; - echo 'Set all for translation | '; - echo 'Clear all

    '; - ksort($bpml['collected_activities']); - foreach ($bpml['collected_activities'] as $type => $activity) { - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - - echo ''; - echo ''; - - do_action('bpml_settings_form_collected_activities', $type, $activity); - - echo '
    ' . $type . '
    '; - - echo '
    '; - - echo '
    - - -
    '; - } - echo '
    '; - - do_action('bpml_settings_form_after'); - - echo '

    '; - echo ' '; - echo '
    '; - echo '
    '; -} - -/** - * Clears cached translation by activity type. - * - * @global $wpdb - * @param $type - */ -function bpml_admin_clear_activity_translations_single($type) { - global $wpdb; - $results = $wpdb->get_results("SELECT id from {$wpdb->prefix}bp_activity WHERE type='" . $type . "'"); - foreach ($results as $key => $result) { - bpml_activities_clear_cache($result->id, 'bpml_google_translation'); - } -} - -/** - * Clears cached data by activity type. - * - * @global $wpdb - * @param $type - */ -function bpml_admin_clear_activity_data_single($type) { - global $wpdb; - $results = $wpdb->get_results("SELECT id FROM {$wpdb->prefix}bp_activity WHERE type='" . $type . "'"); - foreach ($results as $key => $result) { - bpml_activities_clear_cache($result->id, 'bpml_google_translation'); - bpml_activities_clear_cache($result->id, 'bpml_lang'); - bpml_activities_clear_cache($result->id, 'bpml_lang_recorded'); - bpml_activities_clear_cache($result->id, 'bpml_lang_orphan'); - } -} - -/** - * Admin form hook. - * - * @global $bpml - * @return - */ -function bpml_profiles_admin_form() { - global $bpml; - echo '

    Profile fields

    '; - echo '  
    '; - echo '  
    '; - - echo '

    '; - - echo 'Select fields that can be translated:'; - // get fields - $groups = BP_XProfile_Group::get(array( - 'fetch_fields' => true - )); - if (empty($groups)) { - echo 'No profile fields.'; - return FALSE; - } - - foreach ($groups as $group) { - if (empty($group->fields)) { - echo 'No fields in this group'; - continue; - } - echo '

    ' . $group->name . '

    '; - foreach ($group->fields as $field) { - $checked = isset($bpml['profiles']['fields'][$field->id]) ? ' checked="checked"' : ''; - echo '  '; - } - } - - echo '


    Translate field titles
    '; - $checked = isset($bpml['profiles']['translate_fields_title']) ? ' checked="checked"' : ''; - echo '  '; - - echo '

    '; - echo '

    '; -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/admin.php b/wp-content/plugins/buddypress-multilingual/admin.php deleted file mode 100644 index cab2b8b..0000000 --- a/wp-content/plugins/buddypress-multilingual/admin.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -function bpml_admin_show_stored_admin_notices() { - $messages = bpml_get_setting('admin_notices'); - if (empty($messages)) { - return ''; - } - foreach ($messages as $message) { - bpml_admin_message($message, 'updated', 'all_admin_notices'); - } -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/frontend.php b/wp-content/plugins/buddypress-multilingual/frontend.php deleted file mode 100644 index aac3b99..0000000 --- a/wp-content/plugins/buddypress-multilingual/frontend.php +++ /dev/null @@ -1,315 +0,0 @@ - $a - */ -function bpml_test($a = '') { - echo '
    '; print_r($a); echo '
    '; -} - -/** - * Before BP header hook. - * - * Activate site_url() filter. - */ -function bpml_bp_before_header_hook() { - add_filter('site_url', 'bpml_site_url_filter', 0); -} - -/** - * After BP footer hook. - * - * Remove site_url() filter. - */ -function bpml_bp_after_footer_hook() { - remove_filter('site_url', 'bpml_site_url_filter', 0); -} - -/** - * Filters site_url() calls. - * - * @global $sitepress - * @param $url - * @return - */ -function bpml_site_url_filter($url, $path = '') { - global $sitepress; - return rtrim($sitepress->convert_url($url), '/'); -} - -/** - * Removes site_url() filter when redirecting to random blog. - */ -function bpml_blogs_redirect_to_random_blog() { - global $bp; - if ($bp->current_component == $bp->blogs->slug && isset($_GET['random-blog'])) { - remove_filter('site_url', 'bpml_site_url_filter', 0); - } -} - -/** - * Filters BuddyPress root domain. - * - * @global $sitepress $sitepress - * @param $url - * @return - */ -function bpml_bp_core_get_root_domain_filter($url) { - global $sitepress; - return rtrim($sitepress->convert_url($url), '/'); -} - -/** - * Filters admin URL (removes language). - * - * @global $sitepress $sitepress - * @param $url - * @param $path - * @param $blog_id - * @return - */ -function bpml_admin_url_filter($url, $path, $blog_id) { - $url = str_replace('/' . ICL_LANGUAGE_CODE . '/wp-admin', '/wp-admin/', $url); - return $url; -} - -/** - * Translates all links in given string. - * - * @global $bpml_filter_hrefs_lang - * @param $string - * @param $lang - * @param $limit - * @return - */ -function bpml_filter_hrefs($string = '', $lang = '', $limit = -1, - $position = NULL) { - global $bpml_filter_hrefs_lang, $bpml_filter_hrefs_count; - $bpml_filter_hrefs_count = 0; - $bpml_filter_hrefs_lang = $lang; - if (!is_null($position)) { - global $bpml_filter_hrefs_position; - $bpml_filter_hrefs_position = $position; - } - $return = preg_replace_callback('/href=["\'](.+?)["\']/', 'bpml_filter_href_matches', $string, $limit); - $bpml_filter_hrefs_count = 0; - return $return; -} - -/** - * Translates all links in given string from to. - * - * @global $bpml_filter_hrefs_lang - * @param $string - * @param $lang - * @param $limit - * @return - */ -function bpml_filter_hrefs_from_to($string = '', $lang_from = '', $lang_to = '', - $limit = -1, $position = NULL) { - global $bpml_filter_hrefs_lang, $bpml_filter_hrefs_lang_to, $bpml_filter_hrefs_count; - $bpml_filter_hrefs_count = 0; - $bpml_filter_hrefs_lang = $lang_from; - $bpml_filter_hrefs_lang_to = $lang_to; - if (!is_null($position)) { - global $bpml_filter_hrefs_position; - $bpml_filter_hrefs_position = $position; - } - $return = preg_replace_callback('/href=["\'](.+?)["\']/', 'bpml_filter_href_matches', $string, $limit); - $bpml_filter_hrefs_count = 0; - return $return; -} - -/** - * Translates links in matches provided from bpml_filter_hrefs(). - * - * @global $sitepress $sitepress - * @global $bpml_filter_hrefs_lang - * @param $match - * @return - */ -function bpml_filter_href_matches($match = array()) { - global $sitepress, $bpml_filter_hrefs_lang, $bpml_filter_hrefs_lang_to, $bpml_filter_hrefs_position, $bpml_filter_hrefs_count; - - if (!empty($bpml_filter_hrefs_position)) { - if ($bpml_filter_hrefs_count != $bpml_filter_hrefs_position) { - $bpml_filter_hrefs_count += 1; - return $match[0]; - } - } - - if (!empty($bpml_filter_hrefs_lang_to)) { - $lang_to = ($bpml_filter_hrefs_lang_to == $sitepress->get_default_language()) ? '' : $bpml_filter_hrefs_lang_to . '/'; - $converted = preg_replace('/\/' . $bpml_filter_hrefs_lang . '\//', '/' . $lang_to, $match[1], 1); - } else if ($sitepress->get_current_language() != $sitepress->get_default_language()) { - if ($bpml_filter_hrefs_lang !== $sitepress->get_default_language()) { - $converted = preg_replace('/\/' . $bpml_filter_hrefs_lang . '\//', '/' . $sitepress->get_current_language() . '/', $match[1], 1); - } else { - $converted = $sitepress->convert_url($match[1]); - } - // Check doubled - $converted = preg_replace('/\/' . $sitepress->get_current_language() . '\/' . $sitepress->get_current_language() . '\//', '/' . $sitepress->get_current_language() . '/', $converted, 1); - } else { - $replace = !empty($bpml_filter_hrefs_lang) ? '/\/' . $bpml_filter_hrefs_lang . '\//' : '/\//'; - $converted = preg_replace($replace, '/', $match[1], 1); - } - return str_replace($match[1], $converted, $match[0]); -} - -/** - * Filters bp_uri. - * - * This URI is important for BuddyPress. - * By that it determines some components and actions. - * We remove language component so BP can determine things right. - * - * @param $url - * @return - */ -function bpml_bp_uri_filter($url) { - global $sitepress; - $default_language = $sitepress->get_default_language(); - if ($default_language == ICL_LANGUAGE_CODE) { - return $url; - } - return preg_replace('/\/' . ICL_LANGUAGE_CODE . '\//', '/', $url, 1); - - echo $default_language; - -} - -/** - * Filters WPML languages switcher. - * - * This filtering is performed on BP pages - * where WPML actually don't detect any post/page. - * - * @global $sitepress - * @global $bp - * @global $bp_unfiltered_uri - * @global $post - * @return - */ -function bpml_icl_ls_languages_filter($langs) { - global $sitepress, $bp, $bp_unfiltered_uri, $post; - $default_language = $sitepress->get_default_language(); - - foreach($bp->active_components as $key => $value){ - $components[] = $key; - } - - if(!isset($bp_unfiltered_uri[0])){ - $bp_unfiltered_uri[0] = ''; - } - - // Unset the languages for missing translations - if(!in_array($bp_unfiltered_uri[0], $components)) { - foreach ($langs as $key => $lang) { - $url = ($default_language !== $key) ? $url = get_option('home') . "/$key/" : $url = get_option('home') . "/"; - if($url == $langs[$key]['url']){ - if(!is_home() && !is_front_page($post->ID)){ - unset($langs[$key]); - } - } - } - - return $langs; - } - - // Recreates language selector - the all components should have all languages - if(version_compare(BP_VERSION, '1.2.9') >= 0){ - $langs = $sitepress->get_active_languages(); - $url = ''; - foreach($bp_unfiltered_uri as $key => $path){ - $url .= '/' . $path; - } - - $homepage = get_option('home'); - $urlToFlags = ICL_PLUGIN_URL . '/res/flags/'; - foreach ($langs as $key => $lang) { - $langs[$key]['country_flag_url'] = $urlToFlags . "$key.png"; - $langs[$key]['language_code'] = $key; - $langs[$key]['translated_name'] = $lang['english_name']; - - if($default_language == $key){ - $langs[$key]['url'] = $homepage . $url; - } else { - $langs[$key]['url'] = $homepage . '/' . $lang['code'] . $url; - } - } - } else { - if (!in_array($bp_unfiltered_uri[0], $bp->root_components)) { - return $langs; - } - - foreach ($langs as $key => $lang) { - $langs[$key]['url'] = $sitepress->convert_url(get_option('home') - . '/' . implode('/', $bp_unfiltered_uri), $lang['language_code']); - } - } - return $langs; -} - -/** - * Stores/returns debug messages. - * - * @staticvar array $messages - * @param $message - * @param $class - * @return array - */ -function bpml_debug($message, $class = 'bpml-debug-updated') { - if (!current_user_can('administrator') || !defined('BPML_DEBUG') || !BPML_DEBUG) { - return ''; - } - static $messages = array(); - if ($message == 'get') { - return $messages; - } - $messages[] = array('message' => $message, 'class' => 'updated bpml-debug ' . $class); -} - -/** - * Header hook. - */ -function bpml_wp_head_hook() { -} - -/** - * Renders debug info. - * - * @global $bp - * @return - */ -function bpml_wp_footer() { - - if (!current_user_can('administrator') || !defined('BPML_DEBUG') || !BPML_DEBUG) { - return ''; - } - - echo '

    BPML Debug

    '; - $messages = bpml_debug('get'); - foreach ($messages as $message) { - echo bpml_message($message['message'], $message['class']); - } - global $bp, $bpml; - - var_dump($bpml); - - echo '
    ';
    -    echo '
    -		BPML Settings
    -		';
    -    var_dump($bpml);
    -    echo '
    -
    -		BuddyPress ';
    -    print_r($bp);
    -    echo '
    '; - -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/google-translate.php b/wp-content/plugins/buddypress-multilingual/google-translate.php deleted file mode 100644 index 9181dc7..0000000 --- a/wp-content/plugins/buddypress-multilingual/google-translate.php +++ /dev/null @@ -1,220 +0,0 @@ - $result - * @param $default_language - * @param $current_language - * @param $options - * @return - */ -function bpml_google_translate_activity_filter($result, $default_language, - $current_language, $type_options) { - - $to_translate_title = FALSE; - $to_translate_content = FALSE; - - if ((!empty($result->lang_recorded))) { - if ($result->lang_recorded != $current_language && $type_options['translate_title']) { - $to_translate_title = TRUE; - } - } else if ($result->lang != $current_language && $type_options['translate_title']) { - $to_translate_title = TRUE; - } - - if ($result->lang != $current_language && !empty($result->content) && $type_options['translate_content']) { - $to_translate_content = TRUE; - } - - // Apply display filters - $result->action = apply_filters('bp_get_activity_action', $result->action); - if (!empty($result->content)) { - $result->content = apply_filters('bp_get_activity_content_body', $result->content); - } - - global $bpml; - // Stored in DB - if ($bpml['activities']['enable_google_translation'] === 'store') { - // Store original values - $original_translation_title = $result->action; - $original_translation_content = $result->content; - // Check if cached - $translation = bp_activity_get_meta($result->id, 'bpml_google_translation'); - - // Translate title - if ($to_translate_title && $type_options['translate_title_cache']) { - if (empty($translation) || !isset($translation[$current_language]) || !isset($translation[$current_language]['title'])) { - bpml_debug('

    Fetched Google translation for activity title ID:' . $result->id . ' (original lang \'' . $result->lang . '\', current lang \'' . $current_language . '\')

    '); - // Translate with Google - if (!empty($result->lang_recorded)) { - $translation_title = bpml_google_translate($result->action, $result->lang_recorded, $current_language); - } else { - $translation_title = bpml_google_translate($result->action, $result->lang, $current_language); - } - $translation[$current_language]['title'] = $translation_title; - // Set cache - bp_activity_update_meta($result->id, 'bpml_google_translation', $translation); - } else { - bpml_debug('

    Cached Google translation for activity title ID:' . $result->id . ' (original lang \'' . $result->lang . '\', current lang \'' . $current_language . '\')

    '); - $translation_title = $translation[$current_language]['title']; - } - } else if ($to_translate_title) { - if (!empty($result->lang_recorded)) { - $translation_title = bpml_google_translate($result->action, $result->lang_recorded, $current_language); - } else { - $translation_title = bpml_google_translate($result->action, $result->lang, $current_language); - } - } - - // Translate content - if ($to_translate_content && $type_options['translate_content_cache']) { - if (empty($translation) || !isset($translation[$current_language]) || !isset($translation[$current_language]['content'])) { - bpml_debug('

    Fetched Google translation for activity content ID:' . $result->id . ' (original lang \'' . $result->lang . '\', current lang \'' . $current_language . '\')

    '); - // Translate with Google - $translation_content = bpml_google_translate($result->content, $result->lang, $current_language); - $translation[$current_language]['content'] = $translation_content; - // Set cache - bp_activity_update_meta($result->id, 'bpml_google_translation', $translation); - } else { - bpml_debug('

    Cached Google translation for activity content ID:' . $result->id . ' (original lang \'' . $result->lang . '\', current lang \'' . $current_language . '\')

    '); - $translation_content = $translation[$current_language]['content']; - } - } else if ($to_translate_content) { - $translation_content = bpml_google_translate($result->content, $result->lang, $current_language); - } - - // Wrap contents - if ($to_translate_title) { - $result->action = '
    ' . $original_translation_title . '
    ' . $translation_title; - } - if ($to_translate_content) { - $result->content = '
    ' . $original_translation_content . '
    ' . $translation_content; - } - } else if ($bpml['activities']['enable_google_translation'] === 'js') { - - // Translate with JS (wrap contents) - - if ($to_translate_title) { - if (!empty($result->lang_recorded)) { - $result->action = bpml_google_translate_wrap($result->action, $result->lang_recorded); - } else { - $result->action = bpml_google_translate_wrap($result->action, $result->lang); - } - } - if ($to_translate_content) { - $result->content = bpml_google_translate_wrap($result->content, $result->lang); - } - } - return $result; -} - -/** - * Translates strings using Google Translate. - * - * @staticvar string $client - * @param $item - * @param $current_language - * @return - */ -function bpml_google_translate($content, $from_language, $to_language) { - static $client = NULL; - if (is_null($client)) { - $client = new WP_Http(); - } - $gtranslateurl = 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s|%s'; - $url = sprintf($gtranslateurl, urlencode($content), $from_language, $to_language); - $url = str_replace('|', '%7C', $url); - $response = $client->request($url); - if (!is_wp_error($response) && $response['response']['code'] == '200' && $response['response']['code'] == '403') { - $translation = json_decode($response['body']); - - $content = $translation->responseData->translatedText; - } else { - $content = null; - } - - return $content; -} - -/** - * Renders Google translate control button. - * - * Only rendered once per page. - * - * @global $bpml_google_translate_js - * @staticvar boolean $called - * @param string $output - * @return string - */ -function bpml_google_translate_button($output = '') { - global $bpml_google_translate_js, $bpml_in_activity_loop; -// if (empty($bpml_in_activity_loop)) { -// return ''; -// } - static $called = FALSE; - if ($called) { - return ''; - } - $called = TRUE; - if (!empty($bpml_google_translate_js)) { - $output .= '
    ' . bpml_google_translate_js(); - } - return $output; -} - -/** - * Wraps content in divs found by Google translate. - * - * @global boolean $bpml_google_translate_js - * Sets flag that translate button is needed - * @param $content - * @param $lang - * @param $element - * @return - */ -function bpml_google_translate_wrap($content, $lang, $element = 'div') { - global $bpml_google_translate_js, $bpml_google_translate_ajax; - $suffix = !empty($bpml_google_translate_ajax) ? '-ajax' : ''; - $bpml_google_translate_js = TRUE; - return '
    ' . $content . '
    '; -} - -/** - * Returns JS needed for Google translate. - * - * @param string $lang - * @return - */ -function bpml_google_translate_js($lang = NULL) { - if (is_null($lang)) { - $lang = ICL_LANGUAGE_CODE; - } - global $bpml_google_translate_ajax; - $suffix = !empty($bpml_google_translate_ajax) ? '-ajax' : ''; - return ' -'; -} diff --git a/wp-content/plugins/buddypress-multilingual/incubator.php b/wp-content/plugins/buddypress-multilingual/incubator.php deleted file mode 100644 index 4693d01..0000000 --- a/wp-content/plugins/buddypress-multilingual/incubator.php +++ /dev/null @@ -1,53 +0,0 @@ - array( - 'filter' => 0, - 'display_orphans' => 'all', - 'orphans_fix' => 0, - 'translate_name' => 0, - 'translate_description' => 0, - )); -} - - - -function bpml_bp_get_group_name_filter($name) { - global $bp, $sitepress; - $default_language = $sitepress->get_default_language(); - $original_language = groups_get_groupmeta($bp->groups->current_group->id, 'bpml_lang'); - if ($original_language == ICL_LANGUAGE_CODE) { - return $name; - } - $options = bpml_settings(); - if ($options['groups']['translate_name'] === 'google_translate_store') { - $translations = groups_get_groupmeta($bp->groups->current_group->id, 'bpml_google_translation'); - if (!isset($translations[ICL_LANGUAGE_CODE])) { - bpml_google_translate_wrap($name); - } - } else if ($options['groups']['translate_name'] === 'google_translate_js') { - - } - return $name; -} diff --git a/wp-content/plugins/buddypress-multilingual/profiles.php b/wp-content/plugins/buddypress-multilingual/profiles.php deleted file mode 100644 index 7701e50..0000000 --- a/wp-content/plugins/buddypress-multilingual/profiles.php +++ /dev/null @@ -1,197 +0,0 @@ - $bp - * @global $bpml - * @global $sitepress - * @global boolean $bpml_profiles_field_value_suppress_filter - * @return - */ -function bpml_profiles_bp_after_profile_edit_content_hook() { - global $bp, $bpml, $sitepress, $bpml_profiles_field_value_suppress_filter; - $bpml_profiles_field_value_suppress_filter = TRUE; - require_once dirname(__FILE__) . '/google-translate.php'; - $default_language = $sitepress->get_default_language(); - $langs = $sitepress->get_active_languages(); - $group = BP_XProfile_Group::get(array( - 'fetch_fields' => true, - 'profile_group_id' => $bp->action_variables[1], - 'fetch_field_data' => true - )); - echo ' 

    Translate fields

    '; - foreach ($group[0]->fields as $field) { - if (!isset($bpml['profiles']['fields'][$field->id]) || empty($field->data->value)) { - continue; - } - echo '
    ' . $field->name . '
    '; - foreach ($langs as $lang) { - if ($lang['code'] == $default_language) { - continue; - } - echo ''; - echo '
    '; - } - echo '
    '; - } -} - -/** - * Processes AJAX call for updating field translation. - * - * @global $current_user - */ -function bpml_profiles_ajax() { - if (isset($_POST['bpml_profiles_translate_field']) && is_user_logged_in()) { - global $current_user; - $field_id = $_POST['bpml_profiles_translate_field']; - $lang = $_POST['bpml_profiles_translate_field_lang']; - bpml_profile_update_translation($current_user->ID, $field_id, $lang, $_POST['content']); - echo json_encode(array('output' => 'Done')); - } -} - -/** - * Updates field translation. - * - * @global $wpdb $wpdb - * @param $user_id - * @param $field_id - * @param $lang - * @param $content - */ -function bpml_profile_update_translation($user_id, $field_id, $lang, $content) { - global $wpdb; - $exists = $wpdb->get_var($wpdb->prepare("SELECT id FROM {$wpdb->prefix}bp_xprofile_data_bpml WHERE field_id=%d AND user_id=%d AND lang=%s", $field_id, $user_id, $lang)); - - if (empty($exists)) { - $wpdb->insert($wpdb->prefix . 'bp_xprofile_data_bpml', array( - 'field_id' => $field_id, - 'user_id' => $user_id, - 'lang' => $lang, - 'value' => $content, - ), array('%d', '%d', '%s', '%s')); - } else { - $wpdb->update($wpdb->prefix . 'bp_xprofile_data_bpml', array( - 'value' => $_POST['content'] - ), array( - 'user_id' => $user_id, - 'field_id' => $field_id, - 'lang' => $lang), - array('%s'), - array('%d', '%d', '%s')); - } -} - -/** - * Fetches field translation. - * - * @global $wpdb $wpdb - * @global $bpml - * @global $sitepress - * @global boolean $bpml_profiles_field_value_suppress_filter - * @param $field_id - * @param $lang - * @param $value - * @return - */ -function bpml_profiles_get_field_translation($field_id, $lang, $value = '') { - global $wpdb, $bpml, $sitepress, $bpml_profiles_field_value_suppress_filter; - if ($sitepress->get_default_language() == $lang) { - return $value; - } - $translation = apply_filters('bp_get_the_profile_field_edit_value', $wpdb->get_var($wpdb->prepare("SELECT value FROM {$wpdb->prefix}bp_xprofile_data_bpml WHERE field_id=%d and lang=%s", $field_id, $lang))); - if (empty($translation)) { - bpml_debug('Missing tranlsation for field: ' . $field_id); - if ($bpml['profiles']['translation']['user-missing'] && empty($bpml_profiles_field_value_suppress_filter)) { - require_once dirname(__FILE__) . '/google-translate.php'; - $value = bpml_google_translate(apply_filters('bp_get_the_profile_field_edit_value', $value), $sitepress->get_default_language(), $lang); - bpml_debug('Fetching Google translation for field: ' . $field_id); - } - return $value; - } else { - return $translation; - } -} - -/** - * Profilae field value filter. - * - * @global $sitepress - * @global $bpml - * @global boolean $bpml_profiles_field_value_suppress_filter - * @param $value - * @param $type - * @param $field_id - * @return - */ -function bpml_profiles_bp_get_the_profile_field_value_filter($value, $type, - $field_id) { - global $sitepress, $bpml, $bpml_profiles_field_value_suppress_filter; - if (!empty($bpml_profiles_field_value_suppress_filter)) { - return $value; - } - if (!isset($bpml['profiles']['fields'][$field_id])) { - return $value; - } - $lang = $sitepress->get_current_language(); - $value = bpml_profiles_get_field_translation($field_id, $lang, $value); - return $value; -} - -/** - * Notices user about changed fields. - * - * @param $field - */ -function bpml_xprofile_data_before_save_hook($field) { - bpml_store_frontend_notice('profile-field-updated', 'Check if fields need translation updated.'); -} - -/** - * Translates field names. - * - * @global $sitepress - * @global $field - * @staticvar array $cache - * @param $name - * @return array - */ -function bpml_bp_get_the_profile_field_name_filter($name) { - global $sitepress, $field; - if ($sitepress->get_default_language() == ICL_LANGUAGE_CODE) { - return $name; - } - static $cache = NULL; - if (is_null($cache)) { - $cache = get_option('bpml_profile_fileds_names', array()); - } - if (isset($cache[$field->id][ICL_LANGUAGE_CODE])) { - return $cache[$field->id][ICL_LANGUAGE_CODE]; - } - require_once dirname(__FILE__) . '/google-translate.php'; - $name = bpml_google_translate($name, $sitepress->get_default_language(), ICL_LANGUAGE_CODE); - $cache[$field->id][ICL_LANGUAGE_CODE] = $name; - update_option('bpml_profile_fileds_names', $cache); - return $name; -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/readme.txt b/wp-content/plugins/buddypress-multilingual/readme.txt deleted file mode 100644 index c82d66d..0000000 --- a/wp-content/plugins/buddypress-multilingual/readme.txt +++ /dev/null @@ -1,101 +0,0 @@ -=== Plugin Name === -Contributors: icanlocalize, jozik -Donate link: http://wpml.org/documentation/related-projects/buddypress-multilingual/ -Tags: i18n, translation, localization, language, multilingual, WPML, BuddyPress -Requires at least: 3.0 -Tested up to: 3.3.1 -Stable tag: 1.3.0 - -BuddyPress Multilingual allows BuddyPress sites to run fully multilingual using the WPML plugin. - -== Description == - -The plugin allows building multilingual BuddyPress sites. It works with single-site or multi-site BuddyPress installs. Both the main site and child blogs can run multilingual. - -Guest blogs can choose their language and create multilingual contents. Additionally, each guest can choose the admin language individually. - -This plugin requires [WPML](http://wpml.org/). It uses WPML's language API and hooks to BuddyPress to make it multilingual. - -Requirements: - -* WPML 2.4.2 or higher. You must enable 'languages per directories'. -* Supports BuddyPress versions up to 1.5.x - -= Features = - - * Enables multilingual BuddyPress components - * Filters all links to maintain right language selection - * Records language and allows Google translation for BuddyPress activity component - * Allows translation control for each type of activity - -= New! Customize BuddyPress further using Types and Views = - -BPML is now compatible with [Types - The Custom Types and Custom Fields Plugin](http://wp-types.com/home/types-manage-post-types-taxonomy-and-custom-fields/) and [Views - The Custom Content Display Plugin](http://wp-types.com/). Types and Views allow you to customize BuddyPress futher by controlling custom content and displaying it any way you choose. - -= Need Support? = - -Please submit support requests to **[WPML forum](http://forum.wpml.org)**. Remember to report: - -* The versions of BuddyPress, WPML and WordPress that you're using. -* A URL to your site, where we can see the problem happening. -* A description of what you expect to see and what you're seeing in practice. - -== Installation == - -1. Unzip and upload contents of sitepress-bp.zip file to the `/wp-content/plugins/` directory. -2. Activate the plugin through the Network 'Plugins' menu in WordPress (only available as 'Network' plugin). -3. Enable WPML (can be enabled before this BuddyPress Multilingual). -4. To set preferences go to Settings/BuddyPress Multilingual on main blog. - -== Frequently Asked Questions == - -= Why do I need to enable languages per directories? = - -BuddyPress itself uses virtual directories for its elements. The only way we managed to add language information is by adding a language prefix to paths. - -For example, /fr/members/ to the French members list. - -== Screenshots == - -1. Multilingual main BuddyPress page. - -== Changelog == - -= 1.3.0 = -* Support BP 1.5.x -* Language selector doesn't appear on the home page when a page is selected as the front page -* Pages widget exclude function doesn't work in the right way -* Small fix on main navigation menu - -= 1.2.1 = -* Supports BP 1.2 - -= 1.1.0 = -* Added translation support for XProfile fields - -= 1.0.1 = -* Supports BuddyPress 1.2.8 and WP Network mode -* Added Google translation and translation control for BuddyPress activities - -= 1.0.0 = -* Supports BuddyPress 1.2 - -= 0.9.2 = -* Bugfixes - -= 0.9.1 = -* Bugfixes - -= 0.9 = -* First public release. Supports BuddyPress 1.0 - -= 0.1.0 = -* Developers version, not recommended for production sites - feedback welcome! - -== Upgrade Notice == - -= 1.1.0 = -* Runs on BuddyPress 1.2.8 - -= 1.3.0 = -* Runs with BuddyPress 1.5.x diff --git a/wp-content/plugins/buddypress-multilingual/screenshot-1.jpg b/wp-content/plugins/buddypress-multilingual/screenshot-1.jpg deleted file mode 100644 index 7477b48..0000000 Binary files a/wp-content/plugins/buddypress-multilingual/screenshot-1.jpg and /dev/null differ diff --git a/wp-content/plugins/buddypress-multilingual/scripts.js b/wp-content/plugins/buddypress-multilingual/scripts.js deleted file mode 100644 index 4a8ce92..0000000 --- a/wp-content/plugins/buddypress-multilingual/scripts.js +++ /dev/null @@ -1,92 +0,0 @@ - -jQuery(document).ready(function() { - jQuery('.bpml-translation-original-toggle a').click(function(){ - jQuery(this).parent().next().toggle(); - return false; - }); - bpmlAdminToggleCollectedActivities(); - jQuery('.bpml-show-collected-activities').click(function(){ - if (jQuery(this).val() == 'store') { - jQuery('.bpml-activities-hide-cache-option, .bpml-activities-hide-titlecontent-option').fadeIn(); - } else { - jQuery('.bpml-activities-hide-cache-option').fadeOut(); - jQuery('.bpml-activities-hide-titlecontent-option').fadeIn(); - } - }); - jQuery('.bpml-hide-collected-activities').click(function(){ - jQuery('.bpml-activities-hide-cache-option, .bpml-activities-hide-titlecontent-option').fadeOut(); - }); - jQuery('#bpml-activities-select-all').click(function(){ - jQuery('#bpml-collected-activities input').attr('checked', 1); - jQuery('#bpml-collected-activities select').val(-1); - }); - jQuery('#bpml-activities-clear-all').click(function(){ - jQuery('#bpml-collected-activities input').attr('checked', 0); - jQuery('#bpml-collected-activities select').val(0); - }); - jQuery('.bpml-activity-assign-language').live('submit', function(){ - var form = jQuery(this); - jQuery.ajax({ - url: jQuery(this).attr('action'), - type: 'post', - data: jQuery(this).serialize(jQuery(this))+'&action=bpml_ajax', - dataType: 'json', - cache: false, - beforeSend: function(){ - form.children('.bmp-ajax-update').html('Processing...').show(); - }, - success: function(data){ - if (data.output != 'undefined') { - form.children('.bmp-ajax-update').html(data.output).delay(2000).fadeOut(); - } else if (data.error != 'undefined') { - form.children('.bmp-ajax-update').html(data.error).delay(2000).fadeOut(); - } - }, - error: function() { - } - }); - return false; - }); - jQuery('.bpml-form-ajax').live('submit', function(){ - var form = jQuery(this); - jQuery.ajax({ - url: jQuery(this).attr('action'), - type: 'post', - data: jQuery(this).serialize(jQuery(this))+'&action=bpml_ajax', - dataType: 'json', - cache: false, - beforeSend: function(){ - form.children('.bmp-ajax-update').html('Processing...').show(); - }, - success: function(data){ - if (data.output != 'undefined') { - form.children('.bmp-ajax-update').html(data.output).delay(2000).fadeOut(); - } else if (data.error != 'undefined') { - form.children('.bmp-ajax-update').html(data.error).delay(2000).fadeOut(); - } - }, - error: function() { - } - }); - return false; - }); - jQuery('.bpml_profiles_translate_with_google').click(function() { - jQuery(this).parent().find('textarea').val(jQuery(this).parent().find('.bpml_profiles_translate_field_google_translated').val()); - return false; - }); -}); - -function bpmlAdminToggleCollectedActivities() { - var val = jQuery("input:radio[name='bpml[activities][enable_google_translation]']:checked").val(); - if (val != 0) { - if (val == 'store') { - jQuery('.bpml-activities-hide-cache-option, .bpml-activities-hide-titlecontent-option').show(); - } else { - jQuery('.bpml-activities-hide-cache-option').hide(); - jQuery('.bpml-activities-hide-titlecontent-option').show(); - } - } else { - jQuery('.bpml-activities-hide-cache-option, .bpml-activities-hide-titlecontent-option').hide(); - } - jQuery('#bpml-collected-activities').slideDown(); -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/sitepress-bp.php b/wp-content/plugins/buddypress-multilingual/sitepress-bp.php deleted file mode 100644 index e6c784e..0000000 --- a/wp-content/plugins/buddypress-multilingual/sitepress-bp.php +++ /dev/null @@ -1,567 +0,0 @@ -Documentation. - Author: OnTheGoSystems - Author URI: http://www.onthegosystems.com - Version: 1.3.0 - Network: true - */ - -/* - BuddyPress Multilingual is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - BuddyPress Multilingual is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with BuddyPress Multilingual. If not, see . - */ - -/** - * Define constants - */ -define('BPML_VERSION', '1.3.0'); -define('BPML_PLUGIN_URL', plugins_url(basename(dirname(__FILE__)))); - -add_action('plugins_loaded', 'bpml_plugins_loaded_hook', 0); -add_action('plugins_loaded', 'bpml_init_check', 11); - -/** - * Trigger this before anything. - * - * Force getting cookie language on: - * Search - * AJAX call - */ -function bpml_plugins_loaded_hook() { - if (defined('BP_VERSION') && defined('ICL_SITEPRESS_VERSION')) { - if (!is_admin() && (isset($_POST['search-terms']) || isset($_REQUEST['action']) - || (defined('DOING_AJAX') && DOING_AJAX))) { - add_filter('icl_set_current_language', 'bpml_get_cookie_lang'); - } - } -} - -/** - * Returns WPML cookie. - * - * @global $sitepress - * @param $lang - * @return - */ -function bpml_get_cookie_lang($lang = '') { - global $sitepress; - $lang_cookie = $sitepress->get_language_cookie(); - if (empty($lang_cookie)) { - return empty($lang) ? ICL_LANGUAGE_CODE : $lang; - } - return $lang_cookie; -} - -/** - * Checks if necessary conditions are met. - * - * @global $sitepress_settings - */ -function bpml_init_check() { - global $sitepress_settings; - if (defined('BP_VERSION') && defined('ICL_SITEPRESS_VERSION')) { - if ((!isset($sitepress_settings['language_negotiation_type']) - || $sitepress_settings['language_negotiation_type'] != 1) - && is_main_site()) { - bpml_admin_message('

    ' . __('For BuddyPress Multilingual to work you must set WPML language negotiation to "languages in different directories".') . '

    '); - } else { - - global $bpml; - $bpml = bpml_get_settings(); - define('BPML_DEBUG', bpml_get_setting('debug', 0)); - - // Site wide - include_once dirname(__FILE__) . '/activities.php'; - add_action('bp_activity_after_save', 'bpml_activities_bp_activity_after_save_hook'); - add_action('bp_activity_before_save', 'bpml_activities_bp_activity_before_save_hook'); - - // Main blog - if (is_main_site ()) { - // Profiles - if (isset($bpml['profiles']) && $bpml['profiles']['translation'] != 'no') { - require_once dirname(__FILE__) . '/profiles.php'; - if (!is_admin() && isset($bpml['profiles']['translate_fields_title'])) { - add_filter('bp_get_the_profile_field_name', 'bpml_bp_get_the_profile_field_name_filter'); - } - add_action('xprofile_data_before_save', 'bpml_xprofile_data_before_save_hook'); - add_action('init', 'bpml_profiles_init'); - add_action('bp_after_profile_edit_content', 'bpml_profiles_bp_after_profile_edit_content_hook'); - add_action('bpml_ajax', 'bpml_profiles_ajax'); - add_filter('bp_get_the_profile_field_value', 'bpml_profiles_bp_get_the_profile_field_value_filter', 0, 3); - } - - if (!is_admin()) { - require_once dirname(__FILE__) . '/frontend.php'; - add_action('wp_head', 'bpml_wp_head_hook'); - add_action('wp_footer', 'bpml_wp_footer', 9999); - add_action('wp', 'bpml_blogs_redirect_to_random_blog', 0); - add_action('bp_before_activity_loop', 'bpml_activities_bp_before_activity_loop_hook'); - add_action('bp_core_render_message', 'bpml_show_frontend_notices'); - - // Filter site_url on regular pages - add_action('bp_before_header', 'bpml_bp_before_header_hook'); - add_action('bp_after_footer', 'bpml_bp_after_footer_hook'); - - // Force filtering site_url on: - // Search - // AJAX call - if (isset($_POST['search-terms']) || isset($_REQUEST['action']) || (defined('DOING_AJAX') && DOING_AJAX)) { - add_filter('site_url', 'bpml_site_url_filter', 0); - } - - // Filters main navigation menu - if(version_compare(BP_VERSION, '1.2.9') >= 0){ - add_filter( 'wp_list_pages', 'nav_menu_filter' ); - } - - add_filter('admin_url', 'bpml_admin_url_filter', 0, 3); - add_filter('bp_core_get_root_domain', 'bpml_bp_core_get_root_domain_filter', 0); - add_filter('bp_uri', 'bpml_bp_uri_filter', 0); - add_filter('icl_ls_languages', 'bpml_icl_ls_languages_filter'); - add_filter('bp_activity_get', 'bpml_activities_bp_activity_get_filter', 10, 2); - add_filter('bp_activity_get_specific', 'bpml_activities_bp_activity_get_filter', 10, 2); - add_filter('bp_get_activity_latest_update', 'bpml_bp_get_activity_latest_update_filter'); - - if ($bpml['activities']['show_activity_switcher']) { - add_action('bp_before_activity_entry', 'bpml_activities_assign_language_dropdown'); - } - - if ($bpml['activities']['enable_google_translation']) { - require_once dirname(__FILE__) . '/google-translate.php'; - add_filter('bpml_activity_filter', 'bpml_google_translate_activity_filter', 10, 5); - add_action('wp_ajax_activity_widget_filter', 'bpml_google_translate_indicate_ajax'); - add_action('wp_ajax_activity_get_older_updates', 'bpml_google_translate_indicate_ajax'); - } - - add_action('init', 'additional_css_js'); - } else { - require_once dirname(__FILE__) . '/admin.php'; - $version = get_option('bpml_version', FALSE); - if (empty($version) || version_compare($version, BPML_VERSION, '<')) { - require_once dirname(__FILE__) . '/upgrade.php'; - bpml_upgrade(); - } - add_action('admin_init', 'bpml_admin_show_stored_admin_notices'); - add_action('admin_menu', 'bpml_admin_menu'); - if (isset($_GET['page']) && $_GET['page'] == 'bpml') { - require_once dirname(__FILE__) . '/admin-form.php'; - add_action('bpml_settings_form_before', 'bpml_profiles_admin_form'); - add_action('admin_init', 'bpml_admin_save_settings_submit'); - add_action('admin_init', 'admin_additional_css_js'); - } - } - add_action('wp_ajax_bpml_ajax', 'bpml_ajax'); - add_action('bpml_ajax', 'bpml_activities_ajax'); - } - } - } else if (is_main_site ()) { - bpml_admin_message('

    ' . __('For BuddyPress Multilingual to work you must enable WPML and BuddyPress.') . '

    '); - } -} - -/** - * Adds hook for CSS styles and jQuery to client-side. - * - */ -function additional_css_js() { - wp_enqueue_style('sitepress-language-switcher', ICL_PLUGIN_URL . '/res/css/language-selector.css', array(), ICL_SITEPRESS_VERSION); - wp_enqueue_style('bpml', BPML_PLUGIN_URL . '/style.css', array(), BPML_VERSION); - wp_enqueue_script('bpml', BPML_PLUGIN_URL . '/scripts.js', array('jquery'), BPML_VERSION); -} - -/** - * Adds hook for Admin CSS styles and jQuery to admin-side. - * - */ -function admin_additional_css_js() { - wp_enqueue_style('bpml', BPML_PLUGIN_URL . '/style.css', array(), BPML_VERSION); - wp_enqueue_script('bpml', BPML_PLUGIN_URL . '/scripts.js', array('jquery'), BPML_VERSION); -} - -/** - * Returns HTML output for admin message. - * - * @param $message - * @param $class - * @return - */ -function bpml_message($message, $class = 'updated', $ID = NULL) { - $ID = is_null($ID) ? '' : ' id="' . $ID . '"'; - return '
    ' . $message . '
    '; -} - -/** - * Adds hook for admin_notices. - * - * @param $message - * @param $class - */ -function bpml_admin_message($message, $class = 'updated', - $action = 'admin_notices') { - add_action($action, create_function('$a=1', 'echo \'
    ' . $message . '
    \';')); -} - -/** - * Returns default BPML settings. - * - * @return - */ -function bpml_default_settings() { - return array( - 'debug' => 0, - 'activities' => array( - 'filter' => 0, - 'display_orphans' => 'all', - 'orphans_fix' => 0, - 'enable_google_translation' => 0, - 'show_activity_switcher' => 0, - ), - 'collected_activities' => array( - 'activity_update' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - 'friendship_created' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - 'joined_group' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - 'created_group' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - 'new_blog' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - 'new_blog_post' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => 1 - ), - 'new_blog_comment' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => 1 - ), - 'activity_comment' => array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ), - ), - ); -} - -/** - * Returns all settings. - * - * @return - */ -function bpml_get_settings() { - return apply_filters('bpml_default_settings', - get_option('bpml', bpml_default_settings())); -} - -/** - * Returns specific setting. - * - * @global $bpml - * @param $ID - * @param $default - * @return - */ -function bpml_get_setting($ID, $default = NULL) { - global $bpml; - if (isset($bpml[$ID])) { - return $bpml[$ID]; - } else if (!is_null($default)) { - $bpml[$ID] = $default; - bpml_save_setting($ID, $default); - return $default; - } -} - -/** - * Saves all settings. - * - * @global array $bpml - * @param $data - */ -function bpml_save_settings($data) { - global $bpml; - $bpml = $data; - update_option('bpml', $bpml); -} - -/** - * Saves specific setting. - * - * @global array $bpml - * @param $ID - * @param $data - */ -function bpml_save_setting($ID, $data) { - global $bpml; - $bpml[$ID] = $data; - update_option('bpml', $bpml); -} - -/** - * Deletes specific setting. - * - * @global $bpml - * @param $ID - */ -function bpml_delete_setting($ID) { - global $bpml; - if (isset($bpml[$ID])) { - unset($bpml[$ID]); - update_option('bpml', $bpml); - } -} - -/** - * Caches admin notices. - * - * Notices are kept until BPML admin page is visited. - * - * @global array $bpml - * @param $ID - * @param $message - */ -function bpml_store_admin_notice($ID, $message) { - global $bpml; - $bpml['admin_notices'][$ID] = $message; - bpml_save_setting('admin_notices', $bpml['admin_notices']); -} - -/** - * Caches frontend notices. - * - * @global array $bpml - * @param $ID - * @param $message - */ -function bpml_store_frontend_notice($ID, $message) { - global $bpml; - if (!isset($bpml['frontend_notices'])) { - $bpml['frontend_notices'] = array(); - } - $bpml['frontend_notices'][$ID] = $message; - bpml_save_setting('frontend_notices', $bpml['frontend_notices']); -} - -/** - * Displays frontend notices. - * - * @global array $bpml - * @param $ID - * @param $message - */ -function bpml_show_frontend_notices() { - global $bpml; - if (empty($bpml['frontend_notices'])) { - return ''; - } - foreach ($bpml['frontend_notices'] as $message) { - echo bpml_message('

    ' . $message . '

    ', 'bpml-frontend-notice'); - } - bpml_delete_setting('frontend_notices'); -} - -/** - * Fetches WPML language data from subblogs. - * - * @global $wpdb - * @param $blog_id - * @param $type - * @param $element_id - * @return - */ -function bpml_get_wpml_language_data($blog_id, $type = 'post_post', - $element_id = NULL, $switch_db = FALSE) { - static $sitepress_settings = array(); - - if (isset($sitepress_settings[$blog_id][$type][$element_id])) { - return $sitepress_settings[$blog_id][$type][$element_id]; - } - - $result = array(); - if ($switch_db) { - switch_to_blog($blog_id); - } - global $wpdb; - $table_name = $wpdb->prefix . 'icl_translations'; - if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { - if ($switch_db) { - restore_current_blog(); - } - return FALSE; - } - if (!isset($sitepress_settings[$blog_id])) { - $fetch = unserialize($wpdb->get_var("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name='icl_sitepress_settings'")); - $sitepress_settings[$blog_id]['default_language'] = $fetch['default_language']; - } - switch ($type) { - case 'comment': - $post_id = $wpdb->get_var("SELECT comment_post_ID FROM {$wpdb->prefix}comments WHERE comment_ID=" . $element_id); - $post_type = 'post_' . $wpdb->get_var("SELECT post_type FROM {$wpdb->prefix}posts WHERE ID=" . $post_id); - $result['language'] = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='" . $post_type . "' AND element_id=" . $post_id); - break; - - default: - $result['language'] = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='" . $type . "' AND element_id=" . $element_id); - break; - } - $result['default_language'] = $sitepress_settings[$blog_id]['default_language']; - $sitepress_settings[$blog_id][$type][$element_id] = $result; - if ($switch_db) { - restore_current_blog(); - } - return $result; -} - -/** - * Tries to get language data for item. - * - * @global $sitepress - * @param $item - * @param $type - * @param $switch_db - * @return - */ -function bpml_get_item_language($item = NULL, $type = 'post_post', - $switch_db = FALSE) { - $lang = array(); - global $sitepress; - if ($type == 'post_post' && !empty($sitepress) && isset($_POST['icl_post_language'])) { // In moment of save if WPML is active - $lang['language'] = $_POST['icl_post_language']; - $lang['default_language'] = $sitepress->get_default_language(); - $lang['recorded_language'] = $sitepress->get_current_language(); - } else if (!is_null($item)) { // Check in DB - $lang = bpml_get_wpml_language_data($item->item_id, $type, $item->secondary_item_id, $switch_db); - if (!empty($lang)) { - $lang['recorded_language'] = $lang['default_language']; - } - } - // Try to get WPLANG - if (empty($lang) && !empty($sitepress)) { - $temp = get_site_option('WPLANG'); - if (!empty($temp)) { - if (strlen($temp) > 2) { - $temp = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_locale_map WHERE locale='" . $temp . "'"); - } - $lang['default_language'] = $lang['language'] = $lang['recorded_language'] = $temp; - } - } - // Try to get RSS lang - if (empty($lang)) { - $temp = get_site_option('rss_language'); - if (!empty($temp)) { - $lang['default_language'] = $lang['language'] = $lang['recorded_language'] = $temp; - } - } - return $lang; -} - -/** - * BPML AJAX hook. - */ -function bpml_ajax() { - do_action('bpml_ajax'); - exit; -} - - -/** - * Filters main navigation menu - * - * @global $sitepress - * @global $bp - * @global $sitepress_settings - * @param $items - * @return $items - */ -function nav_menu_filter($items) { - global $sitepress, $bp, $sitepress_settings; - $default_language = $sitepress->get_default_language(); - $additionalItems = ''; - - foreach($bp->active_components as $component => $value){ - $pos = @strpos($items, $component); - $show_menu = ($pos !== false) ? $show_menu = false : $show_menu = true; - } - - if(bp_is_page( BP_ACTIVITY_SLUG ) || bp_is_page( BP_MEMBERS_SLUG ) || bp_is_page( BP_GROUPS_SLUG ) || bp_is_page( BP_FORUMS_SLUG ) || bp_is_page( BP_BLOGS_SLUG )) - $currentLang = '/' . ICL_LANGUAGE_CODE; - else - bp_is_user() ? $currentLang = '/' . ICL_LANGUAGE_CODE : $currentLang = ''; - - if( $show_menu ){ - $item_class = ( bp_is_page( BP_ACTIVITY_SLUG ) ) ? $activity_class = 'current_page_item' : $activity_class = ''; - $item_class = ( bp_is_page( BP_MEMBERS_SLUG ) ) || bp_is_user() ? $members_class = 'current_page_item' : $members_class = ''; - $item_class = ( bp_is_page( BP_GROUPS_SLUG ) ) || bp_is_group() ? $groups_class = 'current_page_item' : $groups_class = ''; - $item_class = ( bp_is_page( BP_FORUMS_SLUG ) ) ? $forums_class = 'current_page_item' : $forums_class = ''; - $item_class = ( bp_is_page( BP_BLOGS_SLUG ) ) ? $blogs_class = 'current_page_item' : $blogs_class = ''; - - if(!$currentLang == '') : $currentLang = $currentLang . '/'; endif; - if($default_language == ICL_LANGUAGE_CODE) : $currentLang = $currentLang = '/'; endif; - - if ( bp_is_active( 'activity' ) ) : - $additionalItems .= '
  • ' . __('Activity') . '
  • '; - endif; - if ( bp_is_active( 'groups' ) ) : - $additionalItems .= '
  • ' . __('Groups') . '
  • '; - endif; - $additionalItems .= '
  • ' . __('Members') . '
  • '; - if ( bp_is_active( 'forums' ) ) : - $additionalItems .= '
  • ' . __('Forums') . '
  • '; - endif; - if ( bp_is_active( 'blogs' ) && is_multisite() ) : - $additionalItems .= '
  • ' . __('Blogs') . '
  • '; - endif; - } - - $items = $additionalItems . $items; - - return $items; -} - \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/style.css b/wp-content/plugins/buddypress-multilingual/style.css deleted file mode 100644 index 75505c1..0000000 --- a/wp-content/plugins/buddypress-multilingual/style.css +++ /dev/null @@ -1,117 +0,0 @@ -#bpml-debug { - margin: 10px; -} -.bpml-debug { - padding: 5px; - margin: 0 0 10px 0; - -moz-border-radius: 3px 3px 3px 3px; -} -.bpml-debug-updated { - border: 1px solid #FFFFE0; - background-color: #FFFFE0; - color: #000000; -} -.bpml-debug-error { - border: 1px solid #FFFFFF; - background-color: #cc0000; - color: #FFFFFF; -} -#bpml_google_sectional_element { - margin-bottom: 10px; - border-left: 1px dotted #cccccc; - border-bottom: 1px dotted #cccccc; - padding: 0 15px; -} -/*.activity-header .bpml-goog-trans-control,*/ -/*.activity-header .bpml-goog-trans-control div,*/ -.activity-header .bpml-goog-trans-section, -.activity-header .bpml-goog-trans-section p, -.activity-header .bpml-goog-trans-control -/*.activity-header .bpml-goog-trans-section div */ -{ - float: left; -} -.activity-inreplyto .bpml-goog-trans-section, -.activity-inreplyto .bpml-goog-trans-section p, -.activity-inreplyto .bpml-goog-trans-control -{ -/* float: right;*/ -} -.activity-inreplyto .goog-te-sectional-gadget-link-text { - margin-right: 5px; -} -.bpml-translation-original-toggle-title { - float: left; - margin-right: 5px; -/* font-size: 0.8em;*/ -} -.bpml-translation-original-toggle-content { - margin-right: 5px; -/* font-size: 0.8em;*/ -} -.bpml-translation-original-wrapper { - display: none; -} -.bpml-translation-original-wrapper-content { - color: #000000; - background-color: #fbfafa; - border: 1px solid #cccccc; - padding: 5px 15px; - margin: 10px 0; -} -.bpml-admin-form { - background-color: #ffffff; - border: 1px solid #cccccc; - padding: 10px 25px; -} -.bpml-admin-form h4 { - margin: 10px 0 5px 0; -} -#bpml-collected-activities { - display: none; -} -.bpml-collected-activities-wrapper { - margin-bottom: 15px; - border: 1px solid #eeeeee; - padding: 0; - border-collapse: collapse; -} -.bpml-collected-activities-wrapper td { - padding: 2px 10px; - padding-right: 10px; -} -.bpml-collected-activities-wrapper tr:first-child td { - border-bottom: 1px solid #eeeeee; - background-color: #eeeeee; -} -.bpml-collected-activities-title { - font-style: italic; -} -ul.item-list li.bpml-activity-assign-language-wrapper { - border-bottom: 0px; -} -.bpml-activity-assign-language-wrapper form { - margin: 0; -} -.bpml-profiles-field-toggle-button { - margin-bottom: 5px; -} -div.bpml-frontend-notice p { - background: none repeat scroll 0 0 #DFFCD9; - color: #1A9B00; - display: block; - font-size: 12px; - padding: 10px 15px; - -moz-border-radius: 3px 3px 3px 3px; - border-bottom: 1px solid #C4E9BD; - border-right: 1px solid #C4E9BD; - font-weight: normal; - margin-top: 6px; - text-decoration: none; -} -div.bpml-frontend-notice { - clear: both; -} -div.bpml-frontend-notice { - margin: 15px 0; -} \ No newline at end of file diff --git a/wp-content/plugins/buddypress-multilingual/upgrade.php b/wp-content/plugins/buddypress-multilingual/upgrade.php deleted file mode 100644 index 72ce796..0000000 --- a/wp-content/plugins/buddypress-multilingual/upgrade.php +++ /dev/null @@ -1,101 +0,0 @@ -BuddyPress Multilingual: There has been problems with upgrade.

    '); - } - update_option('bpml_version', BPML_VERSION); -} - -function bpml_install() { - global $wpdb, $bpml; - - bpml_save_settings($bpml); - - // Profiles - $table_name = $wpdb->prefix . "bp_xprofile_data_bpml"; - if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { - $sql = "CREATE TABLE " . $table_name . " ( - id bigint(20) NOT NULL AUTO_INCREMENT, - field_id bigint(20) NOT NULL, - user_id bigint(20) NOT NULL, - value longtext, - lang varchar(10) NOT NULL, - PRIMARY KEY (id), - KEY field_id (field_id), - KEY user_id (user_id), - KEY lang (lang) - );"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - } - - // For users had 1.0.1 and earlier - bpml_upgrade_110(); -} - -function bpml_upgrade_110() { - global $bpml, $wpdb; - - // New activity - if (!isset($bpml['collected_activities']['new_blog'])) { - $bpml['collected_activities']['new_blog'] = array( - 'translate_title' => 1, - 'translate_title_cache' => 1, - 'translate_content' => 1, - 'translate_content_cache' => 1, - 'translate_links' => -1 - ); - } - - // Profiles - $table_name = $wpdb->prefix . "bp_xprofile_data_bpml"; - if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { - $sql = "CREATE TABLE " . $table_name . " ( - id bigint(20) NOT NULL AUTO_INCREMENT, - field_id bigint(20) NOT NULL, - user_id bigint(20) NOT NULL, - value longtext, - lang varchar(10) NOT NULL, - PRIMARY KEY (id), - KEY field_id (field_id), - KEY user_id (user_id), - KEY lang (lang) - );"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - } - if (!isset($bpml['profiles'])) { - $bpml['profiles'] = array('translation' => 'no'); - } - - bpml_save_settings($bpml); - - return TRUE; -} \ No newline at end of file diff --git a/wp-content/themes/score/lib/images/forum-icon.png b/wp-content/themes/score/lib/images/forum-icon.png deleted file mode 100644 index 821fb9b..0000000 Binary files a/wp-content/themes/score/lib/images/forum-icon.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/friends-icon.png b/wp-content/themes/score/lib/images/friends-icon.png deleted file mode 100644 index 938ec0d..0000000 Binary files a/wp-content/themes/score/lib/images/friends-icon.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/logo-black.png b/wp-content/themes/score/lib/images/logo-black.png deleted file mode 100644 index 9a50762..0000000 Binary files a/wp-content/themes/score/lib/images/logo-black.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/logo-blue.png b/wp-content/themes/score/lib/images/logo-blue.png deleted file mode 100644 index f645a6f..0000000 Binary files a/wp-content/themes/score/lib/images/logo-blue.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/logo-footer.png b/wp-content/themes/score/lib/images/logo-footer.png deleted file mode 100644 index d8ec6d8..0000000 Binary files a/wp-content/themes/score/lib/images/logo-footer.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/page-bg-black.png b/wp-content/themes/score/lib/images/page-bg-black.png deleted file mode 100644 index 3cd5451..0000000 Binary files a/wp-content/themes/score/lib/images/page-bg-black.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/page-bg-blue.png b/wp-content/themes/score/lib/images/page-bg-blue.png deleted file mode 100644 index daf9740..0000000 Binary files a/wp-content/themes/score/lib/images/page-bg-blue.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/profile-icon.png b/wp-content/themes/score/lib/images/profile-icon.png deleted file mode 100644 index fb2b3ab..0000000 Binary files a/wp-content/themes/score/lib/images/profile-icon.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/sprite-rtl.png b/wp-content/themes/score/lib/images/sprite-rtl.png deleted file mode 100644 index 1cf5c59..0000000 Binary files a/wp-content/themes/score/lib/images/sprite-rtl.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/sprite.png b/wp-content/themes/score/lib/images/sprite.png deleted file mode 100644 index 138a687..0000000 Binary files a/wp-content/themes/score/lib/images/sprite.png and /dev/null differ diff --git a/wp-content/themes/score/lib/images/stripes-bg.png b/wp-content/themes/score/lib/images/stripes-bg.png deleted file mode 100644 index 525b74a..0000000 Binary files a/wp-content/themes/score/lib/images/stripes-bg.png and /dev/null differ