Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename top-level menu to Batches #99

Merged
merged 4 commits into from Jan 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions bin/install-wp-tests.sh
Expand Up @@ -15,11 +15,11 @@ WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/}

download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}

if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
Expand Down Expand Up @@ -79,6 +79,7 @@ install_test_suite() {
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi

if [ ! -f wp-tests-config.php ]; then
Expand Down
8 changes: 4 additions & 4 deletions locomotive.php
Expand Up @@ -38,9 +38,9 @@ public function define_constants() {
* Admin Dashboard.
*/
public function add_dashboard() {
add_menu_page(
'Locomotive',
'Locomotive',
add_management_page(
__( 'Batch Processes' ),
__( 'Batches' ),
'manage_options',
'locomotive',
array( $this, 'dashboard_display' )
Expand Down Expand Up @@ -88,7 +88,7 @@ public function attach_hooks() {
public function scripts( $hook ) {

// Exclude our scripts and CSS files from loading globally.
if ( 'toplevel_page_locomotive' !== $hook ) {
if ( 'tools_page_locomotive' !== $hook ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test-functions.php
Expand Up @@ -99,7 +99,7 @@ public function test_asset_loading() {
$this->assertFalse( $this->are_batch_assets_enqueued() );

// Call our loader class on the locomotive settings page.
$this->load_admin_enqueue_hook( 'toplevel_page_locomotive' );
$this->load_admin_enqueue_hook( 'tools_page_locomotive' );

// Check that the items are enquened.
$this->assertTrue( $this->are_batch_assets_enqueued() );
Expand Down