Functions
Search API
Primary tabs
Name |
Location![]() |
Description |
---|---|---|
form_basic_validate |
includes/ |
This is a very basic validator for form API submission. All I really care about is making sure required fields have a value in them. If they do not, we will file a form_error. |
form_error |
includes/ |
Register a form_error in the SESSION. |
form_has_errors |
includes/ |
Returns TRUE or FALSE if there have been errors for this form submission (We will just look in the SESSION to find out). |
fp_render_element |
includes/ |
Returns the HTML to render this form (or content) element to the screen. $name is the HTML machine name. $element is an array containing all we need to render it. If you want default values to be taken from the SESSION (because we had form_errors,… |
_password_itoa64 |
includes/ |
Returns a string for mapping an int to the corresponding base 64 character. |
_password_base64_encode |
includes/ |
Encodes bytes into printable base 64 using the *nix standard from crypt(). |
_password_generate_salt |
includes/ |
Generates a random base 64-encoded salt prefixed with settings for the hash. |
fp_random_bytes |
includes/ |
|
_password_enforce_log2_boundaries |
includes/ |
Ensures that $count_log2 is within set bounds. |
_password_crypt |
includes/ |
Hash a password using a secure stretched hash. |
_password_get_count_log2 |
includes/ |
Parse the log2 iteration count from a stored hash or setting string. |
user_hash_password |
includes/ |
Hash a password using a secure hash. |
user_check_password |
includes/ |
Check whether a plain text password matches a stored hashed password. |
user_needs_new_hash |
includes/ |
|
friendly_timezone |
includes/ |
Returns back the "friendly" timezone string if we have one. |
fp_translate_numeric_grade |
includes/ |
This function will use the "Numeric to Letter Grade" setting in the School settings to translate the given grade (if it is numeric) to a letter grade. Otherwise, it will return the grade as-is. |
fp_re_array_files |
includes/ |
Re-order the _FILES array for multiple files, to make it easier to work with. From: http://php.net/manual/en/features.file-upload.multiple.php |
get_timezone_offset |
includes/ |
Returns the offset from the origin timezone to the remote timezone, in seconds. |
is_serialized_string |
includes/ |
From: https://stackoverflow.com/questions/1369936/check-to-see-if-a-string-is-... |
convert_time |
includes/ |
The point of this function is to convert between UTC (what we expect all times to start with.). If we're coming from the the database or a time() function, it's UTC. The "end_timezone_string" should be the user's preferred… |
get_timezones |
includes/ |
Returns an array of all timezones PHP recognizes. Inspired by code from: https://stackoverflow.com/questions/1727077/generating-a-drop-down-list-... |
_fp_error_handler |
includes/ |
This is our custom error handler, which will intercept PHP warnings, notices, etc, and let us display them, log them, etc. |
_fp_map_php_error_code |
includes/ |
Map an error code into an Error word * |
fp_mail |
includes/ |
Send an email. Drop-in replacement for PHP's mail() command, but can use SMTP protocol if enabled. |
arg |
includes/ |
Returns the component of the page's path. |
fp_url_get_contents |
includes/ |
This function uses CURL to get the simple contents of a URL, whether http or https. |
fp_http_request |
includes/ |
Send a request through the Internet and return the result as an object. |
timer_start |
includes/ |
Begin a microtime timer for later use. |
timer_read |
includes/ |
Works with the timer_start() function to return how long it has been since the start. |
fp_get_random_string |
includes/ |
Returns a random string of length len. |
fp_clear_cache |
includes/ |
Call all modules which implement hook_clear_cache |
fp_no_html_xss |
includes/ |
Remove any possiblilty of a malicious attacker trying to inject nonsense. From: https://paragonie.com/blog/2015/06/preventing-xss-vulnerabilities-in-php... |
filter_markup |
includes/ |
Filter string with possible HTML, allowing only certain tags, and removing dangerous attributes. |
filter_xss |
includes/ |
This function is taken almost directly from Drupal 7's core code. It is used to help us filter out dangerous HTML which the user might type. From the D7 documentation: |
filter_xss_split |
includes/ |
Like the filter_xss function, this is taken from D7's _filter_xss_split function |
filter_xss_attributes |
includes/ |
|
filter_xss_bad_protocol |
includes/ |
|
fp_strip_dangerous_protocols |
includes/ |
|
fp_validate_utf8 |
includes/ |
|
fp_get_machine_readable |
includes/ |
Simple function to convert a string into a machine-readable string. |
fp_get_degree_classifications |
includes/ |
Return back an assoc array of our set degree classifications, separated by "level" |
fp_get_degree_classification_details |
includes/ |
Returns back an assoc array for the supplied code. Looks like: $arr["level_num"] = number $arr["title"] = the title |
get_term_structures |
includes/ |
Return an array version of the term_id_structure field from the admin settings |
fp_get_requirement_types |
includes/ |
Returns back an array of all the available requirement types (by code) that have been defined. |
fp_load_degree |
includes/ |
This function provides a pass-thru to $d = new DegreePlan(args). However, it allows for quick caching look-up, so it should be used when possible instead of $x = new DegreePlan. |
fp_set_page_tabs |
includes/ |
If this function is called, it will override any other page tabs which might be getting constructed. This lets the programmer, at run-time, completely control what tabs are at the top of the page. |
fp_set_page_sub_tabs |
includes/ |
Allows the programmer to define subtabs at the top of the page. |
fp_set_breadcrumbs |
includes/ |
Set our breadcrumbs array. |
fp_set_title |
includes/ |
Allows the programmer to set the title of the page, overwriting any default title. |
fp_add_body_class |
includes/ |
Add a CSS class to the body tag of the page. Useful for themeing later on. |