Skip to content

Commit

Permalink
Initial release.
Browse files Browse the repository at this point in the history
  • Loading branch information
fumikito committed Nov 16, 2021
1 parent 8887519 commit b1ae74e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ VERSION=${1#"$PREFIX"}
echo "Building Taro CPT Front v${VERSION}..."

# Install composer.
composer install --no-dev --prefer-dist
# Temporary ignore.
# composer install --no-dev --prefer-dist

# Install NPM.
npm install
Expand Down
4 changes: 2 additions & 2 deletions includes/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if ( ! ts_cptf_is_front( $post ) ) {
return $states;
}
$states[ 'is-front' ] = __( 'Front Page', 'tscptf' );
$states['is-front'] = __( 'Front Page', 'tscptf' );
return $states;
}, 10, 2 );

Expand Down Expand Up @@ -45,7 +45,7 @@
}
add_meta_box( 'tscpf-is-front', __( 'Front Page Setting', 'tscptf' ), function( WP_Post $post ) {
$front = ts_cptf_get_front_page( $post->post_type );
if ( $front && $front->ID !== $post->ID ) {
if ( $front && $front->ID !== $post->ID ) {
// Other page is front.
printf(
'<p class="description">%s: <a href="%s" target="_blank" rel="noopener noreferrer">%s</a><br />%s</p>',
Expand Down
4 changes: 2 additions & 2 deletions includes/rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// This is front page.
// Generate original pemalink.
$struct = ts_cptf_post_type_struct( $post->post_type );
$link = apply_filters( 'tscptf_root_url', home_url( $struct ), $post );
$link = apply_filters( 'tscptf_root_url', home_url( $struct ), $post );
}
return $link;
}, 10, 2 );
Expand Down Expand Up @@ -43,7 +43,7 @@
continue;
}
$new_rules[ '^' . $struct . '/page/(\d+)/?$' ] = sprintf( 'index.php?root_of=%s&page=$matches[1]', $post_type );
$new_rules[ '^' . $struct . '/?$' ] = 'index.php?root_of=' . $post_type;
$new_rules[ '^' . $struct . '/?$' ] = 'index.php?root_of=' . $post_type;
}
if ( ! empty( $new_rules ) ) {
$rules = array_merge( $new_rules, $rules );
Expand Down

0 comments on commit b1ae74e

Please sign in to comment.