dotherightthing / wpdtrt-gallery

Gallery viewer which supports images, panoramas, maps, SoundCloud and Vimeo
1 stars 0 forks source link

Exif plugin not integrated correctly #42

Open dotherightthing opened 6 years ago

dotherightthing commented 6 years ago

    /**
     * Plugin dependencies
     *
     * @see https://github.com/dotherightthing/wpdtrt-plugin-boilerplate/wiki/Options:-Adding-WordPress-plugin-dependencies Options: Adding WordPress plugin dependencies
     */
    $plugin_dependencies = array(
        // Dependency: Gallery viewer is initialised as sections are scrolled into view
        array(
            'name'         => 'DTRT Content Sections',
            'slug'         => 'wpdtrt-contentsections',
            'source'       => 'https://github.com/dotherightthing/wpdtrt-contentsections/releases/download/0.1.7/release.zip',
            'version'      => '0.1.7',
            'external_url' => 'https://github.com/dotherightthing/wpdtrt-contentsections',
            'required'     => true,
        ),
        array(
            'name'         => 'DTRT EXIF',
            'slug'         => 'wpdtrt-exif',
            'source'       => 'https://github.com/dotherightthing/wpdtrt-exif/releases/download/0.1.11/release.zip',
            'version'      => '0.1.11',
            'external_url' => 'https://github.com/dotherightthing/wpdtrt-exif',
            'required'     => true,
        ),
        array(
            'name'     => 'Regenerate Thumbnails',
            'slug'     => 'regenerate-thumbnails',
            'required' => false,
        ),
    );

...
        // Geolocation
        // Could this be replaced by simply looking up the custom field?

        if ( function_exists( 'wpdtrt_exif_get_attachment_metadata' ) ) {
            $attachment_metadata       = wpdtrt_exif_get_attachment_metadata( $id );
            $attachment_metadata_gps   = wpdtrt_exif_get_attachment_metadata_gps( $attachment_metadata, 'number' );
            $link_options['latitude']  = $attachment_metadata_gps['latitude'];
            $link_options['longitude'] = $attachment_metadata_gps['longitude'];
        }
dotherightthing commented 6 years ago

See https://github.com/dotherightthing/wpdtrt-plugin-boilerplate/issues/141