atts['density'] ) ) { $density['desktop'] = $this->atts['density']; $density['tablet'] = $this->atts['density']; $density['mobile'] = $this->atts['density']; } else { $density['desktop'] = get_option( 'mgl_tiles_density', 'high' ); $density['tablet'] = get_option( 'mgl_tiles_density_tablet', 'medium' ); $density['mobile'] = get_option( 'mgl_tiles_density_mobile', 'low' ); } wp_localize_script('mgl-js', 'mgl_settings', array( 'disable_right_click' => !get_option( 'mgl_right_click', false ), 'tiles' => array( 'density' => $density ) ) ); wp_enqueue_style( 'mgl-css', plugins_url( '/app/style.min.css', __DIR__ ), null, $cache_buster ); } /* For Yoast SEO */ function wpseo_siteimap( $images, $post_id ) { $galleries = get_post_galleries( $post_id ); $images_ids = array(); foreach ( $galleries as $gallery ) { preg_match_all( '/wp\-image\-([0-9]{1,16})/', $gallery, $matches ); if ( !empty( $matches ) ) { foreach ( $matches[1] as $id ) array_push( $images_ids, $id ); } } $images_ids = array_unique( $images_ids ); foreach ( $images_ids as $id ) { array_push( $images, array( 'src' => wp_get_attachment_url( $id ), 'title' => get_the_title( $id ), 'alt' => get_post_meta( $id, '_wp_attachment_image_alt', true ) ) ); } return $images; } } ?>