taniarascia / wp-functions Goto Github PK
View Code? Open in Web Editor NEWA compilation of function snippets for WordPress developers who create their own themes.
License: MIT License
A compilation of function snippets for WordPress developers who create their own themes.
License: MIT License
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?
When removing emojis, the DNS prefetch for emojis (<link rel='dns-prefetch' href='//s.w.org' />
) should also be removed. This can be accomplished by adding the following line to function disable_wp_emojicons()
:
add_filter( 'emoji_svg_url', '__return_false' );
Found this on wordpress.stackexchange
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.