parent = -1; $this->row = 0; $this->column = 0; $this->order = 0; } public function output( $post, $args = array() ) { if( !$this->output_block( $post, $args ) ) return ''; $this->add_style( 'position', '' ); // Make sure position is handled by Isotope // Default arguments $args['desktop'] = true; $args['max_width'] = 9999; $args['max_height'] = 9999; $args['max_width'] = $this->max_width && $args['max_width'] > $this->max_width ? $this->max_width : $args['max_width']; $args['max_height'] = $this->max_height && $args['max_height'] > $this->max_height ? $this->max_height : $args['max_height']; if( isset( $args['classes'] ) ) { $this->classes = $args['classes']; } $custom_link = trim( get_post_meta( $post->ID, 'wpupg_custom_link', true ) ); $image = get_post_thumbnail_id( $post->ID ); $image_url = $image ? wp_get_attachment_url( $image ) : ''; $output = $this->before_output(); ob_start(); ?>