Plugin Directory

Changeset 8314

Timestamp:
03/16/2007 11:01:07 PM (19 years ago)
Author:
majelbstoat
Message:
  • Fix for gengo_snippet always echoing.
  • Add gengo_locale filter to locale, so that people can write plugins to modify the locale as necessary.
Location:
gengo/trunk/gengo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gengo/trunk/gengo/gengo.php

    r8232 r8314  
    106106        $this->synblock_table = GENGO_SYNBLOCK_TABLE;
    107107        $this->language_cookie = 'gengo_language' . COOKIEHASH;
    108         $this->default_url_exclusions = array('/wp-content', 'wp-login.php', 'xmlrpc.php', 'wp-pass.php', 'wp-register.php', 'theme-editor.php');
     108        $this->default_url_exclusions = array('/wp-content', 'wp-login.php', 'xmlrpc.php', 'wp-pass.php', 'wp-register.php', 'theme-editor.php');
    109109        $this->append_urls = get_option('gengo_append_urls');
    110110        $this->site_home = get_option('home');
     
    10481048        // Don't do this for the admin section.
    10491049        if (!$this->languages || $this->is_excluded_url($_SERVER['REQUEST_URI']) || is_admin()) {
    1050             return ($this->language_preference_id) ? $this->language_preference[0]->locale : $locale;
     1050            if ($this->language_preference_id) {
     1051                $locale = $this->language_preference[0]->locale;
     1052            }
     1053            return apply_filters('gengo_locale', $locale);
    10511054        }
    10521055
    10531056        if (strstr($_SERVER['PHP_SELF'], 'wp-comments-post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-trackback.php')) {
    10541057            $this->strict_links = false;
    1055             return $locale;
     1058            return ;
    10561059        }
    10571060       
     
    11581161            }
    11591162        }
    1160         return $this->language_preference[0]->locale;
     1163        return ;
    11611164    }
    11621165
     
    19191922/*
    19201923
     1924
     1925
     1926
     1927
    192119280.91:
    19221929-----
     
    19311938JS correctly scoped and sorted, because it's crap at the moment.
    19321939gengo.css
    1933 Use X-JSON to send back a simple completion message for all Ajax operations.
     1940s.
    19341941No language - still create a wp-post2lang entry, but set langauge to 0, or no entry?  Will fix lots of plugin based errors.
    19351942Remove deprecated functions.
  • gengo/trunk/gengo/gengo_template_functions.php

    r8217 r8314  
    111111
    112112function gengo_synblock($block_name, $return = false) {
    113     return gengo_snippet($block_name, $return = false);
     113    return gengo_snippet($block_name, $return);
    114114}
    115115
Note: See TracChangeset for help on using the changeset viewer.