ARTICLE

WordPress Plugins: GitHub and Biography

In this article I want to present two (very) simple Wordpress Plugins used on my personal page. Wordpress User Biography is used to enable authors add regular status messages, so called “Biography Parts”. In contrast, Wordpress Github allows to easily include the latest commits and releases of GitHub repositories using shortcodes.

Lately, I have been busy working on my personal webpage to

replace the "Biographical Info" field by regular status updates - similar to timeline updates on popular social networks,

and integrate GitHub (that is, show latest commits from several repositories),

The result are two (very) simple WordPress Plugins. Although these are far from stable, I want to share these plugins.

WordPress User Biography

WordPress "User Biography" complements the "Biographical Info" section of each WordPress author profile by an extra "Biography" section. Each author may add regular status messages consisting of a date and text, see figure 1. These status messages can easily be integrated into WordPress templates.

Installation is accomplished by creating a new folder user-biography within wp-content/plugins and copying the downloaded files (mainly user-biography.php) into wp-content/plugins/user-biography. The plugin can be activated in "Plugins" > "Installed Plugins".

Usage. Basic usage is illustrated by figure 1. A "Biography Part" can be added by checking "Add Biography Part" and adding the corresponding text. By clicking "Update profile", the "Biography Part" will be added and all other changes to the profile will be saved. Now, the "Biography Part" will occur directly under the "Add Biography Part" field - the date and text can be changed.

Theme integration. The created "Biography Parts" can easily be integrated into any WordPress Theme. For example, in author.php the following code snippet could be used:

Both examples are taken from my personal template (which is also available on GitHub).

WordPress GitHub

The WordPress GitHub plugin uses a GitHub PHP client available on GitHub: tan-tan-kanarek/github-php-client. Currently, the plugin allows to display the latest commits of a collection of repositories hosted on GitHub. The plugin is available on GitHub and the latest commits are shown below:

Installation. The plugin can be installed by copying the downloaded files to wp-content/plugins/wordpress-github and activating the plugin using "Plugins" > "installed Plugins".

Settings. Usually, without authentication, GitHub limits the number of requests to the GitHub API. This may be problematic; therefore, in "Settings" > "GitHub", the plugin allows to enter GitHub username and password.

Note: The password is currently saved as plain text in the WordPress database. I intend to allow the usage of GitHub API tokens which can be created on GitHub under "Edit profile" > "Applications" > "Personal access tokens". Then, the token is entered as username and the password is left empty. However, currently this authentication option is not working.

Usage. The plugin provides several shortcodes:

The shortcode github-commits can be used to display the latest commits of a set of repositories:

Templates. As indicated above, the plugin is based on templates. As my personal webpage is based on Twitter Bootstrap, two templates are provided: default (by omitting the template parameter) and bootstrap. The templates can be adapted in wp-content/plugins/wordpress-github/wordpress-github.php:

ABOUTTHEAUTHOR

In September, I was honored to receive the MINT-Award IT 2018, sponsored by ZF and audimax, for my master thesis on weakly-supervised shape completion. For CVPR 2019, however, I am working on a different topic: adversarial robustness and generalization of deep neural networks.
18thOCTOBER2018 , David Stutz

What is your opinion on this article? Did you find it interesting or useful? Let me know your thoughts in the comments below: