Function __global->save_comcode_page

Definitions

sources/zones3.php

  • Save a Comcode page.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$zone ID_TEXT No No required parameter N/A N/A The zone
$new_file ID_TEXT No No required parameter N/A N/A The page
$lang ?LANGUAGE_NAME No No Null N/A N/A The language (null: default website language)
$text ?ID_TEXT No No Null N/A N/A The page text (null: unchanged)
$validated ?BINARY No No Null N/A N/A The validated status (null: 1 / don't change)
$include_on_sitemap ?BINARY No No 1 N/A N/A Include on the sitemap (null: default / don't change)
$parent_page ?ID_TEXT No No Null N/A N/A The page parent (null: none / don't change if $order is also null)
$order ?integer No No Null N/A N/A The page order (null: 0 / don't change)
$add_time ?TIME No No Null N/A N/A Add time (null: now / don't change)
$edit_time ?TIME No No Null N/A N/A Edit time (null: not edited)
$show_as_edit BINARY No No 0 N/A N/A Whether to show as edited
$submitter ?MEMBER No No Null N/A N/A The submitter (null: current member, or first admin if running execute_temp script)
$file ?ID_TEXT No No Null N/A N/A The old page name (null: not being renamed)
$meta_keywords ?SHORT_TEXT No No Blank (empty string) N/A N/A Meta keywords for this resource (blank: implicit) (null: no change, or no change if $text is null)
$meta_description ?LONG_TEXT No No Blank (empty string) N/A N/A Meta description for this resource (blank: implicit) (null: no change, or no change if $text is null)

Returns

  • The save path
  • Type: PATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Save a Comcode page.
 *
 * @param  ID_TEXT $zone The zone
 * @param  ID_TEXT $new_file The page
 * @param  ?LANGUAGE_NAME $lang The language (null: default website language)
 * @param  ?ID_TEXT $text The page text (null: unchanged)
 * @param  ?BINARY $validated The validated status (null: 1 / don't change)
 * @param  ?BINARY $include_on_sitemap Include on the sitemap (null: default / don't change)
 * @param  ?ID_TEXT $parent_page The page parent (null: none / don't change if $order is also null)
 * @param  ?integer $order The page order (null: 0 / don't change)
 * @param  ?TIME $add_time Add time (null: now / don't change)
 * @param  ?TIME $edit_time Edit time (null: not edited)
 * @param  BINARY $show_as_edit Whether to show as edited
 * @param  ?MEMBER $submitter The submitter (null: current member, or first admin if running execute_temp script)
 * @param  ?ID_TEXT $file The old page name (null: not being renamed)
 * @param  ?SHORT_TEXT $meta_keywords Meta keywords for this resource (blank: implicit) (null: no change, or no change if $text is null)
 * @param  ?LONG_TEXT $meta_description Meta description for this resource (blank: implicit) (null: no change, or no change if $text is null)
 * @return PATH The save path
 */

function save_comcode_page(string $zone, string $new_file, ?string $lang = null, ?string $text = null, ?int $validated = null, ?int $include_on_sitemap = 1, ?string $parent_page = null, ?int $order = null, ?int $add_time = null, ?int $edit_time = null, int $show_as_edit = 0, ?int $submitter = null, ?string $file = null, ?string $meta_keywords = '', ?string $meta_description = '') : string