• This repository has been archived on 24/Sep/2019
  • Stars
    star
    115
  • Rank 300,183 (Top 7 %)
  • Language
    PHP
  • Created about 11 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

❌ A WordPress widget for showing your latest Instagram photos.

WP Instagram Widget

WP Instagram Widget

About

WP Instagram widget is a no fuss WordPress widget to showcase your latest Instagram pics. It does not require you to provide your login details or sign in via oAuth.

The widget is built with the following philosophy:

  • Use sensible and simple markup
  • Provide no styles/css - it is up to you to style the widget to your theme and taste
  • Cache where possible - filters are provided to adjust cache timings
  • Require little setup - avoid oAuth for example

Installation

To install this plugin:

  • Upload the wp-instagram-widget folder to the /wp-content/plugins/ directory
  • Activate the plugin through the 'Plugins' menu in WordPress
  • That's it!

Alternatively you can search for the plugin from your WordPress dashboard and install from there.

Visit WordPress.org for a comprehensive guide on in how to install WordPress plugins.

Hooks & Filters

The plugin has five filters. The first allows you adjust that cache time for retrieving the images from Instagram:

add_filter('null_instagram_cache_time', 'my_cache_time');

function my_cache_time() {
	return HOUR_IN_SECONDS;
}

The second allows you to filter video results from the widget:

add_filter('wpiw_images_only', '__return_true');

The rest allow you to add custom classes to the [ul] list container, each list item, link or image:

add_filter( 'wpiw_list_class', 'my_instagram_class' );

add_filter( 'wpiw_item_class', 'my_instagram_class' );
add_filter( 'wpiw_a_class', 'my_instagram_class' );
add_filter( 'wpiw_img_class', 'my_instagram_class' );
add_filter( 'wpiw_linka_class', 'my_instagram_class' );

function my_instagram_class( $classes ) {
	$classes = "instagram-image";
	return $classes;
}

In version 1.3 you also have two new hooks for adding custom output before and after the widget:

wpiw_before_widget
wpiw_after_widget

In version 1.4 and above you can also customise the image loop completely by creating a parts/wp-instagram-widget.php file in your theme.

In version 1.9.6 you can now use a filter to change the location of your custom template part: wpiw_template_part.

Frequently Asked Questions

...

Changelog

2.0.4

  • Should help fix the instagram did not return a 200 issue (for now)
  • Allow plugin to be updated via https://github.com/afragen/github-updater
  • rel="noopener" on target blank setting
  • www all the things
  • Use JSON endpoints

2.0.3

  • New JSON on the Instagram end, fixes broken usernames
  • Support same tag and username

2.0.2

  • Use image sizes from JSON due to errors loading images

2.0.1

  • Fix hashtag support

2.0.0

  • Ability to track tags / hashtags instead of just usernames (e.g. #cheese)
  • New filter for custom link class
  • Bundle German language (props jensteichert)
  • Other minor fixes and formatting

1.9.8

  • Return more items when using filter for images only

1.9.7

  • Fix double trailing slash on custom text link

1.9.6

  • Trailing slash all URLs to support Instagram app on iOS
  • Support selective refresh in 4.5
  • New filter for wpiw_template_part

1.9.5

  • Another fix for image URL handling, I think we have all the edge cases now!

1.9.4

1.9.3

  • Fix issues introduced in the last version (apologies). Certain CDN URLs are still in use

1.9.2

  • Better handling of all image and video image URLs props @thegallagher

1.9.1

  • Fix bug with some image URLs

1.9

  • WordPress.com VIP checked
  • Updated CDN matching to ensure correct image sizes are served at all times
  • Shortened the transient key - should mean we bump into the character limit less often
  • Remove use of extract

1.8.1

  • Apologies for all the recent updates, all good things though!
  • Update plugin text domain ready for translate.wordpress.org
  • Introduce an 'original' image size if you want to use non-square originals
  • Introduce new filter for <ul> class wpiw_list_class

1.8

  • Bring back image captions
  • Fix small PHP error in 1.7

1.7

  • Bring back image sizes
  • Use thumbnails that are square (originals are in the data returned and can be used)
  • Remove @ from usernames

1.6

  • Compatibility with 4.3

1.5.1

  • Invalidate old transients

1.5

  • Remove null framework support
  • Fix breaking change by Instagram whilst maintaining old style support
  • Remove thumbnail size option

1.4

  • Introduce class filters
  • Only set a transient if images are returned
  • Optional template part for complete output control

1.3.1

  • Force lowercase usernames
  • Correct hook name

1.3

  • Option to open links in new window
  • Support for video items (with filter to disable this)
  • New actions for adding custom output to the widget
  • Support for https://
  • Correctly escape attributes

1.2.1

  • Change transient name due to data change

1.2

  • Better error handling
  • Encode emoji as they cause transient issues

1.1

  • Fix issue with Instagram feed
  • Add composer.json

1.0

  • Initial release

More Repositories

1

mobble

βœ… WordPress plugin that provides conditional functions for detecting a variety of devices.
PHP
85
star
2

v1.scott.ee

βœ… My website built with nuxt.js and statically generated from WordPress.
SCSS
58
star
3

null

❌ WordPress parent or starter theme framework.
PHP
43
star
4

responsible

βœ… Viewport resizing for the WordPress admin bar.
PHP
17
star
5

ham

βœ… Podman powered home automation. Home Assistant, Node-RED, Pi-Hole, MQTT, Caddy and more...
15
star
6

instant-search-suggest

βœ… Instant WordPress search with search suggestions for tags, categories and titles.
PHP
9
star
7

wp-ajax-search-widget

βœ… Search your WordPress site using this inline ajax search widget.
PHP
8
star
8

notifyslack

βœ… node.js app to send your personal WordPress.com notifications to a Slack room.
JavaScript
7
star
9

nimbus

βœ… A WiFi weather station built upon a Spark Core.
C++
5
star
10

solar-host

βœ… Solar hosting with a Raspberry Pi Zero.
Python
5
star
11

sparky

βœ… Spark Core for WordPress.
PHP
2
star
12

fillet

βœ… Safely embed IFrames in the WordPress text editor.
PHP
2
star
13

watz

βœ… A WiFi smart meter / pulse counter built upon a Particle Photon.
C++
2
star
14

glug

❌ A starting point for Gulp and Bower projects.
JavaScript
1
star
15

null-child

❌ Starter child theme for the null WordPress framework.
PHP
1
star
16

wp-perfbar

βœ… PerfBar for WordPress http://lafikl.github.io/perfBar/.
JavaScript
1
star
17

elva

βœ… A multilingual, clean, green 11ty starter theme.
Nunjucks
1
star
18

cookie-muncher

❌ EU Cookie Muncher plugin for WordPress.
CSS
1
star