Add custom list item to Breadcrumb NavXT

A client wanted an additional list item in his Breadcrumb NavXT

Came up with the following action in theme functions.php:

Advertisements

Put WordPress in maintenance mode without a plugin

1. In your web root directory (where the wp-config.php is located) create file .maintenance
2. It’s content should be <?php $upgrading = time();
3. You can customize the page by creating wp-content/maintenance.php

See sourceĀ https://github.com/WordPress/WordPress/blob/9041e7a07150b10ed28ec274374ce7d397b0ac9b/wp-includes/load.php#L203-L206

How to create .pot file from source code

I just learned how to create a .pot from https://wordpress.stackexchange.com/a/169282/33599

Checkout WordPress development branch via SVN which has a script for creating .pot file.

cd /tmp
svn co http://develop.svn.wordpress.org/trunk wordpress-svn
php wordpress-svn/tools/i18n/makepot.php wp-plugin PATH_TO_PLUGIN PATH_TO_PLUGIN/language/PLUGIN_NAME.pot

makepot.php help

Usage: php makepot.php PROJECT DIRECTORY [OUTPUT]

Generate POT file from the files in DIRECTORY [OUTPUT]
Available projects: generic, wp-frontend, wp-admin, wp-network-admin, wp-tz, wp-plugin, wp-theme, glotpress, rosetta, wporg-bb-forums, wporg-themes, wporg-plugins, wporg-forums, wordcamporg

Sorry, you are not allowed to access this page after wp-admin login

If you see the following text, Sorry, you are not allowed to access this page. after logging into WP admin.
Screen Shot 2017-08-27 at 17.30.52

Then you might have change the database prefix. Usermeta table contains
bz_capabilities
bz_user_level
bz_dashboard_quick_press_last_post_id

Where the prefix bz_ is the database prefix specified in wp-config.php

Proof from the source code at https://github.com/WordPress/WordPress/blob/dd46042e3c3b43c5ee3c17862213b0280fb5abfd/wp-includes/class-wp-user.php#L787