Completed
Branch new-admin-design (7f58b2)
by
unknown
02:54
created
form_sections/strategies/display/EE_Checkbox_Display_Strategy.strategy.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $input->set_label_sizes();
23 23
         $label_size_class = $input->get_label_size_class();
24 24
         $html = '';
25
-        if (! is_array($input->raw_value()) && $input->raw_value() !== null) {
25
+        if ( ! is_array($input->raw_value()) && $input->raw_value() !== null) {
26 26
             EE_Error::doing_it_wrong(
27 27
                 'EE_Checkbox_Display_Strategy::display()',
28 28
                 sprintf(
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     ),
36 36
                     $input->html_id(),
37 37
                     var_export($input->raw_value(), true),
38
-                    $input->html_name() . '[]'
38
+                    $input->html_name().'[]'
39 39
                 ),
40 40
                 '4.8.1'
41 41
             );
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
                      . '">';
55 55
             $html .= EEH_HTML::nl(1, 'checkbox');
56 56
             $html .= '<input type="checkbox"';
57
-            $html .= ' name="' . $input->html_name() . '[]"';
58
-            $html .= ' id="' . $html_id . '"';
59
-            $html .= ' class="' . $input->html_class() . '"';
60
-            $html .= ' style="' . $input->html_style() . '"';
61
-            $html .= ' value="' . esc_attr($value) . '"';
57
+            $html .= ' name="'.$input->html_name().'[]"';
58
+            $html .= ' id="'.$html_id.'"';
59
+            $html .= ' class="'.$input->html_class().'"';
60
+            $html .= ' style="'.$input->html_style().'"';
61
+            $html .= ' value="'.esc_attr($value).'"';
62 62
             $html .= ! empty($input_raw_value) && in_array($value, $input_raw_value, true)
63 63
                 ? ' checked="checked"'
64 64
                 : '';
65
-            $html .= ' ' . $this->_input->other_html_attributes();
66
-            $html .= ' data-question_label="' . $input->html_label_id() . '"';
65
+            $html .= ' '.$this->_input->other_html_attributes();
66
+            $html .= ' data-question_label="'.$input->html_label_id().'"';
67 67
             $html .= '>&nbsp;';
68 68
             $html .= $display_text;
69
-            $html .= EEH_HTML::nl(-1, 'checkbox') . '</label>';
69
+            $html .= EEH_HTML::nl(-1, 'checkbox').'</label>';
70 70
         }
71 71
         return $html;
72 72
     }
Please login to merge, or discard this patch.
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -12,60 +12,60 @@
 block discarded – undo
12 12
 class EE_Checkbox_Display_Strategy extends EE_Compound_Input_Display_Strategy
13 13
 {
14 14
 
15
-    /**
16
-     * @throws EE_Error
17
-     * @return string of html to display the field
18
-     */
19
-    public function display()
20
-    {
21
-        $input = $this->get_input();
22
-        $input->set_label_sizes();
23
-        $label_size_class = $input->get_label_size_class();
24
-        $html = '';
25
-        if (! is_array($input->raw_value()) && $input->raw_value() !== null) {
26
-            EE_Error::doing_it_wrong(
27
-                'EE_Checkbox_Display_Strategy::display()',
28
-                sprintf(
29
-                    esc_html_x(
30
-                        'Input values for checkboxes should be an array of values, but the value for input "%1$s" is "%2$s". Please verify that the input name is exactly "%3$s"',
31
-                        'Input values for checkboxes should be an array of values, but the value for input "form-input-id" is "form-input-value". Please verify that the input name is exactly "form_input_name[]"',
32
-                        'event_espresso'
33
-                    ),
34
-                    $input->html_id(),
35
-                    var_export($input->raw_value(), true),
36
-                    $input->html_name() . '[]'
37
-                ),
38
-                '4.8.1'
39
-            );
40
-        }
41
-        $input_raw_value = (array) $input->raw_value();
42
-        foreach ($input->options() as $value => $display_text) {
43
-            $value = $input->get_normalization_strategy()->unnormalize_one($value);
44
-            $html_id = $this->get_sub_input_id($value);
45
-            $html .= EEH_HTML::nl(0, 'checkbox');
46
-            $html .= '<label for="'
47
-                     . $html_id
48
-                     . '" id="'
49
-                     . $html_id
50
-                     . '-lbl" class="ee-checkbox-label-after'
51
-                     . $label_size_class
52
-                     . '">';
53
-            $html .= EEH_HTML::nl(1, 'checkbox');
54
-            $html .= '<input type="checkbox"';
55
-            $html .= ' name="' . $input->html_name() . '[]"';
56
-            $html .= ' id="' . $html_id . '"';
57
-            $html .= ' class="' . $input->html_class() . '"';
58
-            $html .= ' style="' . $input->html_style() . '"';
59
-            $html .= ' value="' . esc_attr($value) . '"';
60
-            $html .= ! empty($input_raw_value) && in_array($value, $input_raw_value, true)
61
-                ? ' checked="checked"'
62
-                : '';
63
-            $html .= ' ' . $this->_input->other_html_attributes();
64
-            $html .= ' data-question_label="' . $input->html_label_id() . '"';
65
-            $html .= '>&nbsp;';
66
-            $html .= $display_text;
67
-            $html .= EEH_HTML::nl(-1, 'checkbox') . '</label>';
68
-        }
69
-        return $html;
70
-    }
15
+	/**
16
+	 * @throws EE_Error
17
+	 * @return string of html to display the field
18
+	 */
19
+	public function display()
20
+	{
21
+		$input = $this->get_input();
22
+		$input->set_label_sizes();
23
+		$label_size_class = $input->get_label_size_class();
24
+		$html = '';
25
+		if (! is_array($input->raw_value()) && $input->raw_value() !== null) {
26
+			EE_Error::doing_it_wrong(
27
+				'EE_Checkbox_Display_Strategy::display()',
28
+				sprintf(
29
+					esc_html_x(
30
+						'Input values for checkboxes should be an array of values, but the value for input "%1$s" is "%2$s". Please verify that the input name is exactly "%3$s"',
31
+						'Input values for checkboxes should be an array of values, but the value for input "form-input-id" is "form-input-value". Please verify that the input name is exactly "form_input_name[]"',
32
+						'event_espresso'
33
+					),
34
+					$input->html_id(),
35
+					var_export($input->raw_value(), true),
36
+					$input->html_name() . '[]'
37
+				),
38
+				'4.8.1'
39
+			);
40
+		}
41
+		$input_raw_value = (array) $input->raw_value();
42
+		foreach ($input->options() as $value => $display_text) {
43
+			$value = $input->get_normalization_strategy()->unnormalize_one($value);
44
+			$html_id = $this->get_sub_input_id($value);
45
+			$html .= EEH_HTML::nl(0, 'checkbox');
46
+			$html .= '<label for="'
47
+					 . $html_id
48
+					 . '" id="'
49
+					 . $html_id
50
+					 . '-lbl" class="ee-checkbox-label-after'
51
+					 . $label_size_class
52
+					 . '">';
53
+			$html .= EEH_HTML::nl(1, 'checkbox');
54
+			$html .= '<input type="checkbox"';
55
+			$html .= ' name="' . $input->html_name() . '[]"';
56
+			$html .= ' id="' . $html_id . '"';
57
+			$html .= ' class="' . $input->html_class() . '"';
58
+			$html .= ' style="' . $input->html_style() . '"';
59
+			$html .= ' value="' . esc_attr($value) . '"';
60
+			$html .= ! empty($input_raw_value) && in_array($value, $input_raw_value, true)
61
+				? ' checked="checked"'
62
+				: '';
63
+			$html .= ' ' . $this->_input->other_html_attributes();
64
+			$html .= ' data-question_label="' . $input->html_label_id() . '"';
65
+			$html .= '>&nbsp;';
66
+			$html .= $display_text;
67
+			$html .= EEH_HTML::nl(-1, 'checkbox') . '</label>';
68
+		}
69
+		return $html;
70
+	}
71 71
 }
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/export/ExportAttendeeBillingData.php 2 patches
Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -18,117 +18,117 @@
 block discarded – undo
18 18
  */
19 19
 class ExportAttendeeBillingData implements PersonalDataExporterInterface
20 20
 {
21
-    /**
22
-     * @var EEM_Attendee
23
-     */
24
-    protected $attendee_model;
21
+	/**
22
+	 * @var EEM_Attendee
23
+	 */
24
+	protected $attendee_model;
25 25
 
26
-    /**
27
-     * @var EEM_Payment_Method
28
-     */
29
-    protected $payment_method_model;
26
+	/**
27
+	 * @var EEM_Payment_Method
28
+	 */
29
+	protected $payment_method_model;
30 30
 
31
-    /**
32
-     * ExportAttendeeBillingData constructor.
33
-     *
34
-     * @param EEM_Attendee $attendee_model
35
-     */
36
-    public function __construct(EEM_Attendee $attendee_model, EEM_Payment_Method $payment_method_model)
37
-    {
38
-        $this->attendee_model = $attendee_model;
39
-        $this->payment_method_model = $payment_method_model;
40
-    }
31
+	/**
32
+	 * ExportAttendeeBillingData constructor.
33
+	 *
34
+	 * @param EEM_Attendee $attendee_model
35
+	 */
36
+	public function __construct(EEM_Attendee $attendee_model, EEM_Payment_Method $payment_method_model)
37
+	{
38
+		$this->attendee_model = $attendee_model;
39
+		$this->payment_method_model = $payment_method_model;
40
+	}
41 41
 
42
-    /**
43
-     * Returns data for export.
44
-     *
45
-     * @param string    $email_address ,
46
-     * @param int       $page          starts at 1, not 0
47
-     * @return array {
48
-     * @type array      $data          {
49
-     * @type array {
50
-     * @type string     $group_id      (not translated, same for all exports)
51
-     * @type string     $group_label   (translated string)
52
-     * @type string|int $item_id
53
-     * @type array      $data          {
54
-     * @type array {
55
-     * @type string     $name          what's shown in the left-column of the export row
56
-     * @type string     $value         what's showin the right-column of the export row
57
-     *                                 }
58
-     *                                 }
59
-     *                                 }
60
-     *                                 }
61
-     *                                 }
62
-     */
63
-    public function export($email_address, $page = 1)
64
-    {
65
-        $page_size = 10;
66
-        $attendees = $this->attendee_model->get_all(
67
-            array(
68
-                array(
69
-                    'ATT_email' => $email_address,
70
-                ),
71
-                'limit' => array(
72
-                    ($page - 1) * $page_size,
73
-                    $page_size,
74
-                ),
75
-            )
76
-        );
77
-        // get all payment methods, even inactive ones
78
-        $payment_methods = $this->payment_method_model->get_all(
79
-            array(
80
-                'group_by' => array('PMD_type'),
81
-            )
82
-        );
83
-        $export_items = array();
84
-        $found_something = false;
85
-        foreach ($attendees as $attendee) {
86
-            foreach ($payment_methods as $payment_method) {
87
-                try {
88
-                    $billing_info = $attendee->billing_info_for_payment_method($payment_method);
89
-                } catch (EE_Error $e) {
90
-                    $billing_info = null;
91
-                }
92
-                if (! $billing_info instanceof EE_Form_Section_Proper) {
93
-                    continue;
94
-                }
95
-                $found_something = true;
96
-                $data = array();
97
-                foreach ($billing_info->input_pretty_values(true, true) as $input_name => $display_value) {
98
-                    try {
99
-                        $input = $billing_info->get_input($input_name);
100
-                        $input_display_name = $input->html_label_text();
101
-                    } catch (EE_Error $e) {
102
-                        $input_display_name = $input_name;
103
-                    }
104
-                    $data[] = array(
105
-                        'name'  => strip_tags($input_display_name),
106
-                        'value' => $display_value,
107
-                    );
108
-                }
109
-                $export_items[] = array(
110
-                    'group_id'    => 'billing_data',
111
-                    'group_label' => esc_html__('Billing Data', 'event_espresso'),
112
-                    'item_id'     => $attendee->ID() . '-' . $payment_method->ID(),
113
-                    'data'        => $data,
114
-                );
115
-            }
116
-        }
117
-        return array(
118
-            'data' => $export_items,
119
-            'done' => ! $found_something,
120
-        );
121
-    }
42
+	/**
43
+	 * Returns data for export.
44
+	 *
45
+	 * @param string    $email_address ,
46
+	 * @param int       $page          starts at 1, not 0
47
+	 * @return array {
48
+	 * @type array      $data          {
49
+	 * @type array {
50
+	 * @type string     $group_id      (not translated, same for all exports)
51
+	 * @type string     $group_label   (translated string)
52
+	 * @type string|int $item_id
53
+	 * @type array      $data          {
54
+	 * @type array {
55
+	 * @type string     $name          what's shown in the left-column of the export row
56
+	 * @type string     $value         what's showin the right-column of the export row
57
+	 *                                 }
58
+	 *                                 }
59
+	 *                                 }
60
+	 *                                 }
61
+	 *                                 }
62
+	 */
63
+	public function export($email_address, $page = 1)
64
+	{
65
+		$page_size = 10;
66
+		$attendees = $this->attendee_model->get_all(
67
+			array(
68
+				array(
69
+					'ATT_email' => $email_address,
70
+				),
71
+				'limit' => array(
72
+					($page - 1) * $page_size,
73
+					$page_size,
74
+				),
75
+			)
76
+		);
77
+		// get all payment methods, even inactive ones
78
+		$payment_methods = $this->payment_method_model->get_all(
79
+			array(
80
+				'group_by' => array('PMD_type'),
81
+			)
82
+		);
83
+		$export_items = array();
84
+		$found_something = false;
85
+		foreach ($attendees as $attendee) {
86
+			foreach ($payment_methods as $payment_method) {
87
+				try {
88
+					$billing_info = $attendee->billing_info_for_payment_method($payment_method);
89
+				} catch (EE_Error $e) {
90
+					$billing_info = null;
91
+				}
92
+				if (! $billing_info instanceof EE_Form_Section_Proper) {
93
+					continue;
94
+				}
95
+				$found_something = true;
96
+				$data = array();
97
+				foreach ($billing_info->input_pretty_values(true, true) as $input_name => $display_value) {
98
+					try {
99
+						$input = $billing_info->get_input($input_name);
100
+						$input_display_name = $input->html_label_text();
101
+					} catch (EE_Error $e) {
102
+						$input_display_name = $input_name;
103
+					}
104
+					$data[] = array(
105
+						'name'  => strip_tags($input_display_name),
106
+						'value' => $display_value,
107
+					);
108
+				}
109
+				$export_items[] = array(
110
+					'group_id'    => 'billing_data',
111
+					'group_label' => esc_html__('Billing Data', 'event_espresso'),
112
+					'item_id'     => $attendee->ID() . '-' . $payment_method->ID(),
113
+					'data'        => $data,
114
+				);
115
+			}
116
+		}
117
+		return array(
118
+			'data' => $export_items,
119
+			'done' => ! $found_something,
120
+		);
121
+	}
122 122
 
123
-    /**
124
-     * Gets the Translated name of this exporter
125
-     *
126
-     * @return string
127
-     */
128
-    public function name()
129
-    {
130
-        return esc_html__('Event Espresso Attendee Billing Data Exporter', 'event_espresso');
131
-    }
123
+	/**
124
+	 * Gets the Translated name of this exporter
125
+	 *
126
+	 * @return string
127
+	 */
128
+	public function name()
129
+	{
130
+		return esc_html__('Event Espresso Attendee Billing Data Exporter', 'event_espresso');
131
+	}
132 132
 }
133 133
 // End of file ExportAttendeeBillingData.php
134 134
 // Location: EventEspresso\core\domain\services\admin\privacy\export/ExportAttendeeBillingData.php
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 } catch (EE_Error $e) {
90 90
                     $billing_info = null;
91 91
                 }
92
-                if (! $billing_info instanceof EE_Form_Section_Proper) {
92
+                if ( ! $billing_info instanceof EE_Form_Section_Proper) {
93 93
                     continue;
94 94
                 }
95 95
                 $found_something = true;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 $export_items[] = array(
110 110
                     'group_id'    => 'billing_data',
111 111
                     'group_label' => esc_html__('Billing Data', 'event_espresso'),
112
-                    'item_id'     => $attendee->ID() . '-' . $payment_method->ID(),
112
+                    'item_id'     => $attendee->ID().'-'.$payment_method->ID(),
113 113
                     'data'        => $data,
114 114
                 );
115 115
             }
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/erasure/EraseAnswers.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -16,88 +16,88 @@
 block discarded – undo
16 16
  */
17 17
 class EraseAnswers implements PersonalDataEraserInterface
18 18
 {
19
-    /**
20
-     * @var EEM_Answer
21
-     */
22
-    protected $answer_model;
19
+	/**
20
+	 * @var EEM_Answer
21
+	 */
22
+	protected $answer_model;
23 23
 
24
-    /**
25
-     * @var EEM_Question
26
-     */
27
-    protected $question_model;
24
+	/**
25
+	 * @var EEM_Question
26
+	 */
27
+	protected $question_model;
28 28
 
29
-    /**
30
-     * EraseAnswers constructor.
31
-     *
32
-     * @param EEM_Answer   $answer_model
33
-     * @param EEM_Question $question_model
34
-     */
35
-    public function __construct(EEM_Answer $answer_model, EEM_Question $question_model)
36
-    {
37
-        $this->answer_model = $answer_model;
38
-        $this->question_model = $question_model;
39
-    }
29
+	/**
30
+	 * EraseAnswers constructor.
31
+	 *
32
+	 * @param EEM_Answer   $answer_model
33
+	 * @param EEM_Question $question_model
34
+	 */
35
+	public function __construct(EEM_Answer $answer_model, EEM_Question $question_model)
36
+	{
37
+		$this->answer_model = $answer_model;
38
+		$this->question_model = $question_model;
39
+	}
40 40
 
41 41
 
42
-    /**
43
-     * Gets a translated string name for the data eraser
44
-     *
45
-     * @return string
46
-     */
47
-    public function name()
48
-    {
49
-        return esc_html__('Event Espresso Registration Answers', 'event_espresso');
50
-    }
42
+	/**
43
+	 * Gets a translated string name for the data eraser
44
+	 *
45
+	 * @return string
46
+	 */
47
+	public function name()
48
+	{
49
+		return esc_html__('Event Espresso Registration Answers', 'event_espresso');
50
+	}
51 51
 
52
-    /**
53
-     * Erases a "page" of personal user data
54
-     *
55
-     * @return array {
56
-     * @type boolean $items_removed  whether items were removed successfully or not
57
-     * @type boolean $items_retained whether any items were skipped or not
58
-     * @type array   $messages       values are messages to show
59
-     * @type boolean $done           whether this eraser is done or has more pages
60
-     *               }
61
-     */
62
-    public function erase($email_address, $page = 1)
63
-    {
64
-        $multi_answer_enum_question_types = $this->question_model->question_types_in_category('multi-answer-enum');
65
-        $normal_questions_updated = $this->answer_model->update(
66
-            array(
67
-                'ANS_value' => '',
68
-            ),
69
-            array(
70
-                array(
71
-                    'Registration.Attendee.ATT_email' => $email_address,
72
-                    'Question.QST_type'               => array(
73
-                        'NOT_IN',
74
-                        $multi_answer_enum_question_types,
75
-                    ),
76
-                ),
77
-            )
78
-        );
79
-        $multi_value_questions_updated = $this->answer_model->update(
80
-            array(
81
-                'ANS_value' => array(),
82
-            ),
83
-            array(
84
-                array(
85
-                    'Registration.Attendee.ATT_email' => $email_address,
86
-                    'Question.QST_type'               => array(
87
-                        'IN',
88
-                        $multi_answer_enum_question_types,
89
-                    ),
90
-                ),
91
-            )
92
-        );
52
+	/**
53
+	 * Erases a "page" of personal user data
54
+	 *
55
+	 * @return array {
56
+	 * @type boolean $items_removed  whether items were removed successfully or not
57
+	 * @type boolean $items_retained whether any items were skipped or not
58
+	 * @type array   $messages       values are messages to show
59
+	 * @type boolean $done           whether this eraser is done or has more pages
60
+	 *               }
61
+	 */
62
+	public function erase($email_address, $page = 1)
63
+	{
64
+		$multi_answer_enum_question_types = $this->question_model->question_types_in_category('multi-answer-enum');
65
+		$normal_questions_updated = $this->answer_model->update(
66
+			array(
67
+				'ANS_value' => '',
68
+			),
69
+			array(
70
+				array(
71
+					'Registration.Attendee.ATT_email' => $email_address,
72
+					'Question.QST_type'               => array(
73
+						'NOT_IN',
74
+						$multi_answer_enum_question_types,
75
+					),
76
+				),
77
+			)
78
+		);
79
+		$multi_value_questions_updated = $this->answer_model->update(
80
+			array(
81
+				'ANS_value' => array(),
82
+			),
83
+			array(
84
+				array(
85
+					'Registration.Attendee.ATT_email' => $email_address,
86
+					'Question.QST_type'               => array(
87
+						'IN',
88
+						$multi_answer_enum_question_types,
89
+					),
90
+				),
91
+			)
92
+		);
93 93
 
94
-        return array(
95
-            'items_removed'  => (bool) $normal_questions_updated || (bool) $multi_value_questions_updated,
96
-            'items_retained' => false, // always false in this example
97
-            'messages'       => array(), // no messages in this example
98
-            'done'           => true,
99
-        );
100
-    }
94
+		return array(
95
+			'items_removed'  => (bool) $normal_questions_updated || (bool) $multi_value_questions_updated,
96
+			'items_retained' => false, // always false in this example
97
+			'messages'       => array(), // no messages in this example
98
+			'done'           => true,
99
+		);
100
+	}
101 101
 }
102 102
 // End of file EraseAnswers.php
103 103
 // Location: EventEspresso\core\domain\services\privacy\erasure/EraseAnswers.php
Please login to merge, or discard this patch.
core/services/privacy/export/PersonalDataExporterInterface.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -14,35 +14,35 @@
 block discarded – undo
14 14
  */
15 15
 interface PersonalDataExporterInterface
16 16
 {
17
-    /**
18
-     * Gets the Translated name of this exporter
19
-     *
20
-     * @return string
21
-     */
22
-    public function name();
17
+	/**
18
+	 * Gets the Translated name of this exporter
19
+	 *
20
+	 * @return string
21
+	 */
22
+	public function name();
23 23
 
24
-    /**
25
-     * Returns data for export.
26
-     *
27
-     * @param string    $email_address ,
28
-     * @param int       $page          starts at 1, not 0
29
-     * @return array {
30
-     * @type array      $data          {
31
-     * @type array {
32
-     * @type string     $group_id      (not translated, same for all exports)
33
-     * @type string     $group_label   (translated string)
34
-     * @type string|int $item_id
35
-     * @type array      $data          {
36
-     * @type array {
37
-     * @type string     $name          what's shown in the left-column of the export row
38
-     * @type string     $value         what's showin the right-column of the export row
39
-     *                                 }
40
-     *                                 }
41
-     *                                 }
42
-     *                                 }
43
-     *                                 }
44
-     */
45
-    public function export($email_address, $page = 1);
24
+	/**
25
+	 * Returns data for export.
26
+	 *
27
+	 * @param string    $email_address ,
28
+	 * @param int       $page          starts at 1, not 0
29
+	 * @return array {
30
+	 * @type array      $data          {
31
+	 * @type array {
32
+	 * @type string     $group_id      (not translated, same for all exports)
33
+	 * @type string     $group_label   (translated string)
34
+	 * @type string|int $item_id
35
+	 * @type array      $data          {
36
+	 * @type array {
37
+	 * @type string     $name          what's shown in the left-column of the export row
38
+	 * @type string     $value         what's showin the right-column of the export row
39
+	 *                                 }
40
+	 *                                 }
41
+	 *                                 }
42
+	 *                                 }
43
+	 *                                 }
44
+	 */
45
+	public function export($email_address, $page = 1);
46 46
 }
47 47
 // End of file PersonalDataExporterInterface.php
48 48
 // Location: EventEspresso\core\domain\services\admin/PersonalDataExporterInterface.php
Please login to merge, or discard this patch.
core/services/privacy/erasure/PersonalDataEraserInterface.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -15,25 +15,25 @@
 block discarded – undo
15 15
 interface PersonalDataEraserInterface
16 16
 {
17 17
 
18
-    /**
19
-     * Gets a translated string name for the data eraser
20
-     *
21
-     * @return string
22
-     */
23
-    public function name();
18
+	/**
19
+	 * Gets a translated string name for the data eraser
20
+	 *
21
+	 * @return string
22
+	 */
23
+	public function name();
24 24
 
25 25
 
26
-    /**
27
-     * Erases a "page" of personal user data
28
-     *
29
-     * @return array {
30
-     * @type boolean $items_removed  whether items were removed successfully or not
31
-     * @type boolean $items_retained whether any items were skipped or not
32
-     * @type array   $messages       values are messages to show
33
-     * @type boolean $done           whether this eraser is done or has more pages
34
-     *               }
35
-     */
36
-    public function erase($email_address, $page = 1);
26
+	/**
27
+	 * Erases a "page" of personal user data
28
+	 *
29
+	 * @return array {
30
+	 * @type boolean $items_removed  whether items were removed successfully or not
31
+	 * @type boolean $items_retained whether any items were skipped or not
32
+	 * @type array   $messages       values are messages to show
33
+	 * @type boolean $done           whether this eraser is done or has more pages
34
+	 *               }
35
+	 */
36
+	public function erase($email_address, $page = 1);
37 37
 }
38 38
 // End of file PersonalDataEraserInterface.php
39 39
 // Location: EventEspresso\core\domain\services\admin/PersonalDataEraserInterface.php
Please login to merge, or discard this patch.
core/services/privacy/export/PersonalDataExporterManager.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -23,68 +23,68 @@
 block discarded – undo
23 23
 class PersonalDataExporterManager
24 24
 {
25 25
 
26
-    public function __construct()
27
-    {
28
-        add_filter(
29
-            'wp_privacy_personal_data_exporters',
30
-            array($this, 'hookInExporters')
31
-        );
32
-    }
26
+	public function __construct()
27
+	{
28
+		add_filter(
29
+			'wp_privacy_personal_data_exporters',
30
+			array($this, 'hookInExporters')
31
+		);
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * Adds EE's exporters to the list of WP exporters
37
-     *
38
-     * @param array $exporters
39
-     * @return array
40
-     */
41
-    public function hookInExporters($exporters)
42
-    {
43
-        // load all the privacy policy stuff
44
-        // add post policy text
45
-        foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
-            $exporters[ get_class($exporter) ] = array(
47
-                'exporter_friendly_name' => $exporter->name(),
48
-                'callback'               => array($exporter, 'export'),
49
-            );
50
-        }
51
-        return $exporters;
52
-    }
35
+	/**
36
+	 * Adds EE's exporters to the list of WP exporters
37
+	 *
38
+	 * @param array $exporters
39
+	 * @return array
40
+	 */
41
+	public function hookInExporters($exporters)
42
+	{
43
+		// load all the privacy policy stuff
44
+		// add post policy text
45
+		foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
+			$exporters[ get_class($exporter) ] = array(
47
+				'exporter_friendly_name' => $exporter->name(),
48
+				'callback'               => array($exporter, 'export'),
49
+			);
50
+		}
51
+		return $exporters;
52
+	}
53 53
 
54 54
 
55
-    /**
56
-     * @return CollectionInterface|PersonalDataExporterInterface[]
57
-     * @throws InvalidIdentifierException
58
-     * @throws InvalidInterfaceException
59
-     * @throws InvalidFilePathException
60
-     * @throws InvalidEntityException
61
-     * @throws InvalidDataTypeException
62
-     * @throws InvalidClassException
63
-     */
64
-    protected function loadPrivateDataExporterCollection()
65
-    {
66
-        $loader = new CollectionLoader(
67
-            new CollectionDetails(
68
-                // collection name
69
-                'personal_data_exporters',
70
-                // collection interface
71
-                'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface',
72
-                // FQCNs for classes to add (all classes within that namespace will be loaded)
73
-                apply_filters(
74
-                    'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
75
-                    array('EventEspresso\core\domain\services\admin\privacy\export')
76
-                ),
77
-                // filepaths to classes to add
78
-                array(),
79
-                // file mask to use if parsing folder for files to add
80
-                '',
81
-                // what to use as identifier for collection entities
82
-                // using CLASS NAME prevents duplicates (works like a singleton)
83
-                CollectionDetails::ID_CLASS_NAME
84
-            )
85
-        );
86
-        return $loader->getCollection();
87
-    }
55
+	/**
56
+	 * @return CollectionInterface|PersonalDataExporterInterface[]
57
+	 * @throws InvalidIdentifierException
58
+	 * @throws InvalidInterfaceException
59
+	 * @throws InvalidFilePathException
60
+	 * @throws InvalidEntityException
61
+	 * @throws InvalidDataTypeException
62
+	 * @throws InvalidClassException
63
+	 */
64
+	protected function loadPrivateDataExporterCollection()
65
+	{
66
+		$loader = new CollectionLoader(
67
+			new CollectionDetails(
68
+				// collection name
69
+				'personal_data_exporters',
70
+				// collection interface
71
+				'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface',
72
+				// FQCNs for classes to add (all classes within that namespace will be loaded)
73
+				apply_filters(
74
+					'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
75
+					array('EventEspresso\core\domain\services\admin\privacy\export')
76
+				),
77
+				// filepaths to classes to add
78
+				array(),
79
+				// file mask to use if parsing folder for files to add
80
+				'',
81
+				// what to use as identifier for collection entities
82
+				// using CLASS NAME prevents duplicates (works like a singleton)
83
+				CollectionDetails::ID_CLASS_NAME
84
+			)
85
+		);
86
+		return $loader->getCollection();
87
+	}
88 88
 }
89 89
 
90 90
 // End of file PersonalDataExporterManager.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         // load all the privacy policy stuff
44 44
         // add post policy text
45 45
         foreach ($this->loadPrivateDataExporterCollection() as $exporter) {
46
-            $exporters[ get_class($exporter) ] = array(
46
+            $exporters[get_class($exporter)] = array(
47 47
                 'exporter_friendly_name' => $exporter->name(),
48 48
                 'callback'               => array($exporter, 'export'),
49 49
             );
Please login to merge, or discard this patch.
core/services/privacy/erasure/PersonalDataEraserManager.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         // load all the privacy policy stuff
41 41
         // add post policy text
42 42
         foreach ($this->loadPrivateDataEraserCollection() as $eraser) {
43
-            $erasers[ get_class($eraser) ] = array(
43
+            $erasers[get_class($eraser)] = array(
44 44
                 'eraser_friendly_name' => $eraser->name(),
45 45
                 'callback'             => array($eraser, 'erase'),
46 46
             );
Please login to merge, or discard this patch.
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -23,65 +23,65 @@
 block discarded – undo
23 23
 class PersonalDataEraserManager
24 24
 {
25 25
 
26
-    public function __construct()
27
-    {
28
-        add_filter(
29
-            'wp_privacy_personal_data_erasers',
30
-            array($this, 'hookInErasers')
31
-        );
32
-    }
26
+	public function __construct()
27
+	{
28
+		add_filter(
29
+			'wp_privacy_personal_data_erasers',
30
+			array($this, 'hookInErasers')
31
+		);
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * For all the registered `PrivateDataEraserInterface`s, add them as erasers
37
-     */
38
-    public function hookInErasers($erasers)
39
-    {
40
-        // load all the privacy policy stuff
41
-        // add post policy text
42
-        foreach ($this->loadPrivateDataEraserCollection() as $eraser) {
43
-            $erasers[ get_class($eraser) ] = array(
44
-                'eraser_friendly_name' => $eraser->name(),
45
-                'callback'             => array($eraser, 'erase'),
46
-            );
47
-        }
48
-        return $erasers;
49
-    }
35
+	/**
36
+	 * For all the registered `PrivateDataEraserInterface`s, add them as erasers
37
+	 */
38
+	public function hookInErasers($erasers)
39
+	{
40
+		// load all the privacy policy stuff
41
+		// add post policy text
42
+		foreach ($this->loadPrivateDataEraserCollection() as $eraser) {
43
+			$erasers[ get_class($eraser) ] = array(
44
+				'eraser_friendly_name' => $eraser->name(),
45
+				'callback'             => array($eraser, 'erase'),
46
+			);
47
+		}
48
+		return $erasers;
49
+	}
50 50
 
51 51
 
52
-    /**
53
-     * @return CollectionInterface|PersonalDataEraserInterface[]
54
-     * @throws InvalidIdentifierException
55
-     * @throws InvalidInterfaceException
56
-     * @throws InvalidFilePathException
57
-     * @throws InvalidEntityException
58
-     * @throws InvalidDataTypeException
59
-     * @throws InvalidClassException
60
-     */
61
-    protected function loadPrivateDataEraserCollection()
62
-    {
63
-        $loader = new CollectionLoader(
64
-            new CollectionDetails(
65
-                // collection name
66
-                'privacy_erasers',
67
-                // collection interface
68
-                'EventEspresso\core\services\privacy\erasure\PersonalDataEraserInterface',
69
-                // FQCNs for classes to add (all classes within that namespace will be loaded)
70
-                apply_filters(
71
-                    'FHEE__EventEspresso_core_services_privacy_erasure_PersonalDataEraserManager__erasers',
72
-                    array('EventEspresso\core\domain\services\admin\privacy\erasure')
73
-                ),
74
-                // filepaths to classes to add
75
-                array(),
76
-                // file mask to use if parsing folder for files to add
77
-                '',
78
-                // what to use as identifier for collection entities
79
-                // using CLASS NAME prevents duplicates (works like a singleton)
80
-                CollectionDetails::ID_CLASS_NAME
81
-            )
82
-        );
83
-        return $loader->getCollection();
84
-    }
52
+	/**
53
+	 * @return CollectionInterface|PersonalDataEraserInterface[]
54
+	 * @throws InvalidIdentifierException
55
+	 * @throws InvalidInterfaceException
56
+	 * @throws InvalidFilePathException
57
+	 * @throws InvalidEntityException
58
+	 * @throws InvalidDataTypeException
59
+	 * @throws InvalidClassException
60
+	 */
61
+	protected function loadPrivateDataEraserCollection()
62
+	{
63
+		$loader = new CollectionLoader(
64
+			new CollectionDetails(
65
+				// collection name
66
+				'privacy_erasers',
67
+				// collection interface
68
+				'EventEspresso\core\services\privacy\erasure\PersonalDataEraserInterface',
69
+				// FQCNs for classes to add (all classes within that namespace will be loaded)
70
+				apply_filters(
71
+					'FHEE__EventEspresso_core_services_privacy_erasure_PersonalDataEraserManager__erasers',
72
+					array('EventEspresso\core\domain\services\admin\privacy\erasure')
73
+				),
74
+				// filepaths to classes to add
75
+				array(),
76
+				// file mask to use if parsing folder for files to add
77
+				'',
78
+				// what to use as identifier for collection entities
79
+				// using CLASS NAME prevents duplicates (works like a singleton)
80
+				CollectionDetails::ID_CLASS_NAME
81
+			)
82
+		);
83
+		return $loader->getCollection();
84
+	}
85 85
 }
86 86
 // End of file PersonalDataEraserManager.php
87 87
 // Location: EventEspresso\core\domain\services\admin/PersonalDataEraserManager.php
Please login to merge, or discard this patch.
core/domain/services/custom_post_types/RegisterCustomTaxonomies.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -17,97 +17,97 @@
 block discarded – undo
17 17
 class RegisterCustomTaxonomies
18 18
 {
19 19
 
20
-    /**
21
-     * @var CustomTaxonomyDefinitions $custom_taxonomies
22
-     */
23
-    public $custom_taxonomies;
20
+	/**
21
+	 * @var CustomTaxonomyDefinitions $custom_taxonomies
22
+	 */
23
+	public $custom_taxonomies;
24 24
 
25 25
 
26
-    /**
27
-     * RegisterCustomTaxonomies constructor.
28
-     *
29
-     * @param CustomTaxonomyDefinitions $custom_taxonomies
30
-     */
31
-    public function __construct(CustomTaxonomyDefinitions $custom_taxonomies)
32
-    {
33
-        $this->custom_taxonomies = $custom_taxonomies;
34
-    }
26
+	/**
27
+	 * RegisterCustomTaxonomies constructor.
28
+	 *
29
+	 * @param CustomTaxonomyDefinitions $custom_taxonomies
30
+	 */
31
+	public function __construct(CustomTaxonomyDefinitions $custom_taxonomies)
32
+	{
33
+		$this->custom_taxonomies = $custom_taxonomies;
34
+	}
35 35
 
36 36
 
37
-    /**
38
-     * @return void
39
-     * @throws DomainException
40
-     */
41
-    public function registerCustomTaxonomies()
42
-    {
43
-        $custom_taxonomies = $this->custom_taxonomies->getCustomTaxonomyDefinitions();
44
-        foreach ($custom_taxonomies as $taxonomy => $tax) {
45
-            $this->registerCustomTaxonomy(
46
-                $taxonomy,
47
-                $tax['singular_name'],
48
-                $tax['plural_name'],
49
-                $tax['args']
50
-            );
51
-        }
52
-    }
37
+	/**
38
+	 * @return void
39
+	 * @throws DomainException
40
+	 */
41
+	public function registerCustomTaxonomies()
42
+	{
43
+		$custom_taxonomies = $this->custom_taxonomies->getCustomTaxonomyDefinitions();
44
+		foreach ($custom_taxonomies as $taxonomy => $tax) {
45
+			$this->registerCustomTaxonomy(
46
+				$taxonomy,
47
+				$tax['singular_name'],
48
+				$tax['plural_name'],
49
+				$tax['args']
50
+			);
51
+		}
52
+	}
53 53
 
54 54
 
55
-    /**
56
-     * Registers a custom taxonomy. Should be called before registering custom post types,
57
-     * otherwise you should link the taxonomy to the custom post type using 'register_taxonomy_for_object_type'.
58
-     *
59
-     * @param string $taxonomy_name      , eg 'books'
60
-     * @param string $singular_name      internationalized singular name
61
-     * @param string $plural_name        internationalized plural name
62
-     * @param array  $override_arguments like $args on http://codex.wordpress.org/Function_Reference/register_taxonomy
63
-     * @throws DomainException
64
-     */
65
-    public function registerCustomTaxonomy($taxonomy_name, $singular_name, $plural_name, array $override_arguments)
66
-    {
67
-        $result = register_taxonomy(
68
-            $taxonomy_name,
69
-            null,
70
-            $this->prepareArguments(
71
-                $singular_name,
72
-                $plural_name,
73
-                $override_arguments
74
-            )
75
-        );
76
-        if ($result instanceof WP_Error) {
77
-            throw new DomainException($result->get_error_message());
78
-        }
79
-    }
55
+	/**
56
+	 * Registers a custom taxonomy. Should be called before registering custom post types,
57
+	 * otherwise you should link the taxonomy to the custom post type using 'register_taxonomy_for_object_type'.
58
+	 *
59
+	 * @param string $taxonomy_name      , eg 'books'
60
+	 * @param string $singular_name      internationalized singular name
61
+	 * @param string $plural_name        internationalized plural name
62
+	 * @param array  $override_arguments like $args on http://codex.wordpress.org/Function_Reference/register_taxonomy
63
+	 * @throws DomainException
64
+	 */
65
+	public function registerCustomTaxonomy($taxonomy_name, $singular_name, $plural_name, array $override_arguments)
66
+	{
67
+		$result = register_taxonomy(
68
+			$taxonomy_name,
69
+			null,
70
+			$this->prepareArguments(
71
+				$singular_name,
72
+				$plural_name,
73
+				$override_arguments
74
+			)
75
+		);
76
+		if ($result instanceof WP_Error) {
77
+			throw new DomainException($result->get_error_message());
78
+		}
79
+	}
80 80
 
81 81
 
82
-    /**
83
-     * @param string $singular_name
84
-     * @param string $plural_name
85
-     * @param array  $override_arguments
86
-     * @since 4.9.62.p
87
-     * @return array
88
-     */
89
-    protected function prepareArguments($singular_name, $plural_name, array $override_arguments)
90
-    {
91
-        $arguments = array(
92
-            'hierarchical'      => true,
93
-            'labels'            => array(
94
-                'name'          => $plural_name,
95
-                'singular_name' => $singular_name,
96
-            ),
97
-            'show_ui'           => true,
98
-            'show_ee_ui'        => true,
99
-            'show_admin_column' => true,
100
-            'query_var'         => true,
101
-            'show_in_nav_menus' => false,
102
-            'map_meta_cap'      => true,
103
-        );
104
-        if ($override_arguments) {
105
-            if (isset($override_args['labels'])) {
106
-                $labels = array_merge($arguments['labels'], $override_arguments['labels']);
107
-                $arguments['labels'] = $labels;
108
-            }
109
-            $arguments = array_merge($arguments, $override_arguments);
110
-        }
111
-        return $arguments;
112
-    }
82
+	/**
83
+	 * @param string $singular_name
84
+	 * @param string $plural_name
85
+	 * @param array  $override_arguments
86
+	 * @since 4.9.62.p
87
+	 * @return array
88
+	 */
89
+	protected function prepareArguments($singular_name, $plural_name, array $override_arguments)
90
+	{
91
+		$arguments = array(
92
+			'hierarchical'      => true,
93
+			'labels'            => array(
94
+				'name'          => $plural_name,
95
+				'singular_name' => $singular_name,
96
+			),
97
+			'show_ui'           => true,
98
+			'show_ee_ui'        => true,
99
+			'show_admin_column' => true,
100
+			'query_var'         => true,
101
+			'show_in_nav_menus' => false,
102
+			'map_meta_cap'      => true,
103
+		);
104
+		if ($override_arguments) {
105
+			if (isset($override_args['labels'])) {
106
+				$labels = array_merge($arguments['labels'], $override_arguments['labels']);
107
+				$arguments['labels'] = $labels;
108
+			}
109
+			$arguments = array_merge($arguments, $override_arguments);
110
+		}
111
+		return $arguments;
112
+	}
113 113
 }
Please login to merge, or discard this patch.
core/CPTs/EE_Register_CPTs.core.php 1 patch
Indentation   +313 added lines, -313 removed lines patch added patch discarded remove patch
@@ -19,303 +19,303 @@  discard block
 block discarded – undo
19 19
 {
20 20
 
21 21
 
22
-    /**
23
-     * instantiated at init priority 5
24
-     *
25
-     * @deprecated 4.9.62.p
26
-     */
27
-    public function __construct()
28
-    {
29
-        do_action('AHEE__EE_Register_CPTs__construct_end', $this);
30
-    }
31
-
32
-
33
-    /**
34
-     * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
35
-     *
36
-     * @deprecated 4.9.62.p
37
-     * @return void
38
-     * @throws InvalidInterfaceException
39
-     * @throws InvalidDataTypeException
40
-     * @throws InvalidArgumentException
41
-     */
42
-    public static function maybe_flush_rewrite_rules()
43
-    {
44
-        /** @var EventEspresso\core\domain\services\custom_post_types\RewriteRules $rewrite_rules */
45
-        $rewrite_rules = LoaderFactory::getLoader()->getShared(
46
-            'EventEspresso\core\domain\services\custom_post_types\RewriteRules'
47
-        );
48
-        $rewrite_rules->flushRewriteRules();
49
-    }
50
-
51
-
52
-    /**
53
-     * @return CustomTaxonomyDefinitions
54
-     * @throws InvalidArgumentException
55
-     * @throws InvalidDataTypeException
56
-     * @throws InvalidInterfaceException
57
-     */
58
-    public static function getTaxonomyDefinitions()
59
-    {
60
-        return LoaderFactory::getLoader()->getShared(
61
-            'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions'
62
-        );
63
-    }
64
-
65
-
66
-    /**
67
-     * @deprecated 4.9.62.p
68
-     * @param string $description The description content.
69
-     * @param string $taxonomy    The taxonomy name for the taxonomy being filtered.
70
-     * @return string
71
-     * @throws InvalidArgumentException
72
-     * @throws InvalidDataTypeException
73
-     * @throws InvalidInterfaceException
74
-     */
75
-    public function ee_filter_ee_term_description_not_wp($description, $taxonomy)
76
-    {
77
-        $taxonomies = EE_Register_CPTs::getTaxonomyDefinitions();
78
-        return $taxonomies->filterCustomTermDescription($description, $taxonomy);
79
-    }
80
-
81
-
82
-    /**
83
-     * @deprecated 4.9.62.p
84
-     * @return array
85
-     * @throws InvalidArgumentException
86
-     * @throws InvalidDataTypeException
87
-     * @throws InvalidInterfaceException
88
-     */
89
-    public static function get_taxonomies()
90
-    {
91
-        $taxonomies = EE_Register_CPTs::getTaxonomyDefinitions();
92
-        return $taxonomies->getCustomTaxonomyDefinitions();
93
-    }
94
-
95
-
96
-    /**
97
-     * @return CustomPostTypeDefinitions
98
-     * @throws InvalidArgumentException
99
-     * @throws InvalidDataTypeException
100
-     * @throws InvalidInterfaceException
101
-     */
102
-    public static function getCustomPostTypeDefinitions()
103
-    {
104
-        return LoaderFactory::getLoader()->getShared(
105
-            'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'
106
-        );
107
-    }
108
-
109
-
110
-    /**
111
-     * @deprecated 4.9.62.p
112
-     * @return array
113
-     * @throws InvalidArgumentException
114
-     * @throws InvalidDataTypeException
115
-     * @throws InvalidInterfaceException
116
-     */
117
-    public static function get_CPTs()
118
-    {
119
-        $custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
120
-        return $custom_post_types->getDefinitions();
121
-    }
122
-
123
-
124
-    /**
125
-     * @deprecated 4.9.62.p
126
-     * @return array
127
-     * @throws InvalidArgumentException
128
-     * @throws InvalidDataTypeException
129
-     * @throws InvalidInterfaceException
130
-     */
131
-    public static function get_private_CPTs()
132
-    {
133
-        $custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
134
-        return $custom_post_types->getPrivateCustomPostTypes();
135
-    }
136
-
137
-
138
-    /**
139
-     * @deprecated 4.9.62.p
140
-     * @param string $post_type_slug              If a slug is included, then attempt to retrieve the model name for
141
-     *                                            the given cpt slug.  Otherwise if empty, then we'll return all cpt
142
-     *                                            model names for cpts registered in EE.
143
-     * @return array           Empty array if no matching model names for the given slug or an array of model
144
-     *                                            names indexed by post type slug.
145
-     * @throws InvalidArgumentException
146
-     * @throws InvalidDataTypeException
147
-     * @throws InvalidInterfaceException
148
-     */
149
-    public static function get_cpt_model_names($post_type_slug = '')
150
-    {
151
-        $custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
152
-        return $custom_post_types->getCustomPostTypeModelNames($post_type_slug);
153
-    }
154
-
155
-
156
-    /**
157
-     * @deprecated 4.9.62.p
158
-     * @param string $post_type_slug If valid slug is provided, then will instantiate the model only for
159
-     *                               the cpt matching the given slug.  Otherwise all cpt models will be
160
-     *                               instantiated (if possible).
161
-     * @return EEM_CPT_Base[]        successful instantiation will return an array of successfully instantiated
162
-     *                               EEM models indexed by post slug.
163
-     * @throws InvalidArgumentException
164
-     * @throws InvalidDataTypeException
165
-     * @throws InvalidInterfaceException
166
-     */
167
-    public static function instantiate_cpt_models($post_type_slug = '')
168
-    {
169
-        $custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
170
-        return $custom_post_types->getCustomPostTypeModels($post_type_slug);
171
-    }
172
-
173
-
174
-    /**
175
-     * @deprecated 4.9.62.p
176
-     * @param string $taxonomy_name , eg 'books'
177
-     * @param string $singular_name internationalized singular name
178
-     * @param string $plural_name   internationalized plural name
179
-     * @param array  $override_args like $args on http://codex.wordpress.org/Function_Reference/register_taxonomy
180
-     * @throws InvalidArgumentException
181
-     * @throws InvalidDataTypeException
182
-     * @throws InvalidInterfaceException
183
-     * @throws DomainException
184
-     */
185
-    public function register_taxonomy($taxonomy_name, $singular_name, $plural_name, $override_args = array())
186
-    {
187
-        /** @var \EventEspresso\core\domain\services\custom_post_types\registerCustomTaxonomies $taxonomies */
188
-        $taxonomies = LoaderFactory::getLoader()->getShared(
189
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'
190
-        );
191
-        $taxonomies->registerCustomTaxonomy(
192
-            $taxonomy_name,
193
-            $singular_name,
194
-            $plural_name,
195
-            $override_args
196
-        );
197
-    }
198
-
199
-
200
-    /**
201
-     * @deprecated 4.9.62.p
202
-     * @param string $post_type     the actual post type name
203
-     *                              (VERY IMPORTANT: this much match what the slug is for admin pages related to this
204
-     *                              cpt Also any models must use this slug as well)
205
-     * @param string $singular_name a pre-internationalized string for the singular name of the objects
206
-     * @param string $plural_name   a pre-internalized string for the plural name of the objects
207
-     * @param array  $override_args exactly like $args as described in
208
-     *                              http://codex.wordpress.org/Function_Reference/register_post_type The default values
209
-     *                              set in this function will be overridden by whatever you set in $override_args
210
-     * @param string $singular_slug
211
-     * @param string $plural_slug
212
-     * @return void , but registers the custom post type
213
-     * @throws InvalidArgumentException
214
-     * @throws InvalidDataTypeException
215
-     * @throws InvalidInterfaceException
216
-     * @throws DomainException
217
-     */
218
-    public function register_CPT(
219
-        $post_type,
220
-        $singular_name,
221
-        $plural_name,
222
-        $override_args = array(),
223
-        $singular_slug = '',
224
-        $plural_slug = ''
225
-    ) {
226
-        /** @var \EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes $register_custom_post_types */
227
-        $register_custom_post_types = LoaderFactory::getLoader()->getShared(
228
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'
229
-        );
230
-        $register_custom_post_types->registerCustomPostType(
231
-            $post_type,
232
-            $singular_name,
233
-            $plural_name,
234
-            $singular_slug,
235
-            $plural_slug,
236
-            $override_args
237
-        );
238
-    }
239
-
240
-
241
-    /**
242
-     * @return RegisterCustomTaxonomyTerms
243
-     * @throws InvalidArgumentException
244
-     * @throws InvalidDataTypeException
245
-     * @throws InvalidInterfaceException
246
-     */
247
-    public static function getRegisterCustomTaxonomyTerms()
248
-    {
249
-        return LoaderFactory::getLoader()->getShared(
250
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomyTerms'
251
-        );
252
-    }
253
-
254
-
255
-    /**
256
-     * @deprecated 4.9.62.p
257
-     * @throws InvalidArgumentException
258
-     * @throws InvalidDataTypeException
259
-     * @throws InvalidInterfaceException
260
-     */
261
-    public function set_must_use_event_types()
262
-    {
263
-        $register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
264
-        $register_custom_taxonomy_terms->setMustUseEventTypes();
265
-    }
266
-
267
-
268
-    /**
269
-     * @deprecated 4.9.62.p
270
-     * @param string $taxonomy     The name of the taxonomy
271
-     * @param array  $term_details An array of term details indexed by slug and containing Name of term, and
272
-     *                             description as the elements in the array
273
-     * @return void
274
-     * @throws InvalidArgumentException
275
-     * @throws InvalidDataTypeException
276
-     * @throws InvalidInterfaceException
277
-     */
278
-    public function set_must_use_terms($taxonomy, $term_details)
279
-    {
280
-        $register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
281
-        $register_custom_taxonomy_terms->setMustUseTerms($taxonomy, $term_details);
282
-    }
283
-
284
-
285
-    /**
286
-     * @deprecated 4.9.62.p
287
-     * @param string $taxonomy  The taxonomy we're using for the default term
288
-     * @param string $term_slug The slug of the term that will be the default.
289
-     * @param array  $cpt_slugs An array of custom post types we want the default assigned to
290
-     * @throws InvalidArgumentException
291
-     * @throws InvalidDataTypeException
292
-     * @throws InvalidInterfaceException
293
-     */
294
-    public function set_default_term($taxonomy, $term_slug, $cpt_slugs = array())
295
-    {
296
-        $register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
297
-        $register_custom_taxonomy_terms->registerCustomTaxonomyTerm(
298
-            $taxonomy,
299
-            $term_slug,
300
-            $cpt_slugs
301
-        );
302
-    }
303
-
304
-
305
-    /**
306
-     * @deprecated 4.9.62.p
307
-     * @param  int     $post_id ID of CPT being saved
308
-     * @param  WP_Post $post    Post object
309
-     * @return void
310
-     * @throws InvalidArgumentException
311
-     * @throws InvalidDataTypeException
312
-     * @throws InvalidInterfaceException
313
-     */
314
-    public function save_default_term($post_id, $post)
315
-    {
316
-        $register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
317
-        $register_custom_taxonomy_terms->saveDefaultTerm($post_id, $post);
318
-    }
22
+	/**
23
+	 * instantiated at init priority 5
24
+	 *
25
+	 * @deprecated 4.9.62.p
26
+	 */
27
+	public function __construct()
28
+	{
29
+		do_action('AHEE__EE_Register_CPTs__construct_end', $this);
30
+	}
31
+
32
+
33
+	/**
34
+	 * This will flush rewrite rules on demand.  This actually gets called around wp init priority level 100.
35
+	 *
36
+	 * @deprecated 4.9.62.p
37
+	 * @return void
38
+	 * @throws InvalidInterfaceException
39
+	 * @throws InvalidDataTypeException
40
+	 * @throws InvalidArgumentException
41
+	 */
42
+	public static function maybe_flush_rewrite_rules()
43
+	{
44
+		/** @var EventEspresso\core\domain\services\custom_post_types\RewriteRules $rewrite_rules */
45
+		$rewrite_rules = LoaderFactory::getLoader()->getShared(
46
+			'EventEspresso\core\domain\services\custom_post_types\RewriteRules'
47
+		);
48
+		$rewrite_rules->flushRewriteRules();
49
+	}
50
+
51
+
52
+	/**
53
+	 * @return CustomTaxonomyDefinitions
54
+	 * @throws InvalidArgumentException
55
+	 * @throws InvalidDataTypeException
56
+	 * @throws InvalidInterfaceException
57
+	 */
58
+	public static function getTaxonomyDefinitions()
59
+	{
60
+		return LoaderFactory::getLoader()->getShared(
61
+			'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions'
62
+		);
63
+	}
64
+
65
+
66
+	/**
67
+	 * @deprecated 4.9.62.p
68
+	 * @param string $description The description content.
69
+	 * @param string $taxonomy    The taxonomy name for the taxonomy being filtered.
70
+	 * @return string
71
+	 * @throws InvalidArgumentException
72
+	 * @throws InvalidDataTypeException
73
+	 * @throws InvalidInterfaceException
74
+	 */
75
+	public function ee_filter_ee_term_description_not_wp($description, $taxonomy)
76
+	{
77
+		$taxonomies = EE_Register_CPTs::getTaxonomyDefinitions();
78
+		return $taxonomies->filterCustomTermDescription($description, $taxonomy);
79
+	}
80
+
81
+
82
+	/**
83
+	 * @deprecated 4.9.62.p
84
+	 * @return array
85
+	 * @throws InvalidArgumentException
86
+	 * @throws InvalidDataTypeException
87
+	 * @throws InvalidInterfaceException
88
+	 */
89
+	public static function get_taxonomies()
90
+	{
91
+		$taxonomies = EE_Register_CPTs::getTaxonomyDefinitions();
92
+		return $taxonomies->getCustomTaxonomyDefinitions();
93
+	}
94
+
95
+
96
+	/**
97
+	 * @return CustomPostTypeDefinitions
98
+	 * @throws InvalidArgumentException
99
+	 * @throws InvalidDataTypeException
100
+	 * @throws InvalidInterfaceException
101
+	 */
102
+	public static function getCustomPostTypeDefinitions()
103
+	{
104
+		return LoaderFactory::getLoader()->getShared(
105
+			'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'
106
+		);
107
+	}
108
+
109
+
110
+	/**
111
+	 * @deprecated 4.9.62.p
112
+	 * @return array
113
+	 * @throws InvalidArgumentException
114
+	 * @throws InvalidDataTypeException
115
+	 * @throws InvalidInterfaceException
116
+	 */
117
+	public static function get_CPTs()
118
+	{
119
+		$custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
120
+		return $custom_post_types->getDefinitions();
121
+	}
122
+
123
+
124
+	/**
125
+	 * @deprecated 4.9.62.p
126
+	 * @return array
127
+	 * @throws InvalidArgumentException
128
+	 * @throws InvalidDataTypeException
129
+	 * @throws InvalidInterfaceException
130
+	 */
131
+	public static function get_private_CPTs()
132
+	{
133
+		$custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
134
+		return $custom_post_types->getPrivateCustomPostTypes();
135
+	}
136
+
137
+
138
+	/**
139
+	 * @deprecated 4.9.62.p
140
+	 * @param string $post_type_slug              If a slug is included, then attempt to retrieve the model name for
141
+	 *                                            the given cpt slug.  Otherwise if empty, then we'll return all cpt
142
+	 *                                            model names for cpts registered in EE.
143
+	 * @return array           Empty array if no matching model names for the given slug or an array of model
144
+	 *                                            names indexed by post type slug.
145
+	 * @throws InvalidArgumentException
146
+	 * @throws InvalidDataTypeException
147
+	 * @throws InvalidInterfaceException
148
+	 */
149
+	public static function get_cpt_model_names($post_type_slug = '')
150
+	{
151
+		$custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
152
+		return $custom_post_types->getCustomPostTypeModelNames($post_type_slug);
153
+	}
154
+
155
+
156
+	/**
157
+	 * @deprecated 4.9.62.p
158
+	 * @param string $post_type_slug If valid slug is provided, then will instantiate the model only for
159
+	 *                               the cpt matching the given slug.  Otherwise all cpt models will be
160
+	 *                               instantiated (if possible).
161
+	 * @return EEM_CPT_Base[]        successful instantiation will return an array of successfully instantiated
162
+	 *                               EEM models indexed by post slug.
163
+	 * @throws InvalidArgumentException
164
+	 * @throws InvalidDataTypeException
165
+	 * @throws InvalidInterfaceException
166
+	 */
167
+	public static function instantiate_cpt_models($post_type_slug = '')
168
+	{
169
+		$custom_post_types = EE_Register_CPTs::getCustomPostTypeDefinitions();
170
+		return $custom_post_types->getCustomPostTypeModels($post_type_slug);
171
+	}
172
+
173
+
174
+	/**
175
+	 * @deprecated 4.9.62.p
176
+	 * @param string $taxonomy_name , eg 'books'
177
+	 * @param string $singular_name internationalized singular name
178
+	 * @param string $plural_name   internationalized plural name
179
+	 * @param array  $override_args like $args on http://codex.wordpress.org/Function_Reference/register_taxonomy
180
+	 * @throws InvalidArgumentException
181
+	 * @throws InvalidDataTypeException
182
+	 * @throws InvalidInterfaceException
183
+	 * @throws DomainException
184
+	 */
185
+	public function register_taxonomy($taxonomy_name, $singular_name, $plural_name, $override_args = array())
186
+	{
187
+		/** @var \EventEspresso\core\domain\services\custom_post_types\registerCustomTaxonomies $taxonomies */
188
+		$taxonomies = LoaderFactory::getLoader()->getShared(
189
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'
190
+		);
191
+		$taxonomies->registerCustomTaxonomy(
192
+			$taxonomy_name,
193
+			$singular_name,
194
+			$plural_name,
195
+			$override_args
196
+		);
197
+	}
198
+
199
+
200
+	/**
201
+	 * @deprecated 4.9.62.p
202
+	 * @param string $post_type     the actual post type name
203
+	 *                              (VERY IMPORTANT: this much match what the slug is for admin pages related to this
204
+	 *                              cpt Also any models must use this slug as well)
205
+	 * @param string $singular_name a pre-internationalized string for the singular name of the objects
206
+	 * @param string $plural_name   a pre-internalized string for the plural name of the objects
207
+	 * @param array  $override_args exactly like $args as described in
208
+	 *                              http://codex.wordpress.org/Function_Reference/register_post_type The default values
209
+	 *                              set in this function will be overridden by whatever you set in $override_args
210
+	 * @param string $singular_slug
211
+	 * @param string $plural_slug
212
+	 * @return void , but registers the custom post type
213
+	 * @throws InvalidArgumentException
214
+	 * @throws InvalidDataTypeException
215
+	 * @throws InvalidInterfaceException
216
+	 * @throws DomainException
217
+	 */
218
+	public function register_CPT(
219
+		$post_type,
220
+		$singular_name,
221
+		$plural_name,
222
+		$override_args = array(),
223
+		$singular_slug = '',
224
+		$plural_slug = ''
225
+	) {
226
+		/** @var \EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes $register_custom_post_types */
227
+		$register_custom_post_types = LoaderFactory::getLoader()->getShared(
228
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'
229
+		);
230
+		$register_custom_post_types->registerCustomPostType(
231
+			$post_type,
232
+			$singular_name,
233
+			$plural_name,
234
+			$singular_slug,
235
+			$plural_slug,
236
+			$override_args
237
+		);
238
+	}
239
+
240
+
241
+	/**
242
+	 * @return RegisterCustomTaxonomyTerms
243
+	 * @throws InvalidArgumentException
244
+	 * @throws InvalidDataTypeException
245
+	 * @throws InvalidInterfaceException
246
+	 */
247
+	public static function getRegisterCustomTaxonomyTerms()
248
+	{
249
+		return LoaderFactory::getLoader()->getShared(
250
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomyTerms'
251
+		);
252
+	}
253
+
254
+
255
+	/**
256
+	 * @deprecated 4.9.62.p
257
+	 * @throws InvalidArgumentException
258
+	 * @throws InvalidDataTypeException
259
+	 * @throws InvalidInterfaceException
260
+	 */
261
+	public function set_must_use_event_types()
262
+	{
263
+		$register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
264
+		$register_custom_taxonomy_terms->setMustUseEventTypes();
265
+	}
266
+
267
+
268
+	/**
269
+	 * @deprecated 4.9.62.p
270
+	 * @param string $taxonomy     The name of the taxonomy
271
+	 * @param array  $term_details An array of term details indexed by slug and containing Name of term, and
272
+	 *                             description as the elements in the array
273
+	 * @return void
274
+	 * @throws InvalidArgumentException
275
+	 * @throws InvalidDataTypeException
276
+	 * @throws InvalidInterfaceException
277
+	 */
278
+	public function set_must_use_terms($taxonomy, $term_details)
279
+	{
280
+		$register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
281
+		$register_custom_taxonomy_terms->setMustUseTerms($taxonomy, $term_details);
282
+	}
283
+
284
+
285
+	/**
286
+	 * @deprecated 4.9.62.p
287
+	 * @param string $taxonomy  The taxonomy we're using for the default term
288
+	 * @param string $term_slug The slug of the term that will be the default.
289
+	 * @param array  $cpt_slugs An array of custom post types we want the default assigned to
290
+	 * @throws InvalidArgumentException
291
+	 * @throws InvalidDataTypeException
292
+	 * @throws InvalidInterfaceException
293
+	 */
294
+	public function set_default_term($taxonomy, $term_slug, $cpt_slugs = array())
295
+	{
296
+		$register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
297
+		$register_custom_taxonomy_terms->registerCustomTaxonomyTerm(
298
+			$taxonomy,
299
+			$term_slug,
300
+			$cpt_slugs
301
+		);
302
+	}
303
+
304
+
305
+	/**
306
+	 * @deprecated 4.9.62.p
307
+	 * @param  int     $post_id ID of CPT being saved
308
+	 * @param  WP_Post $post    Post object
309
+	 * @return void
310
+	 * @throws InvalidArgumentException
311
+	 * @throws InvalidDataTypeException
312
+	 * @throws InvalidInterfaceException
313
+	 */
314
+	public function save_default_term($post_id, $post)
315
+	{
316
+		$register_custom_taxonomy_terms = EE_Register_CPTs::getRegisterCustomTaxonomyTerms();
317
+		$register_custom_taxonomy_terms->saveDefaultTerm($post_id, $post);
318
+	}
319 319
 }
320 320
 
321 321
 /**
@@ -327,24 +327,24 @@  discard block
 block discarded – undo
327 327
 class EE_Default_Term
328 328
 {
329 329
 
330
-    // props holding the items
331
-    public $taxonomy = '';
330
+	// props holding the items
331
+	public $taxonomy = '';
332 332
 
333
-    public $cpt_slugs = array();
333
+	public $cpt_slugs = array();
334 334
 
335
-    public $term_slug = '';
335
+	public $term_slug = '';
336 336
 
337 337
 
338
-    /**
339
-     * @deprecated 4.9.62.p
340
-     * @param string $taxonomy  The taxonomy the default term belongs to
341
-     * @param string $term_slug The slug of the term that will be the default.
342
-     * @param array  $cpt_slugs The custom post type the default term gets saved with
343
-     */
344
-    public function __construct($taxonomy, $term_slug, $cpt_slugs = array())
345
-    {
346
-        $this->taxonomy = $taxonomy;
347
-        $this->cpt_slugs = (array) $cpt_slugs;
348
-        $this->term_slug = $term_slug;
349
-    }
338
+	/**
339
+	 * @deprecated 4.9.62.p
340
+	 * @param string $taxonomy  The taxonomy the default term belongs to
341
+	 * @param string $term_slug The slug of the term that will be the default.
342
+	 * @param array  $cpt_slugs The custom post type the default term gets saved with
343
+	 */
344
+	public function __construct($taxonomy, $term_slug, $cpt_slugs = array())
345
+	{
346
+		$this->taxonomy = $taxonomy;
347
+		$this->cpt_slugs = (array) $cpt_slugs;
348
+		$this->term_slug = $term_slug;
349
+	}
350 350
 }
Please login to merge, or discard this patch.