The documentation_link() is a WordPress PHP function that is currently not in use. It is an Admin function that was previously used for linking to documentation.
Usage
This function does not accept any parameters or provide any return value. If used, it will simply do nothing. A typical usage of this function (which does nothing) would be:
documentation_link();
Parameters
This function does not accept any parameters.
More information
See WordPress Developer Resources: documentation_link()
This function is not deprecated, but it is unused. Therefore, it is not advisable to use it in your code as its functionality could change or be removed in future versions of WordPress. The source code for this function can be found in the /wp-admin/includes/misc.php
file.
Examples
While the documentation_link() function is currently unused, below are five examples of how it might be used in code. Remember that currently, these examples won’t have any impact on your site because the function does nothing.
Calling the function
Here’s how you might call the function in your code:
documentation_link(); // Does nothing
Calling the function within a function
You can call the function inside another function:
function test() { documentation_link(); // Does nothing } test();
Calling the function within a loop
You might call the function within a loop, although it still won’t have any effect:
for ($i = 0; $i < 5; $i++) { documentation_link(); // Does nothing }
Calling the function with a condition
You can call the function within a conditional statement:
if (true) { documentation_link(); // Does nothing }
Calling the function in a switch statement
This function can also be used within a switch statement:
switch ($variable) { case 'test': documentation_link(); // Does nothing break; }
Please note, these examples are provided purely for instructional purposes. Because the documentation_link() function is currently unused, these examples won’t have any functional impact on your WordPress site.