Newer
Older
* Also used by civicrm_wp_shortcode_includes() and _civicrm_update_user().
*
* @since 4.3
*/
function civicrm_wp_invoke() {
civi_wp()->invoke();
}
/**
* Method that runs only when civicrm plugin is activated.
*/
function civicrm_activate() {
civi_wp()->activate();
}
/**
* Set WordPress user capabilities.
*
* Function to create anonymous_user' role, if 'anonymous_user' role is not in
* the wordpress installation and assign minimum capabilities for all wordpress roles.
* This function is called on plugin activation and also from upgrade_4_3_alpha1().
*
* @since 4.3
*/
function civicrm_wp_set_capabilities() {
civi_wp()->users->set_wp_user_capabilities();
}
/**
* Callback function for add_options_page() that runs the CiviCRM installer.
*
* @since 4.3
*/
function civicrm_run_installer() {
civi_wp()->run_installer();
}
/**
* Function to get the contact type.
*
* @since 4.3
*
* @param string $default The contact type.
* @return string $ctype The contact type.
*/
function civicrm_get_ctype( $default = NULL ) {
return civi_wp()->users->get_civicrm_contact_type( $default );
}
/**
* Getter function for global $wp_set_breadCrumb.
*
* Called by appendBreadCrumb() in civicrm/CRM/Utils/System/WordPress.php
*
* @since 4.3
*
* @return string $wp_set_breadCrumb The breadcrumb markup.
*/
function wp_get_breadcrumb() {
global $wp_set_breadCrumb;
return $wp_set_breadCrumb;
}
/**
* Setter function for global $wp_set_breadCrumb.
*
* Called by appendBreadCrumb() in civicrm/CRM/Utils/System/WordPress.php
* Called by resetBreadCrumb() in civicrm/CRM/Utils/System/WordPress.php
*
* @since 4.3
*
* @param string $breadCrumb The desired breadcrumb markup.
* @return string $wp_set_breadCrumb The breadcrumb markup.
*/
function wp_set_breadcrumb( $breadCrumb ) {
global $wp_set_breadCrumb;
$wp_set_breadCrumb = $breadCrumb;
return $wp_set_breadCrumb;
}
/**
* Incorporate WP-CLI Integration.
*
* Based on drush civicrm functionality, work done by Andy Walker.
// Changed from __DIR__ because of possible symlink issues
include_once CIVICRM_PLUGIN_DIR . 'wp-cli/civicrm.php';
}