Skip to content
Open
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
21 changes: 20 additions & 1 deletion rest-api-console.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,27 @@ public function maybe_render_iframe() {

public function render_page() {
$url = add_query_arg( 'iframe', 'yesplease' );

if ( ! get_option('permalink_structure') ) {
?>
<div class="notice notice-error">
<p><?php
printf(
__( 'Permalink settings are set to <strong>Plain</strong>, which prevents the REST API from working. Please change to another permalink type on the <a href="%s">Permalink Settings</a> page.', 'rest-api-console' ),
admin_url( 'options-permalink.php' )
); ?>
</p>
</div>
<?php
} else {
?>
<iframe src="<?php echo esc_url( $url ) ?>" style="width: 100%; height: 600px;"></iframe>
<?php
}
}

public function missing_pretty_permalinks() {
?>
<iframe src="<?php echo esc_url( $url ) ?>" style="width: 100%; height: 600px;"></iframe>
<?php
}

Expand Down