This is just one of the many possible scenarios on how to change a function in a WordPress plugin, but let me show you a real world example from Easy Property Listings, a really great and customizable real estate plugin. My client wanted to remove the <a> element from featured image on single property listing page. The thing was that if you click on that image, it would take you to that same post anyway, so having a link there was a redundant thing to have.
So this is the scenario - you have this text on your website and would like to have a button that would allow the visitor to copy the text into clipboard using one click, without requiring them to select the text manually. Thankfully, there is a clipboard.js library, allowing us to perform different kinds of scenarios easily. Let me show you one of the examples, implemented into WordPress.
The answer to how to add description into WordPress menu items is - easy :). All you need to do is extend walker class using nav_menu_item_title() filter which came with WordPress 4.4. So basically, all we need to do is to add $item->description where appropriate, which means inside the start_el() function which generates the menu link.
Genesis framework is among the most popular frameworks for rapid WordPress theme development. Whether it is the best one is out of the question – there is no "best" when it comes to development of any kind. What is excellent for one purpose could be completely useless for another purpose.
Read my full post published on official Codeable blog.
Modernizr can do lots of things - one of them is the ability to mix media query function with jQuery functions. Although there are other ways to achieve this, even (or especially) within jQuery itself, if using Modernizr for some other things on your website, you can try something like the following:
and finally some HTML:
If this piece of HTML is loaded on resolution below 480px, .myClass will be added.
This could be one of the shortest tutorials ever, but still, some may find it useful - in order to activate the ability of regular text widgets to render shortcodes, all that needs to be done is the following: