__('Left background image with headline and text to the right', 'fivehundred')), array('width' => 400)); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ function widget($args, $instance) { if (!empty($instance)) { $title = $instance['title']; $text = html_entity_decode($instance['text']); if (isset($instance['image'])) { $image = html_entity_decode($instance['image']); } else { $image = ''; } if (isset($instance['padding_top'])) { $padding_top = html_entity_decode($instance['padding_top']); } else { $padding_top = ''; } if (isset($instance['padding_bottom'])) { $padding_bottom = html_entity_decode($instance['padding_bottom']); } else { $padding_bottom = ''; } if (isset($instance['text_color'])) { $text_color = html_entity_decode($instance['text_color']); } else { $text_color = ''; } if (isset($instance['custom_class'])) { $custom_class = html_entity_decode($instance['custom_class']); } else { $custom_class = ''; } echo '
'; echo '

'.$title.'

'; echo '
'.$text.'
'; } } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ function form($instance) { if (isset($instance['image'])) { $image = $instance['image']; } if (isset($instance['text'])) { $text = $instance['text']; } if (isset($instance['title'])) { $title = $instance['title']; } if (isset($instance['padding_top'])) { $padding_top = $instance['padding_top']; } if (isset($instance['padding_bottom'])) { $padding_bottom = $instance['padding_bottom']; } if (isset($instance['text_color'])) { $text_color = $instance['text_color']; } if (isset($instance['custom_class'])) { $custom_class = $instance['custom_class']; } $form = '

'; $form .= '

'; $form .= '

'; $form .= ''; $form .= ''; $form .= ''; $form .= '

'; $form .= '

'; $form .='

'; $form .= '
'.__('Numbers only, measured in pixels.', 'fivehundred').'

'; $form .= ''; $form .='