Created
July 3, 2012 11:40
-
-
Save pjhoberman/3039239 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php b/wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php | |
| index 0327ca9..2acfce8 100644 | |
| --- a/wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php | |
| +++ b/wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php | |
| @@ -589,6 +589,9 @@ CSSSTYLE; | |
| $language_file = ( file_exists( WP_TABLE_RELOADED_ABSPATH . $language_file ) ) ? '/' . $language_file : '/languages/datatables/lang-default.txt'; | |
| $language_file_url = plugins_url( $language_file, WP_TABLE_RELOADED__FILE__ ); | |
| $language_file_url = apply_filters( 'wp_table_reloaded_url_datatables_language_file', $language_file_url ); | |
| + if(! preg_match('/www\./', $_SERVER['HTTP_HOST'])){ | |
| + $language_file_url = str_replace("www.", '', $language_file_url); | |
| + } | |
| if ( !empty( $language_file_url ) ) | |
| $parameters['oLanguage'] = "\"oLanguage\":{\"sUrl\": \"{$language_file_url}\"}"; // URL with language file | |
| // these parameters need to be added for performance gain or to overwrite unwanted default behavior | |
| @@ -648,4 +651,4 @@ JSSCRIPT; | |
| } // class WP_Table_Reloaded_Controller_Frontend | |
| -?> | |
| \ No newline at end of file | |
| +?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment