WP Link Pages Extended

Construction

The entire plugin is contained in a class definition, and is initialized through the __construct() function.

In order for the viewall URL parameter to be returned, it needed to be defined as a valid query parameter.

Internationalization

Internationalization was performed as a demonstration of the power of WordPress internationalization.

There are only eight words or phrases that need to be translated: “First”, “Last”, “Next”, “of”, “Page”, “Prev”, “View All” and “View Pages”.

Notes

  • No attempt was made to style the links so they retain the parent theme styling.
  • There is an error on the wp_link_pages reference page that had my head whirling for several minutes wondering where the separators were during testing before I finally realized it. The reference page lists the array element as being spelled ‘Seperator’ while the actual array element is correctly spelled in the example as ‘separator’.
Share
The short URL of the present article is: http://www.terryobrien.me/g3w0j

Page 6 of 6
First | Prev | 1 | 2 | 3 | 4 | 5 | 6 | Next | Last
View All