Function __global->add_author
Definitions
sources/authors.php
- Adds an author (re-creating them if they already exist - thus it also serves to edit; the reason for this is the fluidity of authors - members are automatically authors even before an author profile is made).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$author | ID_TEXT | No | No | required parameter | N/A | N/A | The name of an author |
$url | URLPATH | No | No | required parameter | N/A | N/A | The URL to the authors home page |
$member_id | ?MEMBER | No | No | required parameter | N/A | N/A | The member ID of the author (null: no forum profile) |
$description | LONG_TEXT | No | No | required parameter | N/A | N/A | A description of the author |
$skills | LONG_TEXT | No | No | required parameter | N/A | N/A | A terse string showing author skills |
$meta_keywords | ?SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Meta keywords for this resource (null: do not edit) (blank: implicit) |
$meta_description | ?LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Meta description for this resource (null: do not edit) (blank: implicit) |
Preview
Code (PHP)
/**
* Adds an author (re-creating them if they already exist - thus it also serves to edit; the reason for this is the fluidity of authors - members are automatically authors even before an author profile is made).
*
* @param ID_TEXT $author The name of an author
* @param URLPATH $url The URL to the authors home page
* @param ?MEMBER $member_id The member ID of the author (null: no forum profile)
* @param LONG_TEXT $description A description of the author
* @param LONG_TEXT $skills A terse string showing author skills
* @param ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit) (blank: implicit)
* @param ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit) (blank: implicit)
*/
function add_author(string $author, string $url, ?int $member_id, string $description, string $skills, ?string $meta_keywords = '', ?string $meta_description = '')
* Adds an author (re-creating them if they already exist - thus it also serves to edit; the reason for this is the fluidity of authors - members are automatically authors even before an author profile is made).
*
* @param ID_TEXT $author The name of an author
* @param URLPATH $url The URL to the authors home page
* @param ?MEMBER $member_id The member ID of the author (null: no forum profile)
* @param LONG_TEXT $description A description of the author
* @param LONG_TEXT $skills A terse string showing author skills
* @param ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit) (blank: implicit)
* @param ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit) (blank: implicit)
*/
function add_author(string $author, string $url, ?int $member_id, string $description, string $skills, ?string $meta_keywords = '', ?string $meta_description = '')