Function __global->check_banner
Definitions
sources/banners2.php
- Check the uploaded banner is valid.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $title_text | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The title text for the banner (only used for text banners, and functions as the 'trigger text' if the banner type is shown inline) |
| $direct_code | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Complete HTML/PHP for the banner |
| $b_type | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | The banner type (can be anything, where blank means 'normal') |
| $b_types | array | No | No | [] | N/A | N/A | The secondary banner types (empty: no secondary banner types) |
| $url_param_name | string | No | No | image_url | N/A | N/A | Param name for possible URL field |
| $file_param_name | string | No | No | file | N/A | N/A | Param name for possible upload field |
Returns
- A pair: The URL, and the title text
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check the uploaded banner is valid.
*
* @param SHORT_TEXT $title_text The title text for the banner (only used for text banners, and functions as the 'trigger text' if the banner type is shown inline)
* @param LONG_TEXT $direct_code Complete HTML/PHP for the banner
* @param ID_TEXT $b_type The banner type (can be anything, where blank means 'normal')
* @param array $b_types The secondary banner types (empty: no secondary banner types)
* @param string $url_param_name Param name for possible URL field
* @param string $file_param_name Param name for possible upload field
* @return array A pair: The URL, and the title text
*/
function check_banner(string $title_text = '', string $direct_code = '', string $b_type = '', array $b_types = [], string $url_param_name = 'image_url', string $file_param_name = 'file') : array
* Check the uploaded banner is valid.
*
* @param SHORT_TEXT $title_text The title text for the banner (only used for text banners, and functions as the 'trigger text' if the banner type is shown inline)
* @param LONG_TEXT $direct_code Complete HTML/PHP for the banner
* @param ID_TEXT $b_type The banner type (can be anything, where blank means 'normal')
* @param array $b_types The secondary banner types (empty: no secondary banner types)
* @param string $url_param_name Param name for possible URL field
* @param string $file_param_name Param name for possible upload field
* @return array A pair: The URL, and the title text
*/
function check_banner(string $title_text = '', string $direct_code = '', string $b_type = '', array $b_types = [], string $url_param_name = 'image_url', string $file_param_name = 'file') : array

