Flickr account and request your API key. Then simply enter your data in settings below.
Requested Flickr image thumbnail size is 75x75px, so for some templates you need to change default size of them, you can do this in right sidebar options "Thumbnails,tabs,bullets" -> "Thumbnail Width" and "Thumbnail Height.', 'new_royalslider'); ?>


'api_key', 'label' => __( 'Flickr API key', 'new_royalslider' ), 'desc' => __( 'API key', 'new_royalslider' ), 'type' => 'text', 'default' => '', 'data-type' => 'str', 'size' => 'short', 'ignore' => true ), array( 'desc' => __( 'Your Flickr API key.', 'new_royalslider' ) ), array( 'name' => 'photoset_id', 'label' => __( 'Flickr photoset (album) ID', 'new_royalslider' ), 'desc' => __( '', 'new_royalslider' ), 'type' => 'text', 'default' => '', 'data-type' => 'str', 'size' => 'short', 'ignore' => true ), array( 'desc' => __( 'Any Flickr photoset ID', 'new_royalslider' ), 'delimiter' => true ), array( 'name' => 'max_items', 'label' => __( 'Maximum items', 'new_royalslider' ), 'desc' => __( 'Maximum items to fetch from Flickr', 'new_royalslider' ), 'type' => 'number', 'default' => '10', 'data-type' => 'num', 'size' => 'short', 'ignore' => true ), array( 'desc' => __( 'Maximum number of items to include in slider.', 'new_royalslider' ) ), array( 'name' => 'medSize', 'label' => __( 'Image size', 'new_royalslider' ), 'desc' => __( '', 'new_royalslider' ), 'type' => 'select', 'data-type' => 'str', 'options' => array( '' => __('500 on longest side', 'new_royalslider'), '_z' => __('640 on longest side', 'new_royalslider'), '_c' => __('800 on longest side', 'new_royalslider'), '_b' => __('1024 on longest side', 'new_royalslider') ), 'default' => 'image', 'ignore' => true ), array( 'desc' => __( 'Size of default main slider image', 'new_royalslider' ) ) ); if( isset($curr_options) && isset($curr_options['flickr']) ) { $flickr_opts = $curr_options['flickr']; $fields = NewRoyalSliderOptions::parseCurrentOptions($fields, $flickr_opts); } echo '
'; echo '

' . __('Flickr Settings', 'new_royalslider') .'

'; foreach ( $fields as $key => $field ) { echo NewRoyalSliderOptions::get_field_html($field, 'flickr'); } echo '
'; } public static function get_data($slides, $options, $type) { if($type === 'flickr') { if(isset($options['flickr'])) { // Array // ( // [api_key] => 123 // [photoset_id] => 123 // [max_items] => 20 // [medSize] => b // ) $flickr_options = $options['flickr']; $data = array( 'method' => 'flickr.photosets.getPhotos', 'photoset_id' => $flickr_options['photoset_id'], 'api_key'=> $flickr_options['api_key'], 'per_page' => $flickr_options['max_items'], 'format'=>'php_serial', 'extras' => 'url_t' ); $url = 'https://api.flickr.com/services/rest/?'.http_build_query($data); $rsp = wp_remote_request($url); if ( !$rsp || is_wp_error( $rsp ) || 200 != $rsp['response']['code']) { return __('There was a problem with request. Please check Flickr settings and try again.', 'new_royalslider'); } $rsp = $rsp['body']; $rsp_obj = unserialize($rsp); if(isset($rsp_obj['code'])) { return ' Flickr Responded: "'.$rsp_obj['message'] . '"'; } $images = array(); if(isset($rsp_obj['photoset']) ) { foreach($rsp_obj['photoset']['photo'] as $key => $value) { $def_thumb_url = $value['url_t']; $image = &$images[$key]; $image['image'] = str_replace('_t', $flickr_options['medSize'], $def_thumb_url); $image['thumbnail'] = str_replace('_t', '_s', $def_thumb_url); $image['large_image'] = str_replace('_t', '_b', $def_thumb_url); $image['title'] = $value['title']; //$image['link'] = } } return $images; } // } return $slides; } }