[ Index ]

PHP Cross Reference of YOURLS




/includes/ -> functions-html.php (summary)

(no description)

File Size: 1037 lines (39 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 27 functions


Functions that are not part of a class:

yourls_html_logo()   X-Ref
Display <h1> header and logo

return: void

yourls_html_head( $context = 'index', $title = '' )   X-Ref
Display HTML head and <body> tag

return: void
param: string $context Context of the page (stats, index, infos, ...)
param: string $title HTML title of the page

yourls_html_footer($can_query = true)   X-Ref
Display HTML footer (including closing body & html tags)

Function yourls_die() will call this function with the optional param set to false: most likely, if we're using yourls_die(),
there's a problem, so don't maybe add to it by sending another SQL query

return: void
param: bool $can_query  If set to false, will not try to send another query to DB server

yourls_html_addnew( $url = '', $keyword = '' )   X-Ref
Display "Add new URL" box

return: void
param: string $url URL to prefill the input with
param: string $keyword Keyword to prefill the input with

yourls_html_tfooter( $params = array()   X-Ref
Display main table's footer

The $param array is defined in /admin/index.php, check the yourls_html_tfooter() call

return: void
param: array $params Array of all required parameters

yourls_html_select( $name, $options, $selected = '', $display = false, $label = '' )   X-Ref
Return or display a select dropdown field

since: 1.6
return: string HTML content of the select element
param: string  $name      HTML 'name' (also use as the HTML 'id')
param: array   $options   array of 'value' => 'Text displayed'
param: string  $selected  optional 'value' from the $options array that will be highlighted
param: boolean $display   false (default) to return, true to echo
param: string  $label     ARIA label of the element

yourls_share_box( $longurl, $shorturl, $title = '', $text='', $shortlink_title = '', $share_title = '', $hidden = false )   X-Ref
Display the Quick Share box

return: void
param: string $longurl          Long URL
param: string $shorturl         Short URL
param: string $title            Title
param: string $text             Text to display
param: string $shortlink_title  Optional replacement for 'Your short link'
param: string $share_title      Optional replacement for 'Quick Share'
param: bool   $hidden           Optional. Hide the box by default (with css "display:none")

yourls_die( $message = '', $title = '', $header_code = 200 )   X-Ref
Die die die

return: void
param: string $message
param: string $title
param: int $header_code

yourls_table_edit_row( $keyword )   X-Ref
Return an "Edit" row for the main table

return: string HTML of the edit row
param: string $keyword Keyword to edit

yourls_table_add_row( $keyword, $url, $title, $ip, $clicks, $timestamp )   X-Ref
Return an "Add" row for the main table

return: string             HTML of the row
param: string $keyword     Keyword (short URL)
param: string $url         URL (long URL)
param: string $title       Title
param: string $ip          IP
param: string|int $clicks  Number of clicks
param: string $timestamp   Timestamp

yourls_table_head()   X-Ref
Echo the main table head

return: void

yourls_table_tbody_start()   X-Ref
Echo the tbody start tag

return: void

yourls_table_tbody_end()   X-Ref
Echo the tbody end tag

return: void

yourls_table_end()   X-Ref
Echo the table start tag

return: void

yourls_html_link( $href, $anchor = '', $element = '' )   X-Ref
Echo HTML tag for a link

return: void
param: string $href     URL to link to
param: string $anchor   Anchor text
param: string $element  Element id

yourls_login_screen( $error_msg = '' )   X-Ref
Display the login screen. Nothing past this point.

return: void
param: string $error_msg  Optional error message to display

yourls_html_menu()   X-Ref
Display the admin menu

return: void

yourls_add_notice( $message, $style = 'notice' )   X-Ref
Wrapper function to display admin notices

return: void
param: string $message Message to display
param: string $style    Message style (default: 'notice')

yourls_notice_box( $message, $style = 'notice' )   X-Ref
Return a formatted notice

return: string          HTML of the notice
param: string $message  Message to display
param: string $style    CSS class to use for the notice

yourls_page( $page )   X-Ref
Display a page

Includes content of a PHP file from the YOURLS_PAGEDIR directory, as if it
were a standard short URL (ie http://sho.rt/$page)

since: 1.0
return: void
param: string $page  PHP file to display

yourls_html_language_attributes()   X-Ref
Display the language attributes for the HTML tag.

Builds up a set of html attributes containing the text direction and language
information for the page. Stolen from WP.

since: 1.6
return: void

yourls_l10n_calendar_strings()   X-Ref
Output translated strings used by the Javascript calendar

since: 1.6
return: void

yourls_new_core_version_notice($compare_with = null)   X-Ref
Display a notice if there is a newer version of YOURLS available

since: 1.7
return: void
param: string $compare_with Optional, YOURLS version to compare to

yourls_bookmarklet_link( $href, $anchor, $echo = true )   X-Ref
Display or return HTML for a bookmarklet link

since: 1.7.1
return: string         the HTML for a bookmarklet link
param: string $href    bookmarklet link (presumably minified code with "javascript:" scheme)
param: string $anchor  link anchor
param: bool   $echo    true to display, false to return the HTML

yourls_set_html_context($context)   X-Ref
Set HTML context (stats, index, infos, ...)

since: 1.7.3
return: void
param: string  $context

yourls_get_html_context()   X-Ref
Get HTML context (stats, index, infos, ...)

since: 1.7.3
return: string

yourls_html_favicon()   X-Ref
Print HTML link for favicon

since: 1.7.10
return: mixed|void

Generated: Wed Sep 28 05:10:02 2022 Cross-referenced by PHPXref 0.7.1