Function __global->wiki_add_page
Definitions
sources/wiki.php
- Add a Wiki+ page.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $title | SHORT_TEXT | No | No | required parameter | N/A | N/A | The page title |
| $description | LONG_TEXT | No | No | required parameter | N/A | N/A | The page description |
| $notes | LONG_TEXT | No | No | required parameter | N/A | N/A | Hidden notes pertaining to the page |
| $show_posts | BINARY | No | No | required parameter | N/A | N/A | Whether to show the posts on the page by default |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member doing the action (null: current member) |
| $add_time | ?TIME | No | No | Null | N/A | N/A | The add time (null: now) |
| $views | integer | No | No | 0 | N/A | N/A | The number of views so far |
| $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) |
| $edit_date | ?TIME | No | No | Null | N/A | N/A | The edit time (null: N/A) |
| $send_notification | boolean | No | No | True | N/A | N/A | Whether to send a notification |
Returns
- The page ID
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a Wiki+ page.
*
* @param SHORT_TEXT $title The page title
* @param LONG_TEXT $description The page description
* @param LONG_TEXT $notes Hidden notes pertaining to the page
* @param BINARY $show_posts Whether to show the posts on the page by default
* @param ?MEMBER $member_id The member doing the action (null: current member)
* @param ?TIME $add_time The add time (null: now)
* @param integer $views The number of views so far
* @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)
* @param ?TIME $edit_date The edit time (null: N/A)
* @param boolean $send_notification Whether to send a notification
* @return AUTO_LINK The page ID
*/
function wiki_add_page(string $title, string $description, string $notes, int $show_posts, ?int $member_id = null, ?int $add_time = null, int $views = 0, ?string $meta_keywords = '', ?string $meta_description = '', ?int $edit_date = null, bool $send_notification = true) : int
* Add a Wiki+ page.
*
* @param SHORT_TEXT $title The page title
* @param LONG_TEXT $description The page description
* @param LONG_TEXT $notes Hidden notes pertaining to the page
* @param BINARY $show_posts Whether to show the posts on the page by default
* @param ?MEMBER $member_id The member doing the action (null: current member)
* @param ?TIME $add_time The add time (null: now)
* @param integer $views The number of views so far
* @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)
* @param ?TIME $edit_date The edit time (null: N/A)
* @param boolean $send_notification Whether to send a notification
* @return AUTO_LINK The page ID
*/
function wiki_add_page(string $title, string $description, string $notes, int $show_posts, ?int $member_id = null, ?int $add_time = null, int $views = 0, ?string $meta_keywords = '', ?string $meta_description = '', ?int $edit_date = null, bool $send_notification = true) : int

