|
$this->settings->addPages( $this->pages )->withSubPage( 'Dashboard' )->addSubPages( $this->subpages )->register(); |
Hi Alex, with wordpress 5.22 there is an error that arises from this line of code.
It works if we remove the title ('Dashboard') and pass nothing .
Catchable fatal error: Argument 1 passed to includes\API\SettingsApi::withSubPage() must be an instance of includes\API\string, string given, called in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/Pages/Admin.php on line 37 and defined in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/API/SettingsApi.php on line 43
with line 43 being
public function withSubPage( string $title = null )
WordPressPlugin101/Lesson15/inc/Pages/Admin.php
Line 67 in 4de2e1d
Hi Alex, with wordpress 5.22 there is an error that arises from this line of code.
It works if we remove the title ('Dashboard') and pass nothing .
Catchable fatal error: Argument 1 passed to includes\API\SettingsApi::withSubPage() must be an instance of includes\API\string, string given, called in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/Pages/Admin.php on line 37 and defined in /home/admin/web/[xxx]/public_html/wp-content/plugins/nello-plugin/includes/API/SettingsApi.php on line 43
with line 43 being
public function withSubPage( string $title = null )