Skip to content

Commit

Permalink
Version 0.1 stable release
Browse files Browse the repository at this point in the history
Fixes #29 - the "Fix Posts" script now doesn't override the translations
when triggered after a default language change.
File inline documentation has been added - every .php file now contains
a PHPDoc codeblock at the top, containing information about the file and
it's purpose
Also fixed all documentation blocks to comply to the standard(more or
less)
Switched to "Copyleft" instead of "Copyright", added proper licensing
information.
Added a remove language icon.
Got rid of the "win_locales.php" file - it wasn't used and after trying
the plugin on an IIS server it was running just fine without it.
  • Loading branch information
nikolov-tmw committed Jun 27, 2013
1 parent d5f95b8 commit f2bc301
Show file tree
Hide file tree
Showing 21 changed files with 533 additions and 332 deletions.
9 changes: 9 additions & 0 deletions add-language-page.php
@@ -1,4 +1,13 @@
<?php
/**
* Creates GUI for adding new languages
*
* @package Multilingual WP
* @author Nikola Nikolov <nikolov.tmw@gmail.com>
* @copyright Copyleft (?) 2012-2013, Nikola Nikolov
* @license {@link http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3}
* @since 0.1
*/

class Multilingual_WP_Add_Language_Page extends scb_MLWP_AdminPage {
protected $admin_notice = false;
Expand Down
17 changes: 12 additions & 5 deletions class-mlwp-comment-query.php
@@ -1,18 +1,27 @@
<?php
/**
* Custom comments query class with support for meta queries
*
* @package Multilingual WP
* @author Nikola Nikolov <nikolov.tmw@gmail.com>
* @copyright Copyleft (?) 2012-2013, Nikola Nikolov
* @license {@link http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3}
* @since 0.1
*/

/**
* WordPress Comment Query class + WP_Meta_Query.
*
* The default Wordpress Comment Query class with added compatibility for meta queries :)
* It's deprecated since WordPress 3.5 - when a native meta_query support has been introduced
*
* @since 3.1.0
* @deprecated 3.5 - uses WP's version since it has meta_query support since WP 3.5
* @package Multilingual WP
* @since 0.1
*/
class MLWP_Comment_Query extends WP_Comment_Query {
/**
* Metadata query container
*
* @since 3.2.0
* @access public
* @var object WP_Meta_Query
*/
Expand All @@ -21,8 +30,6 @@ class MLWP_Comment_Query extends WP_Comment_Query {
/**
* Execute the query
*
* @since 3.1.0
*
* @param string|array $query_vars
* @return int|array
*/
Expand Down
31 changes: 24 additions & 7 deletions class-mlwp-gsmg.php
@@ -1,14 +1,29 @@
<?php
/**
* Extension for the Google XML Sitemaps plugin
*
* Adds sitemaps for each language, thus making every translation available
* in the site's sitemap.
*
* You can see the original plugin here - {@link http://wordpress.org/plugins/google-sitemap-generator/ Google XML Sitemaps}
*
* @package Multilingual WP
* @author Nikola Nikolov <nikolov.tmw@gmail.com>
* @copyright Copyleft (?) 2012-2013, Nikola Nikolov
* @license {@link http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3}
* @since 0.1
*/

/**
*
*/
class MLWP_GSMG extends GoogleSitemapGeneratorStandardBuilder {
/**
* Override the default construct method for GoogleSitemapGeneratorStandardBuilder
*
* This way we add our actions with higher(lower index) priority, so then we can remove the default actions in MLWP_GSMG::remove_def_actions()
**/
* Override the default construct method for GoogleSitemapGeneratorStandardBuilder
*
* This way we add our actions with higher(lower index) priority,
* so then we can remove the default actions in MLWP_GSMG::remove_def_actions()
*/
function __construct() {
add_action( "sm_build_index", array( $this, "language_index" ), 1, 1 );
add_action( "sm_build_content", array( $this, "language_content" ), 1, 3 );
Expand All @@ -19,9 +34,11 @@ function __construct() {
/**
* Removes the default actions added by GoogleSitemapGeneratorStandardBuilder::__construct()
*
* By removing the default actions, we make sure that there won't be duplication issues. Also we make sure to only remove
* the GoogleSitemapGeneratorStandardBuilder::Index() and GoogleSitemapGeneratorStandardBuilder::Content() functions
**/
* By removing the default actions, we make sure that there
* won't be duplication issues. Also we make sure to only remove
* the GoogleSitemapGeneratorStandardBuilder::Index()
* and GoogleSitemapGeneratorStandardBuilder::Content() functions
*/
private function remove_def_actions() {
global $wp_filter;

Expand Down
9 changes: 9 additions & 0 deletions credits-page.php
@@ -1,4 +1,13 @@
<?php
/**
* Creates a "Credits" page in the admin Dashboard containing contributors/supportes information
*
* @package Multilingual WP
* @author Nikola Nikolov <nikolov.tmw@gmail.com>
* @copyright Copyleft (?) 2012-2013, Nikola Nikolov
* @license {@link http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3}
* @since 0.1
*/

class Multilingual_WP_Credits_Page extends scb_MLWP_AdminPage {
protected $admin_notice = false;
Expand Down
6 changes: 4 additions & 2 deletions css/multilingual-wp-settings.css
Expand Up @@ -27,5 +27,7 @@ div.mlwp-box.mlwp-error { background-color: #FFCACA; border-color: #F33636; font
/*
Screen Icons
*/
.multilingual-wp_page_add-new-language .wrap h2 { line-height: 51px; }
#icon-mlwp_add_language { background-image: url(../images/add-language-icon.png); width: 64px; height: 50px; margin-right: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
.multilingual-wp_page_add-new-language .wrap h2,
.multilingual-wp_page_remove-a-language .wrap h2 { line-height: 51px; }
#icon-mlwp_add_language { background-image: url(../images/add-language-icon.png); width: 64px; height: 50px; margin-right: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
#icon-mlwp_remove_language { background-image: url(../images/remove-language-icon.png); width: 64px; height: 50px; margin-right: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }

0 comments on commit f2bc301

Please sign in to comment.