Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General / Integrations: update Jetpack integration #420

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ At Complianz we are working towards a full-featured privacy suite for all WordPr

If you're a developer and want to help out, please feel free to contribute anyway you can. We respond to any pull request or issue on Github. Start with reading the [developers guide](https://complianz.io/developers-guide-for-third-party-integrations/) to get a head start.

**Bug report:** Please start an issue, and if you have a fix a pull request. Please explain your issue clearly, and use comments when adding a pull request. Your contribution will be acknowledges on WordPress.org.
**Bug report:** Please open an issue, and if you have a fix, do not hesitate to open a pull request. Please explain your issue clearly, and use comments when adding a pull request. Your contribution will be acknowledged on WordPress.org.

**New Features:** New features can also be assigned to issues. If you want to add a new feature, please see if you can add it to our [integrations hub](https://github.com/Really-Simple-Plugins/complianz-integrations).

Expand Down
3 changes: 2 additions & 1 deletion class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public function no_security_plugin_active(){
if (class_exists('SG_Security')) return false; // Siteground security
if (defined('DEFENDER_VERSION')) return false;
if (defined('SUCURISCAN_INIT')) return false;
if (defined('JETPACK__VERSION')) return false;
if (defined('JETPACK__VERSION')) return false; // Jetpack.
if (defined('JETPACK_PROTECT_VERSION')) return false; // Jetpack Protect.
if (defined('BULLETPROOF_VERSION')) return false;
if (class_exists('MCWPSettings')) return false;
if (function_exists('GOTMLS_install')) return false; //anti malware security and brute force firewall
Expand Down
2 changes: 1 addition & 1 deletion documents/class-document.php
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ public function get_shortcode_page_id( $type, $region , $cache = true) {
//ensure a transient, in case none is found. This prevents continuing requests on the page list
cmplz_set_transient( "cmplz_shortcode_$type-$region", 'none', HOUR_IN_SECONDS );
$query = $wpdb->prepare(
"SELECT * FROM $wpdb->posts WHERE (post_content LIKE %s OR post_content LIKE %s) AND post_status = 'publish' AND post_type = 'page' ",
"SELECT * FROM $wpdb->posts WHERE (post_content LIKE %s OR post_content LIKE %s) AND post_status = 'publish' AND post_type = 'page'",
'%' . '[cmplz-document' . '%',
'%' . 'wp:complianz\/document' . '%'
);
Expand Down
2 changes: 1 addition & 1 deletion integrations/integrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@

'jetpack' => array(
'constant_or_function' => 'JETPACK__VERSION',
'label' => 'JetPack',
'label' => 'Jetpack',
'firstparty_marketing' => false,
),

Expand Down
2 changes: 1 addition & 1 deletion integrations/plugins/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function cmplz_jetpack_script( $tags ) {
* @param bool $stats_category_required
*/
function cmplz_jetpack_set_statistics_required( $stats_category_required ){
if ( class_exists( 'JetPack' ) && Jetpack::is_module_active( 'stats' ) ) {
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'stats' ) ) {
$stats_category_required = true;
}
return $stats_category_required;
Expand Down
4 changes: 2 additions & 2 deletions settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ function cmplz_fix_duplicate_menu_item() {
add_action('admin_footer', 'cmplz_fix_duplicate_menu_item');
/**
* WordPress doesn't allow for translation of chunks resulting of code splitting.
* Several workarounds have popped up in JetPack and Woocommerce: https://developer.wordpress.com/2022/01/06/wordpress-plugin-i18n-webpack-and-composer/
* Below is mainly based on the Woocommerce solution, which seems to be the most simple approach. Simplicity is king here.
* Several workarounds have popped up in Jetpack and WooCommerce: https://developer.wordpress.com/2022/01/06/wordpress-plugin-i18n-webpack-and-composer/
* Below is mainly based on the WooCommerce solution, which seems to be the most simple approach. Simplicity is king here.
*
* @return array
*/
Expand Down