Skip to content

Commit

Permalink
Private rather than public class
Browse files Browse the repository at this point in the history
- Make our two new helper methods private rather than public
- Change the missing-license notice attribute to `wpjm_missing_license_notice_`
  • Loading branch information
anaemnesis committed May 22, 2023
1 parent d9e812b commit ea758b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/helper/class-wp-job-manager-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ private function handle_product_activation_response( $response, $product_slug, $
* @param array $plugin_data The plugin data.
* @return array
*/
public function add_missing_license_notice( $notices, $product_slug, $plugin_data ) {
private function add_missing_license_notice( $notices, $product_slug, $plugin_data ) {
$notice = [
'level' => 'info',
'dismissible' => true,
Expand All @@ -938,7 +938,7 @@ public function add_missing_license_notice( $notices, $product_slug, $plugin_dat
esc_html( $plugin_data['Name'] )
),
];
$notices[ 'wpjm_licence_notice_' . $product_slug ] = $notice;
$notices[ 'wpjm_missing_license_notice_' . $product_slug ] = $notice;

return $notices;
}
Expand All @@ -951,7 +951,7 @@ public function add_missing_license_notice( $notices, $product_slug, $plugin_dat
* @param array $plugin_data The plugin data.
* @return array
*/
public function add_error_license_notice( $notices, $product_slug, $plugin_data ) {
private function add_error_license_notice( $notices, $product_slug, $plugin_data ) {
$notice = [
'level' => 'error',
'dismissible' => true,
Expand All @@ -970,7 +970,7 @@ public function add_error_license_notice( $notices, $product_slug, $plugin_data
esc_url( admin_url( 'edit.php?post_type=job_listing&page=job-manager-addons&section=helper#' . sanitize_title( $product_slug . '_row' ) ) )
),
];
$notices[ 'wpjm_licence_error_notice_' . $product_slug ] = $notice;
$notices[ 'wpjm_license_error_notice_' . $product_slug ] = $notice;

return $notices;
}
Expand Down

0 comments on commit ea758b0

Please sign in to comment.