sanitizing/escaping plugin options

sanitize_text_field( $str ) Sanitize a string from user input or from the db. Checks for invalid UTF-8, Convert single < characters to entity, strip all tags, remove line breaks, tabs and extra white space, strip octets http://codex.wordpress.org/Function_Reference/sanitize_text_field

How do I add a menu item to a Pods admin menu?

To add submenu items to a specific Pod’s menu, try this: add_submenu_page( ‘pods-manage-your_pod_name’, ‘My submenu item page title’, ‘My submenu item’, ‘manage_options’, ‘pods-manage-your_pod_name-my-submenu-item’, ‘your_callback_function’ ); Do this during the admin_menu action in WordPress, or alternatively do it during the ‘pods_admin_menu’ action.

wp login redirect loop reauth=1

Plugins don’t live in the root directory, and they don’t include wp-load.php or the admin.php files directly. Plugins live in the wp-content/plugins directory, and have a specific form of header, and they don’t need to include anything because WordPress includes them. You’re doing it the wrong way around, basically. A plugin would not include/require WordPress’s … Read more

using wp_footer hook in a plugin

Firstly, remove the margin-left CSS property from your html and then try if it works. May be your html is being hidden behind any other html. Or better try this first – Remove the current code from your function and just write any non html thing. Then put a die() or exit() and see if … Read more

WordPress dynamic widget by location?

try to make a simpler code: change $side_bar= “‘$city-Right'”; to $side_bar= $city . ‘-Right’; you have extra ‘ in $side_bar, the way you’ve done would give you ‘Madurai-Right’ but you need Madurai-Right, this way dynamic_sidebar($side_bar) would be like writing dynamic_sidebar(“‘Madurai-Right'”) while you only need dynamic_sidebar(“Madurai-Right”) besides, always avoid variable substitution, concatenation is always more secure.

Quick press publish post hook

As Wyck said, it’s just a form that uses post.php. To check if QuickPress is the one making the call use: add_action( ‘publish_post’, ‘check_for_quickpress_wpse_109961’ ); function check_for_quickpress_wpse_109961( $post_id ) { if( ‘post-quickpress-publish’ == $_POST[‘action’] ) { // do_something(); } }