7 - How do I programmatically create a button, place it in a block, 'weight it' and then make it visible to certain pages?
Code I've tried:
function openid_connect_block_info() {
$blocks['openid_connect_login'] = array(
'info' => t('Login Using PixelPin'),
'cache' => DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE,
'region' => 'content',
'pages' => 'user/',
);
$blocks['openid_connect_register'] = array(
'info' => t('Register Using PixelPin'),
'cache' => DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE,
'region' => 'content',
'pages' => '/user/register',
);
return $blocks;
}
This code creates the button but doesn't put it under the content block and doesn't make it only visible on the specified pages.