From: rabuzarus <> Date: Fri, 25 Dec 2015 17:36:13 +0000 (+0100) Subject: add custom tag @hooks to boot.php & identity.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64989781ff34eddb3722d32a4ff90c9c502bdfab;p=friendica.git add custom tag @hooks to boot.php & identity.php --- diff --git a/boot.php b/boot.php index ffbe34a8e0..603e8c17a0 100644 --- a/boot.php +++ b/boot.php @@ -37,6 +37,14 @@ define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1191 ); + +/** + * @brief Constant with a HTML line break. + * + * Contains a HTML line break (br) element and a real carriage return with line + * feed for the source. + * This can be used in HTML and JavaScript where needed a line break. + */ define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -154,7 +162,9 @@ define ( 'PAGE_FREELOVE', 3 ); define ( 'PAGE_BLOG', 4 ); define ( 'PAGE_PRVGROUP', 5 ); -// Type of the community page +/** + * Type of the community page + */ define ( 'CP_NO_COMMUNITY_PAGE', -1 ); define ( 'CP_USERS_ON_SERVER', 0 ); define ( 'CP_GLOBAL_COMMUNITY', 1 ); @@ -1316,6 +1326,9 @@ function get_guid($size=16, $prefix = "") { * * @return string * Returns the complete html for inserting into the page + * + * @hooks 'login_hook' + * string $o */ function login($register = false, $hiddens=false) { $a = get_app(); @@ -1461,17 +1474,18 @@ function get_max_import_size() { } /** + * @brief Wrap calls to proc_close(proc_open()) and call hook + * so plugins can take part in process :) * - * Wrap calls to proc_close(proc_open()) and call hook - * so plugins can take part in process :) - * - * args: - * $cmd program to run - * next args are passed as $cmd command line - * + * @param string $cmd program to run + * + * next args are passed as $cmd command line * e.g.: proc_run("ls","-la","/tmp"); * - * $cmd and string args are surrounded with "" + * @note $cmd and string args are surrounded with "" + * + * @hooks 'proc_run' + * array $arr */ function proc_run($cmd){ diff --git a/include/identity.php b/include/identity.php index a9d0963e6c..fb405b90f1 100644 --- a/include/identity.php +++ b/include/identity.php @@ -181,6 +181,11 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) { * @return HTML string stuitable for sidebar inclusion * * @note Returns empty string if passed $profile is wrong type or not populated + * + * @hooks 'profile_sidebar_enter' + * array $profile - profile data + * @hooks 'profile_sidebar' + * array $arr */ function profile_sidebar($profile, $block = 0) { $a = get_app(); @@ -361,8 +366,8 @@ function profile_sidebar($profile, $block = 0) { if (isset($p["about"])) $p["about"] = bbcode($p["about"]); - if (isset($p["location"])) - $p["location"] = bbcode($p["location"]); + if (isset($p["address"])) + $p["address"] = bbcode($p["address"]); if (isset($p["photo"])) $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);