Skip to content

Commit

Permalink
fix access levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Nov 16, 2023
1 parent b7ae2dd commit 25cab08
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions includes/Classifai/Features/ContentResizing.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function get_label() {
*
* @return array
*/
public function get_providers() {
protected function get_providers() {
return apply_filters(
'classifai_' . static::ID . '_providers',
[
Expand Down Expand Up @@ -171,7 +171,7 @@ public function is_feature_enabled() {
*
* @return array
*/
public function get_default_settings() {
protected function get_default_settings() {
return [
'status' => '0',
'roles' => $this->roles,
Expand Down Expand Up @@ -205,7 +205,7 @@ public function get_default_settings() {
*
* @return array
*/
public function sanitize_settings( $new_settings ) {
protected function sanitize_settings( $new_settings ) {
$settings = $this->get_settings();

$new_settings['status'] = $new_settings['status'] ?? $settings['status'];
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Features/ExcerptGeneration.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function is_feature_enabled() {
*
* @return array
*/
public function get_default_settings() {
protected function get_default_settings() {
return [
'status' => '0',
'roles' => $this->roles,
Expand All @@ -198,7 +198,7 @@ public function get_default_settings() {
*
* @return array
*/
public function sanitize_settings( $new_settings ) {
protected function sanitize_settings( $new_settings ) {
$settings = $this->get_settings();

$new_settings['status'] = $new_settings['status'] ?? $settings['status'];
Expand Down
7 changes: 6 additions & 1 deletion includes/Classifai/Features/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,23 @@ abstract public function get_label();

/**
* Set up the fields for each section.
*
* @internal
*/
abstract public function setup_fields_sections();
abstract protected function setup_fields_sections();

/**
* Returns the default settings for the feature.
*
* @internal
* @return array
*/
abstract protected function get_default_settings();

/**
* Returns the providers supported by the feature.
*
* @internal
* @return array
*/
abstract protected function get_providers();
Expand All @@ -93,6 +97,7 @@ abstract protected function get_providers();
*
* @param array $settings The settings to be sanitized on save.
*
* @internal
* @return array
*/
abstract protected function sanitize_settings( $settings );
Expand Down
6 changes: 3 additions & 3 deletions includes/Classifai/Features/TextToSpeech.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function get_label() {
*
* @return array
*/
public function get_providers() {
protected function get_providers() {
return apply_filters(
'classifai_' . static::ID . '_providers',
[
Expand Down Expand Up @@ -184,7 +184,7 @@ protected function get_post_types_select_options() {
*
* @return array
*/
public function get_default_settings() {
protected function get_default_settings() {
return [
'status' => '0',
'roles' => $this->roles,
Expand Down Expand Up @@ -225,7 +225,7 @@ public function get_tts_supported_post_types() {
*
* @return array
*/
public function sanitize_settings( $new_settings ) {
protected function sanitize_settings( $new_settings ) {
$settings = $this->get_settings();

$new_settings['status'] = $new_settings['status'] ?? $settings['status'];
Expand Down
6 changes: 3 additions & 3 deletions includes/Classifai/Features/TitleGeneration.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function get_label() {
*
* @return array
*/
public function get_providers() {
protected function get_providers() {
return apply_filters(
'classifai_' . static::ID . '_providers',
[
Expand Down Expand Up @@ -162,7 +162,7 @@ public function is_feature_enabled() {
*
* @return array
*/
public function get_default_settings() {
protected function get_default_settings() {
return
apply_filters(
'classifai_' . static::ID . '_get_default_settings',
Expand Down Expand Up @@ -194,7 +194,7 @@ public function get_default_settings() {
*
* @return array
*/
public function sanitize_settings( $new_settings ) {
protected function sanitize_settings( $new_settings ) {
$settings = $this->get_settings();

$new_settings['status'] = $new_settings['status'] ?? $settings['status'];
Expand Down

0 comments on commit 25cab08

Please sign in to comment.