Skip to content

Commit 1b28db7

Browse files
committed
phpcbf format fixes
1 parent eab78d6 commit 1b28db7

15 files changed

+505
-505
lines changed

inc/certificates-functions.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22
class Certificates_Website {
3-
public static function set_certificates_logo() {
4-
return 'products/certificates.svg#certificates';
5-
}
6-
public static function set_certificates_logo_image_size() {
7-
return '215 40';
8-
}
3+
public static function set_certificates_logo() {
4+
return 'products/certificates.svg#certificates';
5+
}
6+
public static function set_certificates_logo_image_size() {
7+
return '215 40';
8+
}
99
}
1010

11-
add_filter('cc_theme_base_set_default_size_logo', array( 'Certificates_Website', 'set_certificates_logo_image_size' ) );
12-
add_filter('cc_theme_base_set_default_logo', array( 'Certificates_Website', 'set_certificates_logo' ));
11+
add_filter( 'cc_theme_base_set_default_size_logo', array( 'Certificates_Website', 'set_certificates_logo_image_size' ) );
12+
add_filter( 'cc_theme_base_set_default_logo', array( 'Certificates_Website', 'set_certificates_logo' ) );

inc/custom-post-types/queulat-cc-course-cpt-plugin/cc-course-cpt-plugin.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
/**
33
* Plugin Name: Courses Custom Post Type Plugin
44
* Plugin URI: https://certificates.
5-
* Description:
5+
* Description:
66
* Version: 0.1.0
77
* Author:
88
* Author URI:
99
* License: GPL-3.0-or-later
1010
*/
1111

1212
function Cc_Course_Post_Type_register_post_type() {
13-
require_once __DIR__ .'/class-cc-course-post-type.php';
13+
require_once __DIR__ . '/class-cc-course-post-type.php';
1414
Cc_Course_Post_Type::activate_plugin();
15-
require_once __DIR__ .'/class-cc-course-post-type.php';
16-
require_once __DIR__ .'/class-cc-course-post-query.php';
17-
require_once __DIR__ .'/class-cc-course-post-object.php';
18-
require_once __DIR__ .'/class-cc-course-metabox.php';
15+
require_once __DIR__ . '/class-cc-course-post-type.php';
16+
require_once __DIR__ . '/class-cc-course-post-query.php';
17+
require_once __DIR__ . '/class-cc-course-post-object.php';
18+
require_once __DIR__ . '/class-cc-course-metabox.php';
1919
}
2020

2121

22-
add_action('init', 'Cc_Course_Post_Type_register_post_type');
22+
add_action( 'init', 'Cc_Course_Post_Type_register_post_type' );

inc/custom-post-types/queulat-cc-course-cpt-plugin/class-cc-course-metabox.php

+34-37
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,47 @@
55
use Queulat\Forms\Element\Input_Text;
66

77

8-
class Course_Metabox extends Metabox
9-
{
10-
public function __construct($id = '', $title = '', $post_type = '', array $args = array())
11-
{
12-
parent::__construct($id, $title, $post_type, $args);
8+
class Course_Metabox extends Metabox {
9+
10+
public function __construct( $id = '', $title = '', $post_type = '', array $args = array() ) {
11+
parent::__construct( $id, $title, $post_type, $args );
1312
}
14-
public function get_fields(): array
15-
{
13+
public function get_fields(): array {
1614
return [
1715
Node_Factory::make(
1816
Input_Text::class,
19-
[
20-
'name' => 'duration',
21-
'label' => 'Course duration',
22-
'attributes' => [
23-
'class' => 'regular-text'
24-
]
25-
]
26-
),
17+
[
18+
'name' => 'duration',
19+
'label' => 'Course duration',
20+
'attributes' => [
21+
'class' => 'regular-text',
22+
],
23+
]
24+
),
2725
Node_Factory::make(
2826
Input_Text::class,
29-
[
30-
'name' => 'language',
31-
'label' => 'Course Language',
32-
'attributes' => [
33-
'class' => 'regular-text',
34-
]
35-
]
36-
)
37-
];
38-
}
39-
public function sanitize_data(array $data): array
40-
{
41-
$sanitized = [];
42-
foreach ($data as $key => $val) {
43-
switch ($key) {
44-
case 'duration':
45-
case 'language':
46-
$sanitized[$key] = sanitize_text_field($val);
47-
break;
48-
}
27+
[
28+
'name' => 'language',
29+
'label' => 'Course Language',
30+
'attributes' => [
31+
'class' => 'regular-text',
32+
],
33+
]
34+
),
35+
];
36+
}
37+
public function sanitize_data( array $data ): array {
38+
$sanitized = [];
39+
foreach ( $data as $key => $val ) {
40+
switch ( $key ) {
41+
case 'duration':
42+
case 'language':
43+
$sanitized[ $key ] = sanitize_text_field( $val );
44+
break;
4945
}
50-
return $sanitized;
5146
}
47+
return $sanitized;
48+
}
5249
}
5350

54-
new Course_Metabox('course', 'Course related data', 'cc_course', ['context' => 'normal']);
51+
new Course_Metabox( 'course', 'Course related data', 'cc_course', [ 'context' => 'normal' ] );

inc/custom-post-types/queulat-cc-course-cpt-plugin/class-cc-course-post-type.php

+34-34
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,41 @@ public function get_post_type() : string {
88
}
99
public function get_post_type_args() : array {
1010
return [
11-
'label' => __('Courses', 'cpt_cc_course'),
11+
'label' => __( 'Courses', 'cpt_cc_course' ),
1212
'labels' => [
13-
'name' => __('Courses', 'cpt_cc_course'),
14-
'singular_name' => __('Courses', 'cpt_cc_course'),
15-
'add_new' => __('Add New', 'cpt_cc_course'),
16-
'add_new_item' => __('Add New Page', 'cpt_cc_course'),
17-
'edit_item' => __('Edit Page', 'cpt_cc_course'),
18-
'new_item' => __('New Page', 'cpt_cc_course'),
19-
'view_item' => __('View Page', 'cpt_cc_course'),
20-
'view_items' => __('View Pages', 'cpt_cc_course'),
21-
'search_items' => __('Search Pages', 'cpt_cc_course'),
22-
'not_found' => __('No pages found.', 'cpt_cc_course'),
23-
'not_found_in_trash' => __('No pages found in Trash.', 'cpt_cc_course'),
24-
'parent_item_colon' => __('Parent Page:', 'cpt_cc_course'),
25-
'all_items' => __('Courses', 'cpt_cc_course'),
26-
'archives' => __('Courses', 'cpt_cc_course'),
27-
'attributes' => __('Page Attributes', 'cpt_cc_course'),
28-
'insert_into_item' => __('Insert into page', 'cpt_cc_course'),
29-
'uploaded_to_this_item' => __('Uploaded to this page', 'cpt_cc_course'),
30-
'featured_image' => __('Featured Image', 'cpt_cc_course'),
31-
'set_featured_image' => __('Set featured image', 'cpt_cc_course'),
32-
'remove_featured_image' => __('Remove featured image', 'cpt_cc_course'),
33-
'use_featured_image' => __('Use as featured image', 'cpt_cc_course'),
34-
'filter_items_list' => __('Filter pages list', 'cpt_cc_course'),
35-
'items_list_navigation' => __('Pages list navigation', 'cpt_cc_course'),
36-
'items_list' => __('Pages list', 'cpt_cc_course'),
37-
'item_published' => __('Page published.', 'cpt_cc_course'),
38-
'item_published_privately' => __('Page published privately.', 'cpt_cc_course'),
39-
'item_reverted_to_draft' => __('Page reverted to draft.', 'cpt_cc_course'),
40-
'item_scheduled' => __('Page scheduled.', 'cpt_cc_course'),
41-
'item_updated' => __('Page updated.', 'cpt_cc_course'),
42-
'menu_name' => __('Courses', 'cpt_cc_course'),
43-
'name_admin_bar' => __('Courses', 'cpt_cc_course'),
13+
'name' => __( 'Courses', 'cpt_cc_course' ),
14+
'singular_name' => __( 'Courses', 'cpt_cc_course' ),
15+
'add_new' => __( 'Add New', 'cpt_cc_course' ),
16+
'add_new_item' => __( 'Add New Page', 'cpt_cc_course' ),
17+
'edit_item' => __( 'Edit Page', 'cpt_cc_course' ),
18+
'new_item' => __( 'New Page', 'cpt_cc_course' ),
19+
'view_item' => __( 'View Page', 'cpt_cc_course' ),
20+
'view_items' => __( 'View Pages', 'cpt_cc_course' ),
21+
'search_items' => __( 'Search Pages', 'cpt_cc_course' ),
22+
'not_found' => __( 'No pages found.', 'cpt_cc_course' ),
23+
'not_found_in_trash' => __( 'No pages found in Trash.', 'cpt_cc_course' ),
24+
'parent_item_colon' => __( 'Parent Page:', 'cpt_cc_course' ),
25+
'all_items' => __( 'Courses', 'cpt_cc_course' ),
26+
'archives' => __( 'Courses', 'cpt_cc_course' ),
27+
'attributes' => __( 'Page Attributes', 'cpt_cc_course' ),
28+
'insert_into_item' => __( 'Insert into page', 'cpt_cc_course' ),
29+
'uploaded_to_this_item' => __( 'Uploaded to this page', 'cpt_cc_course' ),
30+
'featured_image' => __( 'Featured Image', 'cpt_cc_course' ),
31+
'set_featured_image' => __( 'Set featured image', 'cpt_cc_course' ),
32+
'remove_featured_image' => __( 'Remove featured image', 'cpt_cc_course' ),
33+
'use_featured_image' => __( 'Use as featured image', 'cpt_cc_course' ),
34+
'filter_items_list' => __( 'Filter pages list', 'cpt_cc_course' ),
35+
'items_list_navigation' => __( 'Pages list navigation', 'cpt_cc_course' ),
36+
'items_list' => __( 'Pages list', 'cpt_cc_course' ),
37+
'item_published' => __( 'Page published.', 'cpt_cc_course' ),
38+
'item_published_privately' => __( 'Page published privately.', 'cpt_cc_course' ),
39+
'item_reverted_to_draft' => __( 'Page reverted to draft.', 'cpt_cc_course' ),
40+
'item_scheduled' => __( 'Page scheduled.', 'cpt_cc_course' ),
41+
'item_updated' => __( 'Page updated.', 'cpt_cc_course' ),
42+
'menu_name' => __( 'Courses', 'cpt_cc_course' ),
43+
'name_admin_bar' => __( 'Courses', 'cpt_cc_course' ),
4444
],
45-
'description' => __('', 'cpt_cc_course'),
45+
'description' => __( '', 'cpt_cc_course' ),
4646
'public' => true,
4747
'hierarchical' => true,
4848
'exclude_from_search' => false,
@@ -79,7 +79,7 @@ public function get_post_type_args() : array {
7979
],
8080
'show_in_rest' => true,
8181
'rest_base' => false,
82-
'rest_controller_class' => false
82+
'rest_controller_class' => false,
8383
];
8484
}
8585
}

inc/custom-post-types/queulat-cc-events-cpt-plugin/cc-events-cpt-plugin.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
/**
33
* Plugin Name: Events Custom Post Type Plugin
44
* Plugin URI:
5-
* Description:
5+
* Description:
66
* Version: 0.1.0
77
* Author:
88
* Author URI:
99
* License: GPL-3.0-or-later
1010
*/
1111
function Cc_events_Post_Type_register_post_type() {
12-
require_once __DIR__ .'/class-cc-events-post-type.php';
12+
require_once __DIR__ . '/class-cc-events-post-type.php';
1313
Cc_events_Post_Type::activate_plugin();
14-
require_once __DIR__ .'/class-cc-events-post-type.php';
15-
require_once __DIR__ .'/class-cc-events-post-query.php';
16-
require_once __DIR__ .'/class-cc-events-post-object.php';
17-
require_once __DIR__ .'/class-cc-events-post-metabox.php';
14+
require_once __DIR__ . '/class-cc-events-post-type.php';
15+
require_once __DIR__ . '/class-cc-events-post-query.php';
16+
require_once __DIR__ . '/class-cc-events-post-object.php';
17+
require_once __DIR__ . '/class-cc-events-post-metabox.php';
1818
}
1919

20-
add_action('init', 'Cc_events_Post_Type_register_post_type');
20+
add_action( 'init', 'Cc_events_Post_Type_register_post_type' );

0 commit comments

Comments
 (0)