File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 7
7
use WP_REST_Request ;
8
8
use WP_Error ;
9
9
use Illuminate \Support \Collection ;
10
+ use Illuminate \Support \Str ;
10
11
use function App \template ;
11
12
use function App \locate_template ;
12
13
@@ -152,7 +153,7 @@ public static function getPath() : string
152
153
153
154
protected function getTemplate () : string
154
155
{
155
- $ action_kebab_case = kebab_case ( camel_case ($ this ->action ));
156
+ $ action_kebab_case = Str:: kebab (Str:: camel ($ this ->action ));
156
157
157
158
// Default template path is always ajax/ followed by the action in kebab case.
158
159
// If the action is "class based" this path will be considered the fallback path
@@ -180,7 +181,7 @@ protected function getTemplate() : string
180
181
181
182
protected static function getActionClass (string $ action ): string
182
183
{
183
- return '\App\AjaxHandler \\' . studly_case ($ action );
184
+ return '\App\AjaxHandler \\' . Str:: studly ($ action );
184
185
}
185
186
186
187
protected static function getActionClassMethod (): string
@@ -195,7 +196,7 @@ protected static function getAjaxClass(): string
195
196
196
197
protected static function getAjaxClassMethod (string $ action ): string
197
198
{
198
- return camel_case ($ action );
199
+ return Str:: camel ($ action );
199
200
}
200
201
201
202
protected static function hasClassBasedHandler (string $ action , WP_REST_Request $ request ): bool
You can’t perform that action at this time.
0 commit comments