You are here

function _pcp_block_identifier in Profile Complete Percent 7

Helper function to retrieve the block identifier. Because block names cannot be longer than 32 characters, we make a md5 string if it's longer.

2 calls to _pcp_block_identifier()
pcp_block_info in ./pcp.module
Implements hook_block_info().
pcp_block_view in ./pcp.module
Implements hook_block_view().

File

./pcp.module, line 91
Allows users with valid permissions to tag profile fields (core fields or Profile2 fields) for a users profile to be considered complete.

Code

function _pcp_block_identifier($bundle) {
  $block_name = 'pcp_profile2_' . $bundle;
  if (strlen($block_name) > 32) {
    $block_name = md5($block_name);
  }
  return $block_name;
}