Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
sed -i '/MY_DOMAIN/ s//classicpress-directory-integration/' phpcs.xml
mv phpcs.xml phpcs.xml.dist
- name: CPCS checks
uses: 10up/wpcs-action@stable
uses: 10up/wpcs-action@v1.7.0
with:
use_local_config: 'true'
enable_warnings: 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: WPCS checks
uses: 10up/wpcs-action@stable
uses: 10up/wpcs-action@v1.7.0
with:
use_local_config: 'true'
enable_warnings: 'true'
Expand Down
20 changes: 12 additions & 8 deletions classicpress-directory-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,10 @@ function error_is_wp() {
require_once 'classes/class-plugin-update.php';
$plugin_update = new PluginUpdate();

// Load Plugin Install functionality class.
require_once 'classes/class-plugin-install.php';
$plugin_install = new PluginInstall();

// Load Theme Update functionality class.
require_once 'classes/class-theme-update.php';
$theme_update = new ThemeUpdate();

// Load Theme Install functionality class.
require_once 'classes/class-theme-install.php';
$theme_install = new ThemeInstall();

// Register text domain
function register_text_domain() {
load_plugin_textdomain( 'classicpress-directory-integration', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
Expand All @@ -84,3 +76,15 @@ function register_text_domain() {
if ( defined( 'WP_CLI' ) && WP_CLI ) {
\WP_CLI::add_command( 'cpdi', '\ClassicPress\Directory\CPDICLI' );
}

if ( ! is_admin() ) {
return;
}

// Load Plugin Install functionality class.
require_once 'classes/class-plugin-install.php';
$plugin_install = new PluginInstall();

// Load Theme Install functionality class.
require_once 'classes/class-theme-install.php';
$theme_install = new ThemeInstall();