Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: various fixes #210

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/admin-bar-panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function __construct() {

/**
* Renders the debug panel.
*
* @return void
*/
public function render() {
echo '<h2>', \esc_html__( 'Debug Information', 'yoast-test-helper' ), '</h2>';
Expand Down
2 changes: 2 additions & 0 deletions src/development-mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function use_ai_staging_api() {
* Sets a boolean option based on a POST parameter.
*
* @param string $option The option to check and set.
*
* @return void
*/
private function set_bool_option( $option ) {
// The nonce is checked in the handle_submit function.
Expand Down
4 changes: 3 additions & 1 deletion src/domain-dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function handle_submit() {
*
* @param string $url URL of the request about to be made.
* @param array $headers Headers of the request about to be made.
*
* @return void
*/
public function modify_myyoast_request( &$url, &$headers ) {
Expand Down Expand Up @@ -116,7 +117,8 @@ public function modify_myyoast_request( &$url, &$headers ) {
* @param string $domain Testing domain to take place in the request.
* @param string $url URL of request about to be made.
* @param array $headers Headers of request about to be made.
* @return array [ 'url' => new URL, 'host' => new Host ]
*
* @return array<string, string> Format: [ 'url' => new URL, 'host' => new Host ]
*/
private function replace_domain( $domain, $url, $headers ) {
$host = '';
Expand Down
2 changes: 2 additions & 0 deletions src/inline-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function add_hooks() {

/**
* Add an inline script after the specified script.
*
* @return void
*/
public function add_inline_script() {
if ( $this->option->get( 'add_inline_script' ) !== true ) {
Expand Down
2 changes: 2 additions & 0 deletions src/plugin-version-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public function handle_submit() {
*
* @param WordPress_Plugin $plugin Plugin to update a version of.
* @param string $version Version to update.
*
* @return void
*/
protected function update_plugin_version( WordPress_Plugin $plugin, $version ) {
if ( $this->plugin_version->update_version( $plugin, $version ) ) {
Expand Down
2 changes: 2 additions & 0 deletions src/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ static function ( Integration $integration ) {
* Adds the blocks to the admin page.
*
* @param Admin_Page $admin_page The current admin page.
*
* @return void
*/
public function admin_page_blocks( Admin_Page $admin_page ) {
foreach ( $this->integrations as $integration ) {
Expand Down
8 changes: 6 additions & 2 deletions src/post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public function handle_submit() {

/**
* Flushes the rewrite rules on the required action.
*
* @return void
*/
public function flush_rewrite_rules() {
\flush_rewrite_rules();
Expand All @@ -132,6 +134,8 @@ public function flush_rewrite_rules() {
* Sets a boolean option based on a POST parameter.
*
* @param string $option The option to check and set.
*
* @return void
*/
private function set_bool_option( $option ) {
// The nonce is checked in the handle_submit function.
Expand All @@ -142,7 +146,7 @@ private function set_bool_option( $option ) {
/**
* Return arguments to use when registering the book post type.
*
* @return array Arguments to use when registering the book post type.
* @return array<string, string|bool|array<string, string>> Arguments to use when registering the book post type.
*/
private function get_book_args() {
return [
Expand All @@ -167,7 +171,7 @@ private function get_book_args() {
/**
* Get arguments to use when registering the movie post type.
*
* @return array Arguments to use when registering the movie post type.
* @return array<string, string|bool|array<string, string>> Arguments to use when registering the movie post type.
*/
private function get_movie_args() {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/query-monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function add_hooks() {
*
* @param array $menu Array of menu items.
*
* @return array Array of menu items.
* @return array<string, string> Array of menu items.
*/
public function add_menu_panel( array $menu ) {
$menu['yoast-seo'] = [
Expand Down
4 changes: 4 additions & 0 deletions src/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,17 @@ public function add_hooks() {

/**
* Registers the schema endpoint if needed.
*
* @return void
*/
public function init_rewrite() {
\add_rewrite_endpoint( 'schema', \EP_ALL );
}

/**
* Send the Yoast SEO Schema.
*
* @return void
*/
public function send_json_ld() {
global $wp_query;
Expand Down
8 changes: 6 additions & 2 deletions src/taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public function __construct( Option $option ) {

/**
* Register the needed hooks.
*
* @return void
*/
public function add_hooks() {
if ( $this->option->get( 'enable_post_types' ) === true ) {
Expand All @@ -34,6 +36,8 @@ public function add_hooks() {

/**
* Registers our post types.
*
* @return void
*/
public function register_taxonomies() {
// Taxonomies for books.
Expand All @@ -50,7 +54,7 @@ public function register_taxonomies() {
*
* @param string $slug The slug to set for the taxonomy.
*
* @return array Arguments to use when registering the category taxonomy.
* @return array<string, string|bool|array<string, string>> Arguments to use when registering the category taxonomy.
*/
private function get_category_args( $slug ) {
return [
Expand All @@ -73,7 +77,7 @@ private function get_category_args( $slug ) {
*
* @param string $slug The slug to set for the taxonomy.
*
* @return array Arguments to use when registering the genre taxonomy.
* @return array<string, string|bool|array<string, string>> Arguments to use when registering the genre taxonomy.
*/
private function get_genre_args( $slug ) {
return [
Expand Down
2 changes: 2 additions & 0 deletions src/wordpress-plugins/yoast-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ private function reset_indexables() {
* Resets the indexing notification such that it is shown again.
*
* @param string $reason The indexing reason why the site needs to be reindexed.
*
* @return void
*/
protected function reset_indexing_notification( $reason ) {
\YoastSEO()->helpers->indexing->set_reason( $reason );
Expand Down