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

wp_title() doc appears broken #1624

Open
smileBeda opened this issue Jul 3, 2024 · 1 comment
Open

wp_title() doc appears broken #1624

smileBeda opened this issue Jul 3, 2024 · 1 comment
Labels
developer documentation (DevHub) Improvements or additions to developer documentation [Status] To do Issue marked as Todo

Comments

@smileBeda
Copy link

smileBeda commented Jul 3, 2024

Issue Description

This documentation appears broken. There should be at least some $args description, source code...

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/wp_title/

Why is this a problem?

It is unclear what that function even is, when there is no context.

Suggested Fix

  • I checked the code, the docbloc is there, technically this should be automatically generated by the parser... if that for some reason is not working, below attache the information to add
  • I believe there usually also is source code section
/**
 * Displays or retrieves page title for all areas of blog.
 *
 * By default, the page title will display the separator before the page title,
 * so that the blog title will be before the page title. This is not good for
 * title display, since the blog title shows up on most tabs and not what is
 * important, which is the page that the user is looking at.
 *
 * There are also SEO benefits to having the blog title after or to the 'right'
 * of the page title. However, it is mostly common sense to have the blog title
 * to the right with most browsers supporting tabs. You can achieve this by
 * using the seplocation parameter and setting the value to 'right'. This change
 * was introduced around 2.5.0, in case backward compatibility of themes is
 * important.
 *
 * @since 1.0.0
 *
 * @global WP_Locale $wp_locale WordPress date and time locale object.
 *
 * @param string $sep         Optional. How to separate the various items within the page title.
 *                            Default '»'.
 * @param bool   $display     Optional. Whether to display or retrieve title. Default true.
 * @param string $seplocation Optional. Location of the separator (either 'left' or 'right').
 * @return string|void String when `$display` is false, nothing otherwise.
 */

There also should be a bold notice stating that this function is not suggested anymore and instead, add_theme_support should be used.

@smileBeda smileBeda added the [Status] To do Issue marked as Todo label Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@Leonardus-Nugraha Leonardus-Nugraha added the developer documentation (DevHub) Improvements or additions to developer documentation label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer documentation (DevHub) Improvements or additions to developer documentation [Status] To do Issue marked as Todo
2 participants