şu şekilde denermisin hocam;
class GazeteBilesen extends WP_Widget {
function __construct() {
parent::__construct(
'gazete_bilesen',
'Gazete Bileşeni',
array( 'description' => 'Yan bölüm için Gazete bileşeni.' )
);
}
public function widget( $args, $instance ) {
$title = apply_filters( 'widget_title', $instance['title'] );
echo $args['before_widget'];
if ( ! empty( $title ) ) {
echo $args['before_title'] . $title . $args['after_title'];
}
?>
<!-- Gazete iframe kodu -->
<div style="width: 300px; height: 225px; overflow: hidden;"><iframe width="300" height="225" src="http://www.butungazetemansetleri.com/gazeteler-kodu.php" frameborder="0" scrolling="no"></iframe>
<br /><a href="http://www.butungazetemansetleri.com/" title="Gazete Manşetleri">Gazete Manşetleri</a></div>
<!--# Gazete iframe kodu -->
<?php echo $args['after_widget'];
}
public function form( $instance ) {
if ( isset( $instance[ 'title' ] ) ) {
$title = $instance[ 'title' ];
}else{
$title = 'Gazete';
}
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>">Başlık</label>
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
</p>
<?php
}
public function update( $new_instance, $old_instance ) {
$instance = array();
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
return $instance;
}
}
add_action('widgets_init', function(){
register_widget('GazeteBilesen');
});
direk kopyala yapıştır yaptım bu hatayı verdi hocam
Parse error: syntax error, unexpected '}' in /home/corum/public_html/tema/wp-content/themes/habertemam/lib/bilesenler/yan/gazeteler.php on line 24