Skip to content

Commit

Permalink
Merge branch 'release-1.2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Bauer committed Aug 19, 2015
2 parents 0133128 + 6701d5a commit f8c0180
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 46 deletions.
34 changes: 33 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,39 @@ module.exports = function(grunt) {
files: ['js/**/*.js', '!js/**/*.min.js'],
tasks: ['uglify']
}
}
},
po2mo: {
files: {
src: 'languages/*.po',
expand: true,
},
},
pot: {
options:{
text_domain: 'bu-navigation',
dest: 'languages/',
keywords: [ // WordPress localisation functions
'__:1',
'_e:1',
'_x:1,2c',
'esc_html__:1',
'esc_html_e:1',
'esc_html_x:1,2c',
'esc_attr__:1',
'esc_attr_e:1',
'esc_attr_x:1,2c',
'_ex:1,2c',
'_n:1,2',
'_nx:1,2,4c',
'_n_noop:1,2',
'_nx_noop:1,2,3c'
],
},
files:{
src: [ '**/*.php' ],
expand: true,
}
},
});

// Build task.
Expand Down
12 changes: 6 additions & 6 deletions bu-navigation-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class BU_Widget_Pages extends WP_Widget {
'navigation_style' => 'site'
);

function BU_Widget_Pages() {
public function __construct() {
$widget_ops = array( 'classname' => 'widget_bu_pages', 'description' => __( "Navigation list of your site's pages", 'bu-navigation' ) );
$this->WP_Widget( 'bu_pages', __('Content Navigation', 'bu-navigation' ), $widget_ops );
parent::__construct( 'bu_pages', __('Content Navigation', 'bu-navigation' ), $widget_ops );
}

/**
Expand All @@ -35,7 +35,7 @@ function BU_Widget_Pages() {
* @param array $instance widget instance args, as passed to WP_Widget::widget
* @return string HTML fragment with title
*/
function section_title( $args, $instance ) {
public function section_title( $args, $instance ) {
global $post;

$html = $title = $href = '';
Expand Down Expand Up @@ -94,7 +94,7 @@ function section_title( $args, $instance ) {
* @param array $args widget args
* @param array $instance widget instance args
*/
function widget( $args, $instance ) {
public function widget( $args, $instance ) {
global $post;

// Only display navigation widget for supported post types
Expand Down Expand Up @@ -173,7 +173,7 @@ function widget( $args, $instance ) {
* @param array $new_instance updated widget parameters
* @param array $old_instance original widget parameters
*/
function update( $new_instance, $old_instance ) {
public function update( $new_instance, $old_instance ) {

$instance = $old_instance;
$instance = wp_parse_args( $instance, $this->defaults );
Expand All @@ -191,7 +191,7 @@ function update( $new_instance, $old_instance ) {
*
* @param array $instance the specific widget instance being displayed
*/
function form( $instance ) {
public function form( $instance ) {

$instance = wp_parse_args( $instance, $this->defaults );

Expand Down
8 changes: 3 additions & 5 deletions bu-navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: Boston University (IS&T)
Author URI: http://sites.bu.edu/web/
Description: Provides alternative navigation elements designed for blogs with large page counts
Version: 1.2.6
Version: 1.2.7
Text Domain: bu-navigation
Domain Path: /languages
*/
Expand Down Expand Up @@ -76,6 +76,7 @@ public function register_hooks() {

add_action( 'plugins_loaded', array( $this, 'add_cache_groups' ) );
add_action( 'init', array( $this, 'init' ), 1 );
add_action( 'widgets_init', array( $this, 'load_widget' ) );

}

Expand Down Expand Up @@ -105,9 +106,6 @@ public function init() {
$this->load_admin();
}

if ( $this->supports( 'widget' ) )
$this->load_widget();

do_action('bu_navigation_init');

}
Expand All @@ -125,7 +123,7 @@ public function load_admin() {
*/
public function load_widget() {

if ( !is_blog_installed() )
if ( !is_blog_installed() || !$this->supports( 'widget' ) )
return;

require_once(dirname(__FILE__) . '/bu-navigation-widget.php'); // Content navigation widget
Expand Down
76 changes: 49 additions & 27 deletions languages/bu-navigation.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,44 @@
# This file is distributed under the same license as the BU Navigation package.
msgid ""
msgstr ""
"Project-Id-Version: BU Navigation 1.2.6\n"
"Project-Id-Version: bu-navigation 1.2.7\n"
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/bu-navigation\n"
"POT-Creation-Date: 2015-04-22 07:37:30+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2015-08-19 12:32-0400\n"
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: admin/admin.php:82
#, php-format
msgid "Are you sure you want to delete this %s?"
msgstr ""

#: admin/admin.php:83
#, php-format
msgid "Are you sure you want to delete these %s?"
msgstr ""

#. /or links exist
#. construct output msg based on how many child pages/links exist
#: admin/admin.php:229
#, php-format
msgid "\"%s\" is a hidden %s with "
msgstr ""

#: admin/admin.php:233
#, php-format
msgid "a child "
msgid_plural "%d child "
msgstr[0] ""
msgstr[1] ""

#: admin/admin.php:238
#, php-format
msgid "a child link"
msgid_plural "%d child links"
msgstr[0] ""
Expand All @@ -41,12 +50,14 @@ msgid " and "
msgstr ""

#: admin/admin.php:246
#, php-format
msgid ""
" If you delete this %1$s, %2$s will move up one node in the %1$s hierarchy, "
"and will automatically be marked as hidden."
msgstr ""

#: admin/admin.php:252
#, php-format
msgid ""
" If you delete this %1$s, %2$s will move up one node in the %1$s hierarchy, "
"and will be displayed in navigation menus."
Expand Down Expand Up @@ -111,6 +122,7 @@ msgid ""
msgstr ""

#: admin/manager.php:144
#, php-format
msgid ""
"Site administrators can change this behavior by visiting %s and enabling the "
"\"Allow Top-Level Pages\" setting."
Expand All @@ -137,24 +149,29 @@ msgid "Errors occurred while saving your navigation changes."
msgstr ""

#: admin/manager.php:244
#, php-format
msgid "Warning: %s is currently editing this site's navigation."
msgstr ""

#: admin/post.php:92
#, php-format
msgid "Displaying top-level %s in navigation lists is currently disabled."
msgstr ""

#: admin/post.php:93
#, php-format
msgid ""
"To change this behavior, visit %s and enable the \"Allow Top-Level Pages\" "
"setting."
msgstr ""

#: admin/post.php:94
#, php-format
msgid "Top level %s"
msgstr ""

#: admin/post.php:132 templates/metabox-custom-template.php:2
#, php-format
msgid "%s Template"
msgstr ""

Expand All @@ -176,6 +193,7 @@ msgid "The \"Maximum Items\" setting most be a positive value."
msgstr ""

#: admin/primary.php:139
#, php-format
msgid "The current theme only supports %s level of children."
msgid_plural "The current theme only supports up to %s levels of children."
msgstr[0] ""
Expand Down Expand Up @@ -263,7 +281,28 @@ msgstr ""
msgid "Show all sections"
msgstr ""

#: node_modules/grunt-pot/test/fixtures/some-file.php:3
msgid "I'm a translatable string."
msgstr ""

#: node_modules/grunt-pot/test/fixtures/some-other-file.php:4
msgid "Me too"
msgstr ""

#: node_modules/grunt-pot/test/fixtures/some-other-file.php:7
#, php-format
msgid "I have %d apple"
msgid_plural "I have %d apples"
msgstr[0] ""
msgstr[1] ""

#. / TRANSLATORS: This should be translated as a shorthand for YEAR-MONTH-DAY using 4, 2 and 2 digits.
#: node_modules/grunt-pot/test/fixtures/some-other-file.php:16
msgid "yyyy-mm-dd"
msgstr ""

#: templates/edit-order.php:3
#, php-format
msgid "%s Order"
msgstr ""

Expand Down Expand Up @@ -316,16 +355,19 @@ msgid "Default Template"
msgstr ""

#: templates/metabox-custom-template.php:7
#, php-format
msgid ""
"Some themes have custom templates you can use for certain %s that might have "
"additional features or custom layouts."
msgstr ""

#: templates/metabox-navigation-attributes.php:12
#, php-format
msgid "%s Location"
msgstr ""

#: templates/metabox-navigation-attributes.php:13
#, php-format
msgid "Move %s"
msgstr ""

Expand All @@ -346,6 +388,7 @@ msgid "Update Location"
msgstr ""

#: templates/metabox-navigation-attributes.php:31
#, php-format
msgid "Drag %s to change the %s location in the hierarchy."
msgstr ""

Expand Down Expand Up @@ -405,6 +448,7 @@ msgid ""
msgstr ""

#: templates/primary-navigation.php:43
#, php-format
msgid ""
"The theme your site is currently using supports displaying %s level of "
"children in the primary navigation bar."
Expand Down Expand Up @@ -442,25 +486,3 @@ msgstr ""
#: templates/widget-form.php:67
msgid "Use the section name as the title"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "BU Navigation"
msgstr ""

#. Plugin URI of the plugin/theme
msgid "http://developer.bu.edu/bu-navigation/"
msgstr ""

#. Description of the plugin/theme
msgid ""
"Provides alternative navigation elements designed for blogs with large page "
"counts"
msgstr ""

#. Author of the plugin/theme
msgid "Boston University (IS&T)"
msgstr ""

#. Author URI of the plugin/theme
msgid "http://sites.bu.edu/web/"
msgstr ""
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bu-navigation",
"version": "1.2.6",
"version": "1.2.7",
"description": "Provides alternative navigation elements designed for blogs with large page counts",
"main": "bu-navigation.php",
"directories": {
Expand Down Expand Up @@ -32,6 +32,8 @@
"grunt": "^0.4.5",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-po2mo": "^0.1.2",
"grunt-pot": "^0.2.1",
"matchdep": "^0.3.0"
}
}
11 changes: 8 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# BU Navigation #
**Contributors:** ntk, mgburns, gcorne, jtwiest
**Contributors:** ntk, mgburns, gcorne, jtwiest, awbauer
**Tags:** navigation, hierarchical, post type, boston university, bu
**Requires at least:** 3.1
**Tested up to:** 4.2
**Stable tag:** 1.2.6
**Tested up to:** 4.3
**Stable tag:** 1.2.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -85,6 +85,11 @@ Please see this page for the details:

## Changelog ##

### 1.2.7 ###

* Fixed WP4.3 widget init issues -- props nobleclem
* Fixed PHP4 style constructors

### 1.2.6 ###

* Confirmed 4.2 compatibility
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== BU Navigation ===
Contributors: ntk, mgburns, gcorne, jtwiest
Contributors: ntk, mgburns, gcorne, jtwiest, awbauer
Tags: navigation, hierarchical, post type, boston university, bu
Requires at least: 3.1
Tested up to: 4.2
Stable tag: 1.2.6
Tested up to: 4.3
Stable tag: 1.2.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -76,6 +76,11 @@ Please see this page for the details:

== Changelog ==

= 1.2.7 =

* Fixed WP4.3 widget init issues -- props nobleclem
* Fixed PHP4 style constructors

= 1.2.6 =

* Confirmed 4.2 compatibility
Expand Down

0 comments on commit f8c0180

Please sign in to comment.