Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
torounit committed Aug 23, 2023
1 parent fd2077d commit 9c78285
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion .phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
<description>Generally-applicable sniffs for WordPress plugins.</description>
<ini name="error_reporting" value="E_ALL &#38; ~E_DEPRECATED" />
<!-- What to scan -->
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
Expand Down
2 changes: 1 addition & 1 deletion CPTP/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function register() {
/**
* Module hook point.
*/
abstract function add_hook();
abstract public function add_hook();

/**
* Uninstall hooks
Expand Down
2 changes: 1 addition & 1 deletion CPTP/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public static function get_date_front( $post_type ) {
$front = '/date';
break;
}
$tok_index ++;
++$tok_index;
}

$front = apply_filters( 'CPTP_date_front', $front, $post_type, $structure );
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Edit the permalink of custom post type.
[![Downloads](https://img.shields.io/wordpress/plugin/dt/custom-post-type-permalinks.svg?style=for-the-badge)](https://wordpress.org/plugins/custom-post-type-permalinks/)
[![Tested up](https://img.shields.io/wordpress/v/custom-post-type-permalinks.svg?style=for-the-badge)](https://wordpress.org/plugins/custom-post-type-permalinks/)
[![wp.org rating](https://img.shields.io/wordpress/plugin/r/custom-post-type-permalinks.svg?style=for-the-badge)](https://wordpress.org/plugins/custom-post-type-permalinks/)
[![Build Status](https://img.shields.io/github/workflow/status/torounit/custom-post-type-permalinks/Test?style=for-the-badge)](https://github.com/torounit/custom-post-type-permalinks/actions)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/torounit/custom-post-type-permalinks/test-and-release.yml?branch=master&style=for-the-badge)](https://github.com/torounit/custom-post-type-permalinks/actions)

[![](https://ps.w.org/custom-post-type-permalinks/assets/banner-1544x500.png?rev=1044335)](https://wordpress.org/plugins/custom-post-type-permalinks/)
Expand Down
4 changes: 1 addition & 3 deletions custom-post-type-permalinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
* @param string $class_name class name.
*/
function cptp_class_loader( $class_name ) {
$dir = dirname( __FILE__ );
$file_name = $dir . '/' . str_replace( '_', '/', $class_name ) . '.php';
$file_name = __DIR__ . '/' . str_replace( '_', '/', $class_name ) . '.php';
if ( is_readable( $file_name ) ) {
include $file_name;
}
Expand All @@ -72,4 +71,3 @@ function cptp_init() {
* Activation hooks.
*/
register_activation_hook( CPTP_PLUGIN_FILE, array( CPTP::get_instance(), 'activate' ) );

0 comments on commit 9c78285

Please sign in to comment.