Giter VIP home page Giter VIP logo

oembed-gist's Introduction

oembed-gist's People

Contributors

keldigitalcube avatar miya0001 avatar wokamoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oembed-gist's Issues

WordPress 4.0

Hi,

Just letting you know this doesn't work with WordPress 4.0. When enabled, my posts that have embedded gists are just a blank white page. When disabled my post displays correctly.

Thanks for the awesome plugin!
Luca

Regex won't match if gist URL has a trailing slash

If the gist URL has a trailing slash at the end(or just before the #) it won't be picked up by this plugin.

The current regex pattern is:

private $regex = '#(https://gist.github.com/([^\/]+\/)?([a-zA-Z0-9]+)(\/[a-zA-Z0-9]+)?)(\#file(\-|_)(.+))?$#i';

To account for the possible trailing slash I'd suggest changing it to:

#(https://gist.github.com/([^\/]+\/)?([a-zA-Z0-9]+)(\/[a-zA-Z0-9]+)?)/?(\#file(\-|_)(.+))?$#i

Wordpress 4.1 2015 theme compatibility

Hello, I wonder if this plugin is compatible with the 2015 or Twelve Fifteen theme default wordpress theme that is shipped in 4.1.

This is how it looks, no modifications to the theme whatsoever:

screenshot from 2015-01-11 19 55 38

I think it's something to do with the default styling of the theme for TD table elements, maybe overriding the default theme style would help? AFAIK this code is just embeded version of github own's html generated code right?

Warn the user when gist.github is blocked by proxy

Hey,

Love the plugin so far.

Gist.github.com is listed as a forbidden website by one of my clients proxy. (Why I'll never understand)
The plugin doesn't display anything where the gist is usually embedded.

Could the plugin display the code as text in this case ? (I'm guessing it's not possible)
If not, could the plugin add a frame showing gist.github is blocked by proxy?
Right now it just looks like the blog post is missing content which looks unprofessional.

Regards,
Cedric

WordPress 5

Hi,

There seems to be an issue with the new WordPress Update (Version 5)

Scroll Window

I really like this but I need it to offer the ability to have a maximum size, scrollable window. Any chance?

Open links in new tab

Hi, would it be possible to add an option to make the href's open in a new window/tab instead of redirect on the same page? Thanks for the plugin, really cool.

Add CSS only when needed

The wp_head() function adds CSS for every page.
I suggest that the CSS is added to the footer and only when needed.

I think that the solution is to add something like the following to the end of the shortcode() function, just before the 'return sprintf' line:

add_action( 'wp_footer', array( $this, 'wp_head' ) );

I would also like to be able to disable the function - I would instead add the CSS to my own stylesheet.
I think that a static variable is required.

I will try to create a pull request to achieve both of these.

oEmbed Gist generating 404 errors for "style.min.css"

Greetings,

After the latest update, I started to notice 404 errors on any page where I had a gist embedded. The address was something like this:

https://domain.com/oembed-gist/css/style.min.css

On further inspection of the code, I noticed that oembed-gist.php was refactored to call the style/script whenever a gist was present. None the less, I noticed this on line 117-123:

wp_enqueue_script( 'oembed-gist', plugins_url( 'js/script.min.js', __FILE__ ), array(), self::version, true );

After looking at the plugins_url function codex (https://codex.wordpress.org/Function_Reference/plugins_url), it seems that it should be instead something like this:

plugins_url( 'js/script.min.js', dirname(__FILE__) ),

I tested it on my install and the errors are gone for now.

Allow disabling of injected CSS

This is related to my request in issue #17 to allow disabling the wp_head() function.

I would like to disable the wp_head() function and put the CSS into my stylesheet file.
I suggest using apply_filters().

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.