Skip to content

Commit

Permalink
add fallback for the text domain prefix if is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Jun 20, 2018
1 parent 87549ce commit b2115b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions inc/Core.php
Expand Up @@ -26,6 +26,11 @@ class Core {


public function __construct( $prefix = null ) { public function __construct( $prefix = null ) {


// Fallback for empty parameter.
if ( null === $prefix ) {
$prefix = 'wp_basis';
}

$this->prefix = $prefix; $this->prefix = $prefix;
$this->wp_update_themes = true; $this->wp_update_themes = true;


Expand Down
5 changes: 5 additions & 0 deletions inc/Gutenberg.php
Expand Up @@ -29,6 +29,11 @@ class Gutenberg {
*/ */
public function __construct( $prefix = null ) { public function __construct( $prefix = null ) {


// Fallback for empty parameter.
if ( null === $prefix ) {
$prefix = 'wp_basis';
}

$this->prefix = $prefix; $this->prefix = $prefix;
$this->init(); $this->init();
} }
Expand Down
1 change: 1 addition & 0 deletions inc/I18n.php
Expand Up @@ -30,6 +30,7 @@ public function __construct( $prefix = null ) {
if ( null === $prefix ) { if ( null === $prefix ) {
$prefix = 'wp_basis'; $prefix = 'wp_basis';
} }

// string for i18n of theme // string for i18n of theme
$this->text_domain = $prefix; $this->text_domain = $prefix;
// folder for language files // folder for language files
Expand Down
3 changes: 1 addition & 2 deletions inc/Setup.php
Expand Up @@ -5,7 +5,7 @@
* @package WordPress * @package WordPress
* @subpackage WordPress_Basis_Theme * @subpackage WordPress_Basis_Theme
* @since 2012-05-08 0.0.1 * @since 2012-05-08 0.0.1
* @version 2018-01-03 * @version 2018-06-20
* @author Frank Bültge <frank@bueltge.de> * @author Frank Bültge <frank@bueltge.de>
*/ */


Expand All @@ -17,7 +17,6 @@
* @version 2012-05-08 * @version 2012-05-08
* @author Frank Bültge <frank@bueltge.de> * @author Frank Bültge <frank@bueltge.de>
*/ */

namespace Wp_Basis\Setup; namespace Wp_Basis\Setup;


use Wp_Basis\Admin_Branding\Wp_Basis_Admin_Branding; use Wp_Basis\Admin_Branding\Wp_Basis_Admin_Branding;
Expand Down

0 comments on commit b2115b1

Please sign in to comment.