Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created September 9, 2018 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmark/2b2d24676e400419887533624d45043e to your computer and use it in GitHub Desktop.
Save wpmark/2b2d24676e400419887533624d45043e to your computer and use it in GitHub Desktop.
Example function return run through a WordPress filter.
<?php
/**
* Gets the username of the logicmelon feed as set on the plugins
* settings page in the admin.
*
* @return string the username of the feed or empty string if not set.
*/
function hdji_get_username() {
return apply_filters( 'hdji_get_username', get_option( 'hdji_username' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment