* Shows this block by default, but lets individual users hide it.
* Shows this block by default, but lets individual users hide it.
*/
define('BLOCK_CUSTOM_ENABLED',1);
...
...
@@ -59,6 +59,7 @@ function block_help($path, $arg) {
$output.='<dd>'.t('Users with the <em>Administer blocks</em> permission can <a href="@block-add">add custom blocks</a>, which are then listed on the <a href="@blocks">Blocks administration page</a>. Once created, custom blocks behave just like default and module-generated blocks.',array('@blocks'=>url('admin/structure/block'),'@block-add'=>url('admin/structure/block/add'))).'</dd>';
$output.='</dl>';
return$output;
case'admin/structure/block/add':
return'<p>'.t('Use this page to create a new custom block.').'</p>';
}
...
...
@@ -189,6 +190,7 @@ function _block_themes_access($theme) {
* @param $theme
* The theme whose blocks are being configured. If not set, the default theme
* is assumed.
*
* @return
* The theme that should be used for the block configuration page, or NULL
* to indicate that the default theme should be used.
...
...
@@ -283,8 +285,7 @@ function block_page_build(&$page) {
// Append region description if we are rendering the regions demo page.
@@ -316,6 +316,21 @@ function field_help($path, $arg) {
}
}
/**
* Implements hook_permission().
*/
functionfield_permission(){
returnarray(
'administer fields'=>array(
'title'=>t('Administer fields'),
'description'=>t('Additional permissions are required based on what the fields are attached to (for example, <a href="@url">administer content types</a> to manage fields attached to content).',array(
'allowed_values'=>array(0=>'Zero',1=>'One',2=>'Some <script>dangerous</script> & unescaped <strong>markup</strong>',3=>'Some HTML encoded markup with < & >'),
),
);
$this->card_1=field_create_field($this->card_1);
...
...
@@ -54,7 +54,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
'#description'=>t('If the summary is not set, the trimmed %label field will be shorter than this character limit.',array('%label'=>$instance['label'])),
'#required'=>TRUE,
);
}
...
...
@@ -245,7 +247,7 @@ function text_field_formatter_settings_summary($field, $instance, $view_mode) {