Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/#496_Small_warning_about_plain_permalinks #503

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions orgSeries-admin.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.publishpress-series-permalink-error {
background: #fff;
border: 1px solid #c3c4c7;
border-left-width: 4px;
box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
border-left-color: #d63638;
margin: 5px 0 15px;
padding: 5px 5px;
}

.ppseries-settings-tab-content .description {
font-weight: initial;
}
Expand Down
20 changes: 20 additions & 0 deletions orgSeries-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,26 @@ function series_automation_core_fieldset() {
<td>
<span id="toc-home-url"><?php bloginfo('url') ?>/</span><input type="text" name="<?php echo esc_attr($org_name); ?>[series_toc_url]" id="series_toc_url" value="<?php echo isset($org_opt['series_toc_url']) ? esc_attr(htmlspecialchars($org_opt['series_toc_url'])) : ''; ?>" />
<button onclick="gotoTOCUrl(event)" class="button">view page</button>

<?php
global $wp_rewrite;
if ( empty( $wp_rewrite->permalink_structure ) ) {
?>
<div class="publishpress-series-permalink-error">
<p>
<?php
printf(
esc_html__( 'You must %1s update your permalink structure %2s to something other than the default for Series Table of Contents url to work.', 'organize-series' ),
'<a href="' . admin_url('options-permalink.php') . '">',
'</a>'
);
?>
</p>
</div>
<?php
}
?>

</td>
</tr>
<script>
Expand Down