CRM_Utils_System_WordPress
class CRM_Utils_System_WordPress extends CRM_Utils_System_Base
WordPress specific stuff goes here
Properties
bool | $is_drupal | Deprecated property to check if this is a drupal install. | from CRM_Utils_System_Base |
bool | $is_joomla | Deprecated property to check if this is a joomla install. The correct method is to have functions on the UF classes for all UF specific functions and leave the codebase oblivious to the type of CMS | from CRM_Utils_System_Base |
bool | $is_wordpress | deprecated property to check if this is a wordpress install. The correct method is to have functions on the UF classes for all UF specific functions and leave the codebase oblivious to the type of CMS | from CRM_Utils_System_Base |
bool | $supports_UF_Logging | Does this CMS / UF support a CMS specific logging mechanism? | from CRM_Utils_System_Base |
bool | $supports_form_extensions | from CRM_Utils_System_Base |
Methods
No description
No description
No description
No description
No description
No description
FIXME: Do something
No description
FIXME: Use CMS-native approach
No description
Clear CMS caches related to the user registration/profile forms.
No description
If we are using a theming system, invoke theme, else just print the content.
Get the absolute path to the site's base url.
No description
Format the url as per language Negotiation.
Determine the location of the CMS root.
No description
No description
No description
No description
No description
Reset any system caches that may be required for proper CiviCRM integration.
No description
Moved from CRM_Utils_System_Base
Determine the location of the CiviCRM source tree.
Perform any post login activities required by the CMS.
Set timezone in mysql so that timestamp fields show the correct time.
No description
No description
Get User ID from UserFramework system (Joomla)
Get an array of user details for a contact, containing at minimum the user ID & name.
No description
No description
Return a UFID (user account ID from the UserFramework / CMS system.
Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.
List modules installed in the CMS, including enabled and disabled ones.
No description
Is the current user permitted to add a user.
Append WP js to coreResourcesList.
No description
No description
WP action callback.
Load wordpress bootstrap.
No description
No description
No description
Details
in CRM_Utils_System_Base at line 53
initialize()
at line 126
appendBreadCrumb(array $breadCrumbs)
at line 154
resetBreadCrumb()
at line 162
addHTMLHead(string $head)
at line 188
mapConfigToSSL()
in CRM_Utils_System_Base at line 98
string
postURL(string $action)
Figure out the post url for QuickForm.
at line 196
string
url(string $path = NULL, string $query = NULL, bool $absolute = FALSE, string $fragment = NULL, bool $frontend = FALSE, bool $forceBackend = FALSE)
at line 298
array|bool
authenticate(string $name, string $password, bool $loadCMSBootstrap = FALSE, string $realPath = NULL)
at line 325
setMessage(string $message)
FIXME: Do something
at line 333
bool
loadUser(obj $user)
at line 353
permissionDenied()
FIXME: Use CMS-native approach
at line 360
logout()
in CRM_Utils_System_Base at line 199
updateCategories()
Clear CMS caches related to the user registration/profile forms.
Used when updating/embedding profiles on CMS user forms.
at line 372
string|null
getUFLocale()
in CRM_Utils_System_Base at line 230
string|null
theme(string $content, bool $print = FALSE, bool $maintenance = FALSE)
If we are using a theming system, invoke theme, else just print the content.
in CRM_Utils_System_Base at line 286
string
getDefaultBlockLocation()
in CRM_Utils_System_Base at line 295
bool|mixed|string
getAbsoluteBaseURL()
Get the absolute path to the site's base url.
in CRM_Utils_System_Base at line 317
bool
getRelativeBaseURL()
Get the relative path to the sites base url.
at line 681
string
getVersion()
in CRM_Utils_System_Base at line 346
string
languageNegotiationURL(string $url, bool $addLanguagePart = TRUE, bool $removeLanguagePart = FALSE)
Format the url as per language Negotiation.
at line 483
string|null
cmsRootPath()
Determine the location of the CMS root.
at line 517
int|bool
createUser(array $params, string $mail)
at line 553
updateCMSName(int $ufID, $ufName)
at line 602
bool
isUserLoggedIn()
at line 661
string
getLoginURL(string $destination = '')
at line 674
string|NULL
getLoginDestination(CRM_Core_Form $form)
FIXME: Do something.
in CRM_Utils_System_Base at line 431
getUfId(string $username)
Determine the native ID of the CMS user.
at line 391
bool
setUFLocale(string $civicrm_language)
in CRM_Utils_System_Base at line 453
setUserSession(array $data)
Set a init session with user object.
in CRM_Utils_System_Base at line 463
flush()
Reset any system caches that may be required for proper CiviCRM integration.
in CRM_Utils_System_Base at line 470
clearResourceCache()
Flush css/js caches.
in CRM_Utils_System_Base at line 487
bool
addScriptUrl(string $url, string $region)
Add a script file.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 504
bool
addScript(string $code, string $region)
Add an inline script.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 521
bool
addStyleUrl(string $url, string $region)
Add a css file.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 538
bool
addStyle(string $code, string $region)
Add an inline style.
Note: This function is not to be called directly
at line 56
setTitle(string $title, string|null $pageTitle = NULL)
in CRM_Utils_System_Base at line 563
array
getDefaultSiteSettings(string $dir)
Return default Site Settings.
at line 78
array
getDefaultFileStorage()
Moved from CRM_Utils_System_Base
at line 98
array
getCiviSourceStorage()
Determine the location of the CiviCRM source tree.
in CRM_Utils_System_Base at line 688
userLoginFinalize(array $params = array())
Perform any post login activities required by the CMS.
e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, calls hook_user op 'login' and generates a new session.
in CRM_Utils_System_Base at line 694
setMySQLTimeZone()
Set timezone in mysql so that timestamp fields show the correct time.
in CRM_Utils_System_Base at line 708
string|false|null
getTimeZoneOffset()
Get timezone from CMS.
at line 693
string
getTimeZoneString()
at line 654
mixed
getUniqueIdentifierFromUserObject(object $user)
at line 647
null|int
getUserIDFromUserObject(object $user)
Get User ID from UserFramework system (Joomla)
in CRM_Utils_System_Base at line 777
array
getUser(int $contactID)
Get an array of user details for a contact, containing at minimum the user ID & name.
at line 626
int|null
getLoggedInUfID()
at line 635
string|null
getLoggedInUniqueIdentifier()
in CRM_Utils_System_Base at line 824
int
getBestUFID(object $user = NULL)
Return a UFID (user account ID from the UserFramework / CMS system.
ID is based on the user object passed, defaulting to the logged in user if not passed.
Note that ambiguous situation occurs in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the user id before calling the function.
Note there is already a function getUFId which takes $username as a param - we could add $user as a second param to it but it seems messy - just overloading it because the name is taken.
in CRM_Utils_System_Base at line 844
string
getBestUFUniqueIdentifier(object $user = NULL)
Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.
This is based on the user object passed, defaulting to the logged in user if not passed.
Note that ambiguous situation occurs in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the unique identifier before calling the function.
in CRM_Utils_System_Base at line 857
array
getModules()
List modules installed in the CMS, including enabled and disabled ones.
at line 700
string|null
getUserRecordUrl(int $contactID)
in CRM_Utils_System_Base at line 878
bool
checkPermissionAddUser()
Is the current user permitted to add a user.
in CRM_Utils_System_Base at line 887
outputError(string $content)
Output code from error function.
in CRM_Utils_System_Base at line 896
logger(string $message)
Log error to CMS.
at line 714
appendCoreResources(array $list)
Append WP js to coreResourcesList.
in CRM_Utils_System_Base at line 911
setHttpHeader(string $name, string $value)
at line 721
array
synchronizeUsers()
at line 42
__construct()
at line 178
static
_showHTMLHead()
WP action callback.
at line 406
bool
loadBootStrap(string $name = NULL, string $pass = NULL)
Load wordpress bootstrap.