Skip to content

Commit

Permalink
Remove some unused parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Feb 15, 2024
1 parent 9b62d34 commit 3ee4c7d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/PostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function init(): void {
# Custom post type permastruct:
if ( $this->args['rewrite'] && ! empty( $this->args['rewrite']['permastruct'] ) ) {
add_action( 'registered_post_type', [ $this, 'registered_post_type' ], 1, 2 );
add_filter( 'post_type_link', [ $this, 'post_type_link' ], 1, 4 );
add_filter( 'post_type_link', [ $this, 'post_type_link' ], 1, 2 );
}

# Rewrite testing:
Expand Down Expand Up @@ -646,11 +646,9 @@ public function registered_post_type( string $post_type, WP_Post_Type $post_type
*
* @param string $post_link The post's permalink.
* @param WP_Post $post The post in question.
* @param bool $leavename Whether to keep the post name.
* @param bool $sample Is it a sample permalink.
* @return string The post's permalink.
*/
public function post_type_link( string $post_link, WP_Post $post, bool $leavename, bool $sample ): string {
public function post_type_link( string $post_link, WP_Post $post ): string {
# If it's not our post type, bail out:
if ( $this->post_type !== $post->post_type ) {
return $post_link;
Expand Down

0 comments on commit 3ee4c7d

Please sign in to comment.