Skip to content

Commit

Permalink
Rename usages of tracking base class
Browse files Browse the repository at this point in the history
  • Loading branch information
gikaragia committed Oct 3, 2023
1 parent 42d2b36 commit bdc97ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 4 additions & 2 deletions includes/class-wp-job-manager-usage-tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
exit;
}

require dirname( __FILE__ ) . '/../lib/usage-tracking/class-usage-tracking-base.php';
require dirname( __FILE__ ) . '/../lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php';

/**
* WPJM Usage Tracking subclass.
Expand Down Expand Up @@ -182,7 +182,9 @@ protected function get_event_prefix() {
}

/**
* Get the text domain used in the plugin.
* Get the text domain used in the plugin. Deprecated - use 'wp-job-manager' directly.
*
* @deprecated 1.41.1
*
* @return string
*/
Expand Down
10 changes: 1 addition & 9 deletions lib/usage-tracking/class-wp-job-manager-usage-tracking-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class WP_Job_Manager_Usage_Tracking_Base {
* @throws Exception When get_instance is not implemented.
*/
public static function get_instance() {
throw new Exception( 'Usage Tracking subclasses must implement get_instance. See class-usage-tracking-base.php' );
throw new Exception( 'Usage Tracking subclasses must implement get_instance. See class-wp-job-manager-usage-tracking-base.php' );
}


Expand All @@ -86,14 +86,6 @@ public static function get_instance() {
**/
abstract protected function get_prefix();

/**
* Get the text domain used by this plugin. This class will add some
* strings to be translated.
*
* @return string The text domain string.
**/
abstract protected function get_text_domain();

/**
* Determine whether usage tracking is enabled.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

require_once dirname( __FILE__ ) . '/../../class-usage-tracking-base.php';
require_once dirname( __FILE__ ) . '/../../class-wp-job-manager-usage-tracking-base.php';

/**
* Usage Tracking subclass for testing. Please update the superclass name to
* match the one used by your plugin (usage-tracking/class-usage-tracking-base.php).
* match the one used by your plugin (usage-tracking/class-wp-job-manager-usage-tracking-base.php).
*/
class Usage_Tracking_Test_Subclass extends WP_Job_Manager_Usage_Tracking_Base {

Expand Down

0 comments on commit bdc97ca

Please sign in to comment.