__( "Publish images on your website." ), ) ); } public function widget( $args, $instance ) { wp_enqueue_script( 'twoj-photo-gallery-lightbox-js', TWOJ_PHOTO_GALLERY_URL.'assets/js/2j-photo-gallery-lightbox.js', array( 'jquery' ), TWOJ_PHOTO_GALLERY_VERSION, false ); wp_enqueue_script( 'twoj-photo-gallery-script-js', TWOJ_PHOTO_GALLERY_URL.'assets/js/2j-photo-gallery-script.js', array( 'jquery' ), TWOJ_PHOTO_GALLERY_VERSION, false ); wp_enqueue_style( 'twoj-photo-gallery-css', TWOJ_PHOTO_GALLERY_URL.'assets/css/2j-photo-gallery-style.css', array(), TWOJ_PHOTO_GALLERY_VERSION, 'all' ); $photo_gallery_title = apply_filters( 'widget_title', $instance['2j-photo-gallery-title'] ); $photo_gallery_id = $instance['2j-photo-gallery-id']; $photo_gallery_columns = $instance['2j-photo-gallery-columns']; if(!$photo_gallery_columns) $photo_gallery_columns = 3; $photo_gallery_lightbox = $instance['2j-photo-gallery-lightbox']; echo $args['before_widget']; if( ! empty( $photo_gallery_title ) ){ echo $args['before_title'] . $photo_gallery_title . $args['after_title']; } echo ''; echo $args['after_widget']; } public function form( $instance ) { //print_r($instance); if ( isset( $instance[ '2j-photo-gallery-title' ] ) ) { $title = $instance[ '2j-photo-gallery-title' ]; } else { $title = __( 'Images' ); } if ( isset( $instance[ '2j-photo-gallery-id' ] ) ) { $galleries_id = $instance[ '2j-photo-gallery-id' ]; } else { $galleries_id = ' '; } if ( isset( $instance[ '2j-photo-gallery-columns' ] ) ) { $columns = $instance[ '2j-photo-gallery-columns' ]; } else { $columns = 3; } ?>

value='on' id="get_field_id( '2j-photo-gallery-lightbox' ); ?>" name="get_field_name( '2j-photo-gallery-lightbox' ); ?>" type="checkbox" >