Skip to content

Commit

Permalink
Updated wp-content pathname for wp.com compatibility (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
kowsar89 authored Dec 22, 2022
1 parent ad465c4 commit ec8b8a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/classes/class-extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ public function download_plugin( array $args = array() ) {
WP_Filesystem();
}

$plugin_path = ABSPATH . 'wp-content/plugins';
$plugin_path = WP_CONTENT_DIR . '/plugins';
$temp_dest = "{$plugin_path}/atbdp-temp-dir";
$file_url = $args['url'];
$file_name = basename( $file_url );
Expand Down Expand Up @@ -1400,7 +1400,7 @@ public function download_theme( array $args = array() ) {
WP_Filesystem();
}

$theme_path = ABSPATH . 'wp-content/themes';
$theme_path = WP_CONTENT_DIR . '/themes';
$temp_dest = "{$theme_path}/atbdp-temp-dir";
$file_url = $args['url'];
$file_name = basename( $file_url );
Expand Down Expand Up @@ -1495,7 +1495,7 @@ function ( $errno, $errstr, $errfile, $errline ) {

// install_theme_from_zip
public function install_themes_from_zip_files( $zip_files, $temp_dest, $wp_filesystem ) {
$theme_path = ABSPATH . 'wp-content/themes';
$theme_path = WP_CONTENT_DIR . '/themes';

foreach ( $zip_files as $zip ) {
$file = basename( $zip );
Expand Down

0 comments on commit ec8b8a9

Please sign in to comment.