Code Monkey home page Code Monkey logo

mhm-flickrsettings's Introduction

=== Plugin Name ===

Contributors: markhowellsmead Donate link: https://www.paypal.me/mhmli Tags: flickr, settings, options, get_option Requires at least: 4.0 Tested up to: 4.9.8 Stable tag: 1.3.2 License: GPL v3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html

Provides WordPress backend settings fields to store Flickr configuration information.

== Description ==

Install and activate the plugin as usual. The activated plugin adds three fields to the Media settings page in the admin area: key (flickr_key), secret (flickr_secret) and user ID (flickr_userid) for use with the Flickr API. The values saved to these fields can then be used via the WordPress get_option() function in a theme or unrelated plugin.

== Installation ==

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Add your Flickr user data using the fields available under Settings ยป Media.

== Changelog ==

= 1.3.2 =

  • Repository admin. No functional changes.

= 1.3.1 =

  • Repository admin. No functional changes.

= 1.3.0 =

  • Add code which allows the plugin to be translated.

= 1.2.0 =

  • Change functionality to store all settings from this plugin in a single wp_option entry in the database.

  • Add handler function to ensure that older values, stored in individual wp_option entries, are still found. (Thanks Ulrich!)

  • Ensure that all values are escaped using esc_attr.

= 1.1.1 =

  • Confirms compatibility with WordPress 4.6.

= 1.1.0 =

  • Sanitize input and output of field data.

= 1.0.3 =

  • Confirm compatibility with WordPress 4.5.2.
  • Correct version numbers.

= 1.0.2 =

  • Confirm compatibility with WordPress 4.5.
  • Update version number and add plugin URL to trunk.

= 1.0.1 =

  • Improve readme and plugin tags.

= 1.0 =

  • Initial version.

mhm-flickrsettings's People

Contributors

markhowellsmead avatar

Watchers

 avatar  avatar

mhm-flickrsettings's Issues

Store data as serialized array

This will break previous saved data; that will need to be handled when reading out data stored with a former version of the plugin.

Feedback

Hey Mark, I hope you don't mind me giving some feedback...

  • When you are saving the settings to the database the data is not being sanitized. You could do something simple like adding esc_attr so you have register_setting( 'media', 'flickr_key', 'esc_attr' ) or create your own function to check the key length and escape any html.
  • And then on the other side I would escape the data before output get_option( 'flickr_key' ) as you cannot trust the data from the database.
  • Have you thought about internationalizing the text?
  • So to not add multiple rows to the wp_options I would use a single option like mhm_flickr_settings and add the key, secret and user id in an array. Most of the time you will call all of the options at the same time. This way the settings are also protected from conflict as another plugin may define the same options names.

Let me know if you would like me to create a PR. ๐Ÿ˜„

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.