Skip to content

Commit

Permalink
Merge pull request #21 from Automattic/fix/fopen-error
Browse files Browse the repository at this point in the history
Avoid errors when the plugin is installed manually.
  • Loading branch information
enejb authored Apr 21, 2017
2 parents 6f57f5d + de3c5d1 commit f91a7b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions autoupdate-self.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public function __construct() {
}

$this->config = array(
'plugin_file' => 'jetpack-beta/jetpack-beta.php',
'slug' => 'jetpack-beta',
'proper_folder_name' => 'jetpack-beta',
'plugin_file' => JPBETA__PLUGIN_FOLDER . '/jetpack-beta.php',
'slug' => JPBETA__PLUGIN_FOLDER,
'proper_folder_name' => JPBETA__PLUGIN_FOLDER,
'api_url' => 'https://api.github.com/repos/Automattic/jetpack-beta',
'github_url' => 'https://github.com/Automattic/jetpack-beta',
'requires' => '4.7',
Expand Down Expand Up @@ -180,7 +180,7 @@ public function upgrader_source_selection( $source, $remote_source, $upgrader )
}
return $source;
}

public function auto_update_jetpack_beta( $update, $item ) {
if ( 'sure' !== get_option( 'jp_beta_autoupdate') ) {
return $update;
Expand Down
2 changes: 1 addition & 1 deletion jetpack-beta-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static function add_actions() {
add_action( "load-$hook", array( __CLASS__, 'admin_page_load' ) );
add_action( "admin_print_styles-$hook", array( __CLASS__, 'admin_styles' ) );
add_action( "admin_print_scripts-$hook", array( __CLASS__, 'admin_scripts' ) );
add_filter( 'plugin_action_links_' . plugin_basename( 'jetpack-beta/jetpack-beta.php' ), array( __CLASS__, 'admin_plugin_settings_link' ) );
add_filter( 'plugin_action_links_' . JPBETA__PLUGIN_FOLDER . '/jetpack-beta.php', array( __CLASS__, 'admin_plugin_settings_link' ) );
}

static function get_page_hook() {
Expand Down
2 changes: 1 addition & 1 deletion jetpack-beta.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Jetpack beta manages files inside jetpack-dev folder this folder should contain
*
*/
define( 'JPBETA__PLUGIN_FOLDER', plugins_url() . '/jetpack-beta/' );
define( 'JPBETA__PLUGIN_FOLDER', basename( __DIR__ ) );
define( 'JPBETA__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'JPBETA__PLUGIN_FILE', __FILE__ );
define( 'JPBETA_VERSION', 2 );
Expand Down

0 comments on commit f91a7b4

Please sign in to comment.