Code Monkey home page Code Monkey logo

wp-functions's Issues

Custom Login Logo URL locaiton?

After setting the custom logo (that works thanks!) it still links to wordpress.org, can this be set with the same function? if not how can we do it?

"Modify jQuery" section is incorrect

The "Modify jQuery" function is doing it wrong. See "Notes" section for the wp_register_script() function documentation:

The function should be called using the wp_enqueue_scripts action hook if you want to call it on the front-end of the site. To call it on the administration screens, use the admin_enqueue_scripts action hook. For the login screen, use the login_enqueue_scripts action hook. Calling it outside of an action hook can often lead to unexpected results and should be avoided.

You can get some additional insight from the old blog post by Pippin here as well.

In short, registering, and even more - enqueueing scripts on init hook is wrong. I'll submit a PR covering all cases when I get a minute. Also, it may conflict with #30

"Change Media Gallery URL" used incorrectly

Usage of the hidden option upload_url_path isn't explained. People will assume it needs to be added to functions.php, as usual. It will work, but you'll be overwriting the option on every page load, which is just wrong.

There's 2 ways to deal with it - wrap the option update into check for existing option value, or (better) modify the upload url via hook. This option was removed from the media options screen long time ago and may be removed completely in the future. Relying on it isn't safe and future-proof.

I'll submit a PR with a better way of doing it soon.

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.