Git Product home page Git Product logo

wordpress-image-crate's Introduction

WordPress Image Crate

Connects to external image APIs to display and download images via the core WordPress media modal.

Version 3 of the plugin has been completely rewritten to replicate core behavior within the modal.

Adding a Provider

Two things need to happen to add a provider. First, a JS controller needs to be added to assets/js/controllers and a new state has to be added to image-crate.manifest.js in the createStates() function.

Next, a provider needs to extend the abstract provider class and supply body for the required methods.

Notes

Tracking

Tracking can be enabled via class constant on a per provider basis. This will track image downloads and usage in post content. This is stored on the master site as a attachment post with tracking in post_meta. The meta_key for tracking in {provider}_usage.

WordPress hooks

  • save_post - The Usage_Tracking class is hooked in here to track if an image is used in post content and update it's attachment meta on the master site.

Getty Images

Getty images search by default in editorial mode. To search in premium mode, a option must be added to the site. WP CLI can be used for this.

Enabling premium access

  • wp --url=http://fansided.com option update fs_option_getty_access_type Premium

Disabling premium access

  • wp --url=http://fansided.com option update fs_option_getty_access_type Editorial

wordpress-image-crate's People

Contributors

sgreer81 avatar marissamcdonnell avatar martymulligan avatar austinbenerdy avatar andreaself avatar jtedrow87 avatar

Watchers

James Cloos avatar Betsy Cohen avatar Betty A Urquidi avatar  avatar FanSided avatar  avatar

wordpress-image-crate's Issues

Getty images not downloading on Beyond the Flag

After searching for images with a "#" at the end of the search term, the image never downloads. If the user does not use a "#" at the end of the search term, the desired images don't appear in the search results.

  • What function does the hash perform in the search?
  • Are the results of a search with a hash not available to FS?
  • Does Getty need to improve the search results on their end?

https://secure.helpscout.net/conversation/752462008/14742?folderId=2165941

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.