Simple field to display static data I am trying to do module with different share buttons in form of field to content type. It has no settings, I just need to enable it in admin panel and the button should appear on node. But I cannot get to work simple sample of code like this:

function fblike_field_info() {
    return array(
        'fblike' =&gt; array(
            'label' =&gt; t('Facebook Like'),
            'description' =&gt; t('This field displays Facebook Like button.'),
            'settings' =&gt; array(),
            'instance_settings' =&gt; array(),
            'default_widget' =&gt; 'fblike_default_widget',
            'default_formatter' =&gt; 'fblike_default_formatter',
        ),
    );
}

function fblike_field_widget_info() {
    return array(
        'fblike_default_widget' =&gt; array(
            'label' =&gt; 'Like Box',
            'field types' =&gt; array('fblike'),
        ),
    );
}

function fblike_field_formatter_info() {
    return array(
        'fblike_default_formatter' =&gt; array(
            'label' =&gt; t('Like Box (default)'),
            'field types' =&gt; array('fblike'),
        ),
    );
}

function fblike_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    $link = '&lt;div class="fb-like" data-href="HTTP://ENTER.YOUR.URL.HERE" data-width="80" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"&gt;&lt;/div&gt;';

    $element = array();
    $element[0] = array('#markup' =&gt; $link);

    return $element;
}


The result of this code is:

&lt;div class="field field-name-field-lubi-to field-type-fblike field-label-above"&gt;
    &lt;div class="field-label"&gt;Like:&amp;nbsp;&lt;/div&gt;
    &lt;div class="field-items"&gt;&lt;/div&gt;
&lt;/div&gt;


I already run out of ideas. I have created many modules with fields before, but none was that simple... Am I missing something?
Ok, got this. As far as my field has nothing in $items, in order to print something I had to use this snippet:

function fblike_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &amp;$items) {
    foreach ($entities as $id =&gt; $entity) {
        if (empty($items[$id])) {
            $items[$id][0] = 'something';
        }
    }
}