wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Add custom image sizes to media insert dialog box with image_size_names_choose

wordpress snippet

With this little snippet you can add custom image sizes to media insert dialog box. image_size_names_choose allows modification of the image size lists so that you can place a custom option within the media library.

read more

Prevent direct file access to functions.php

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will prevent direct file access to the functions.php file via the URL “http://wpsnipp.com/wp-content/themes/themename/functions.php” Great snippet from Pete over at swisswp.

read more

Reset options back to default with update_option

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will check if an option was updated by a user. If so, it will save it back to the default option you’ve set. Should work with almost any site option. (inspect element on input field and input’s “id” should be the “name” you need.)

read more
jqsnipp.com | we just launched jquery snippets website