Wednesday, 6 January 2016

How to Clean up URL Query Arguments in WordPress Settings Pages

Source : How to Clean up URL Query Arguments in WordPress Settings Pages
Published On : January 06, 2016 at 01:28PM
By : Agbonghama Collins

I seldom use the Settings API for building my plugins admin pages because I love to be in control of layout and design.

When the form for configuring my plugin is saved successfully or an error occurred, I usually add a query parameter to the page URL handy in displaying an admin notice to that effect.

WordPress 4.2 release included a nifty feature that removes query parameters handy in displaying admin notices.…



For More Go to : W3Guy – A Geek's Diary

Labels:

Monday, 4 January 2016

Converting a jQuery Object to Native DOM Element

Source : Converting a jQuery Object to Native DOM Element
Published On : January 04, 2016 at 02:28PM
By : Agbonghama Collins

jQuery is a great JavaScript library that abstracts away the pain in HTML document transversal and manipulation, event handling, animation, and Ajax with an easy-to-use API that works across multiple browsers.

A need to convert a jQuery object to native DOM element may arise in your future project and the conversion is easy as calling get() method on the object likes so:

$("#hello").get(0)

The code above is equivalent to plain JavaScript document.getElementById( "hello" )

Without a parameter, .get() returns an array of all matched elements.…



For More Go to : W3Guy – A Geek's Diary

Labels: