Skip to content

Commit

Permalink
fix(slug): replace whitespace with dash on plugin textdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Feb 17, 2023
1 parent 46fe99a commit 997e073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// Load the config with defaults
$config = parse_config();
// Create a constant with the slug of the new plugin
define( 'WPBP_PLUGIN_SLUG', str_replace( ' ', '-', strtolower( preg_replace('/[0-9\@\.\;\" "]+/', '', ( $config[ 'plugin_name' ] ) ) ) ) );
define( 'WPBP_PLUGIN_SLUG', str_replace( ' ', '-', strtolower( preg_replace('/[0-9\@\.\;]+/', '', ( $config[ 'plugin_name' ] ) ) ) ) );
// Check if a folder with that name already exist
if ( file_exists( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . WPBP_PLUGIN_SLUG ) ) {
$clio->style( $error )->display( 'Folder ' . WPBP_PLUGIN_SLUG . ' already exist!' )->newLine();
Expand Down

0 comments on commit 997e073

Please sign in to comment.