Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Commit

Permalink
Removed the trailing slash
Browse files Browse the repository at this point in the history
According to http://codex.wordpress.org/Function_Reference/plugin_dir_path, plugin_dir_path gets the filesystem directory path with trailing slash. Even tho two slashes will cause a error, the extra slash can be removed.
  • Loading branch information
James W. Lane III committed Nov 14, 2013
1 parent aa7000b commit 8dd148b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions widget-boilerplate/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function widget( $args, $instance ) {

// TODO: Here is where you manipulate your widget's values based on their input fields

include( plugin_dir_path( __FILE__ ) . '/views/widget.php' );
include( plugin_dir_path( __FILE__ ) . 'views/widget.php' );

echo $after_widget;

Expand Down Expand Up @@ -125,7 +125,7 @@ public function form( $instance ) {
// TODO: Store the values of the widget in their own variable

// Display the admin form
include( plugin_dir_path(__FILE__) . '/views/admin.php' );
include( plugin_dir_path(__FILE__) . 'views/admin.php' );

} // end form

Expand All @@ -139,7 +139,7 @@ public function form( $instance ) {
public function widget_textdomain() {

// TODO be sure to change 'widget-name' to the name of *your* plugin
load_plugin_textdomain( 'widget-name-locale', false, plugin_dir_path( __FILE__ ) . '/lang/' );
load_plugin_textdomain( 'widget-name-locale', false, plugin_dir_path( __FILE__ ) . 'lang/' );

} // end widget_textdomain

Expand Down

0 comments on commit 8dd148b

Please sign in to comment.