Conversation
…ctly in stubs - Better code for CPT, so now generates automatically the default name, plural, slug based on name - Added a function to avoid create a post_type name larger than 20 characters (as described here: https://developer.wordpress.org/reference/functions/register_post_type/ ) - Added support to set showInRest and showUI directly supports in CPT - Added a default icon for the stub of CPT, so we avoid the empty space
- Added support to pre-fill the data on CTT - Allow multiple Post Type support to CTT - Added support to set showui by default on CTT
|
@bredecl hey, thank you for the PR 🙏 - where is your previous PR about the database? |
|
@gfazioli I deleted it, it wasn't working as I expected, but I will work it again in it. |
- explanation of CTT fix
WIP: Add support for WPBONES_TEXTDOMAIN
- Added a Menu Relations to self generated menus from CTT
- Added support to make use of WPBONES_TEXTDOMAIN on Admin Menu Provider
Important, this could lead to a break on your code, you *need* to add at least
```
defined("WPBONES_TEXTDOMAIN","your_text_domain");
```
in `config.php`
or update your code based on wpbones/WPKirk#32
|
@gfazioli hi! I look forward to your feedback |
fix closes the askYesNo method
Yes,
|
|
hi @gfazioli |
What do you mean exactly? |
gfazioli
left a comment
There was a problem hiding this comment.
@balazsnasz maybe you already know, but the namespace is not correct
| * @param string|null $default The default value | ||
| */ | ||
| protected function ask(string $str, ?string $default = ''): string | ||
| protected function ask(string $str, ?string $default = '',?string $example = ''): string |
There was a problem hiding this comment.
add the new optional $example param in the function docs
@param string|null $example
| return $line ?: $default; | ||
| } | ||
| /** | ||
| * Get input from console |
There was a problem hiding this comment.
maybe the doc need updating
| $this->line(' Created plugin/Console/Kernel.php'); | ||
| } | ||
| } | ||
| protected function simplePluralize($word) { |
| "Remember to add \\{$namespace}\CustomPostTypes\\{$className} in the config/plugin.php array in the 'custom_post_types' key." | ||
| ); | ||
| } | ||
| private function stringToArray($content){ |
| } | ||
| return $itemsSupport; | ||
| } | ||
| private function slugify($namespace,$name,$remove=0){ |
| "Remember to add \\{$namespace}\CustomPostTypes\\{$className} in the config/plugin.php array in the 'custom_post_types' key." | ||
| ); | ||
| } | ||
| private function stringToArray($content){ |
There was a problem hiding this comment.
what do you think to use this version
private function stringToArray($content) {
// Split the string by commas and trim whitespace from each item
$items = array_map('trim', explode(",", $content));
// Filter out any empty items
return array_filter($items, fn($item) => !empty($item));
}| } | ||
| return $itemsSupport; | ||
| } | ||
| private function slugify($namespace,$name,$remove=0){ |
There was a problem hiding this comment.
What exactly is the purpose of this function?
@gfazioli are you sure you wanted to tag me? @bredecl was working on this issue and I have no clue about this issue |
yep, sorry, I wanted tag @bredecl 🙏 |
Hi
I made some improvements for the bones cli and content