Example #1
0
/**
 * Helper function for returning the Help Sidebar content.
 *
 * @since  1.4.0
 *
 * @uses   ddw_gwfoot_plugin_get_data()
 *
 * @param  $gwfoot_help_sidebar_content
 *
 * @return string HTML content for help sidebar.
 */
function ddw_gwfoot_help_sidebar_content()
{
    $gwfoot_help_sidebar_content = '<p><strong>' . __('More about the plugin author', 'genesis-widgetized-footer') . '</strong></p>' . '<p>' . __('Social:', 'genesis-widgetized-footer') . '<br /><a href="http://twitter.com/deckerweb" target="_blank" title="@ Twitter">Twitter</a> | <a href="http://www.facebook.com/deckerweb.service" target="_blank" title="@ Facebook">Facebook</a> | <a href="http://deckerweb.de/gplus" target="_blank" title="@ Google+">Google+</a> | <a href="' . esc_url(ddw_gwfoot_plugin_get_data('AuthorURI')) . '" target="_blank" title="@ deckerweb.de">deckerweb</a></p>' . '<p><a href="' . esc_url(GWFOOT_URL_WPORG_PROFILE) . '" target="_blank" title="@ WordPress.org">@ WordPress.org</a></p>';
    return apply_filters('gwfoot_filter_help_sidebar_content', $gwfoot_help_sidebar_content);
}
 *
 * @since  1.3.0
 *
 * @uses   is_admin()
 * @uses   get_plugins()
 * @uses   plugin_basename()
 *
 * @param  $gwfoot_plugin_value
 * @param  $gwfoot_plugin_folder
 * @param  $gwfoot_plugin_file
 *
 * @return string Plugin data.
 */
function ddw_gwfoot_plugin_get_data($gwfoot_plugin_value)
{
    /** Bail early if we are not in wp-admin */
    if (!is_admin()) {
        return;
    }
    /** Include WordPress plugin data */
    if (!function_exists('get_plugins')) {
        require_once ABSPATH . 'wp-admin/includes/plugin.php';
    }
    $gwfoot_plugin_folder = get_plugins('/' . plugin_basename(dirname(__FILE__)));
    $gwfoot_plugin_file = basename(__FILE__);
    return $gwfoot_plugin_folder[$gwfoot_plugin_file][$gwfoot_plugin_value];
}
// end of function ddw_gwfoot_plugin_get_data
/** Set plugin version */
define('GWFOOT_VERSION', ddw_gwfoot_plugin_get_data('Version'));