add custom tag @hooks to boot.php & identity.php

This commit is contained in:
rabuzarus 2015-12-25 18:36:13 +01:00
parent 839895e434
commit 64989781ff
2 changed files with 30 additions and 11 deletions

View file

@ -37,6 +37,14 @@ define ( 'FRIENDICA_CODENAME', 'Asparagus');
define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'FRIENDICA_VERSION', '3.5-dev' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1191 ); 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', "<br />\r\n" ); define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -154,7 +162,9 @@ define ( 'PAGE_FREELOVE', 3 );
define ( 'PAGE_BLOG', 4 ); define ( 'PAGE_BLOG', 4 );
define ( 'PAGE_PRVGROUP', 5 ); define ( 'PAGE_PRVGROUP', 5 );
// Type of the community page /**
* Type of the community page
*/
define ( 'CP_NO_COMMUNITY_PAGE', -1 ); define ( 'CP_NO_COMMUNITY_PAGE', -1 );
define ( 'CP_USERS_ON_SERVER', 0 ); define ( 'CP_USERS_ON_SERVER', 0 );
define ( 'CP_GLOBAL_COMMUNITY', 1 ); define ( 'CP_GLOBAL_COMMUNITY', 1 );
@ -1316,6 +1326,9 @@ function get_guid($size=16, $prefix = "") {
* *
* @return string * @return string
* Returns the complete html for inserting into the page * Returns the complete html for inserting into the page
*
* @hooks 'login_hook'
* string $o
*/ */
function login($register = false, $hiddens=false) { function login($register = false, $hiddens=false) {
$a = get_app(); $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 * @param string $cmd program to run
* so plugins can take part in process :) *
* * next args are passed as $cmd command line
* args:
* $cmd program to run
* next args are passed as $cmd command line
*
* e.g.: proc_run("ls","-la","/tmp"); * 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){ function proc_run($cmd){

View file

@ -181,6 +181,11 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) {
* @return HTML string stuitable for sidebar inclusion * @return HTML string stuitable for sidebar inclusion
* *
* @note Returns empty string if passed $profile is wrong type or not populated * @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) { function profile_sidebar($profile, $block = 0) {
$a = get_app(); $a = get_app();
@ -361,8 +366,8 @@ function profile_sidebar($profile, $block = 0) {
if (isset($p["about"])) if (isset($p["about"]))
$p["about"] = bbcode($p["about"]); $p["about"] = bbcode($p["about"]);
if (isset($p["location"])) if (isset($p["address"]))
$p["location"] = bbcode($p["location"]); $p["address"] = bbcode($p["address"]);
if (isset($p["photo"])) if (isset($p["photo"]))
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL); $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);