Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/siteorigin/so-css into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
Misplon committed Aug 11, 2023
2 parents 8090514 + 1215f78 commit 74194a9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions so-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public function __construct() {
}
} elseif ( ! class_exists( 'SiteOrigin_Installer' ) ) {
include plugin_dir_path( __FILE__ ) . 'inc/installer/siteorigin-installer.php';
if (
! class_exists( 'SiteOrigin_Panels' ) &&
! class_exists( 'SiteOrigin_Widgets_Bundle' ) &&
! class_exists( 'SiteOrigin_Premium' )
) {
add_filter( 'siteorigin_add_installer', array( $this, 'manage_installer' ) );
}
}
}

Expand All @@ -89,6 +96,14 @@ public static function single() {
return $single;
}

public function manage_installer( $status ) {
// If the user hasn't enabled/disabled the installer, disable it by default.
if ( empty( get_option( 'siteorigin_installer' ) ) ) {
$status = false;
}
return $status;
}

/**
* Retrieve the current custom CSS for a given theme and post id combination.
*
Expand Down
11 changes: 5 additions & 6 deletions tpl/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@
<h3 class="hndle"><span><?php esc_html_e( 'CSS Revisions', 'so-css' ); ?></span></h3>
<div class="inside">
<ol class="custom-revisions-list" data-confirm="<?php esc_attr_e( 'Are you sure you want to load this revision?', 'so-css' ); ?>">
<?php
$this->custom_css_revisions_list( $theme, $socss_post_id, $current_revision );
?>
<?php $this->custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); ?>
</ol>
</div>
</div>
Expand Down Expand Up @@ -129,8 +127,9 @@
</div>
<?php
if (
! class_exists( 'SiteOrigin_Panels' ) ||
! class_exists( 'SiteOrigin_Widgets_Bundle' )
! class_exists( 'SiteOrigin_Panels' ) &&
! class_exists( 'SiteOrigin_Widgets_Bundle' ) &&
! class_exists( 'SiteOrigin_Premium' )
) {
?>
<div class="installer">
Expand All @@ -145,7 +144,7 @@
type="checkbox"
name="installer_status"
class="installer_status"
<?php checked( get_option( 'siteorigin_installer', true ), 1 ); ?>
<?php checked( get_option( 'siteorigin_installer', false ), 1 ); ?>
data-nonce="<?php echo wp_create_nonce( 'siteorigin_installer_status' ); ?>"
>
</label>
Expand Down

0 comments on commit 74194a9

Please sign in to comment.