-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecations and errors (multiple changes) (#155)
- Replace deprecated single_month_title function - Updated Update Client - Update filters for UpdateClient - Remove some remaining block code - Fix an issue with get_file_content getting the menu icon - Fix an action that was triggered when not necessary
- Loading branch information
Showing
9 changed files
with
93 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Classic_SEO; | ||
|
||
use Classic_SEO\Helper; | ||
|
||
class updateClientTweaks { | ||
|
||
public function __construct() { | ||
// Fix images folder for Update Manager. | ||
add_filter( 'codepotent_update_manager_classicpress-seo/classicpress-seo.php_image_path', [ $this, 'fix_update_manager_images' ] ); | ||
add_filter( 'codepotent_update_manager_classicpress-seo/classicpress-seo.php_image_url', [ $this, 'fix_update_manager_images' ] ); | ||
add_filter( 'codepotent_update_manager_filter_classicpress-seo/classicpress-seo.php_client_request', [ $this, 'anonymous_data_collection' ] ); | ||
} | ||
|
||
/** | ||
* Fix images folder for Update Manager. | ||
*/ | ||
public function fix_update_manager_images( $folder ) { | ||
trigger_error(preg_replace( '/' . basename( CPSEO_PATH ) . '\/images$/', basename( CPSEO_PATH ) . '/assets/images', $folder )); | ||
return preg_replace( '/' . basename( CPSEO_PATH ) . '\/images$/', basename( CPSEO_PATH ) . '/assets/images', $folder ); | ||
} | ||
|
||
/** | ||
* Handle anonymous data collectin. | ||
*/ | ||
public function anonymous_data_collection( $body ) { | ||
if( ! Helper::get_settings( 'general.cpseo_usage_tracking' ) ) { | ||
$body['sfum'] = 'no-log'; | ||
} | ||
return $body; | ||
} | ||
|
||
} | ||
|
||
new updateClientTweaks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters