Skip to content
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
2 changes: 1 addition & 1 deletion src/class-acm-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function form( $instance ) {
?>
</select>
<?php else : ?>
<?php $create_url = add_query_arg( 'page', $ad_code_manager->plugin_slug, admin_url( 'tools.php' ) ); ?>
<?php $create_url = add_query_arg( 'page', $ad_code_manager->plugin_slug, admin_url( 'options-general.php' ) ); ?>
<span class="description"><?php echo sprintf( __( "No ad codes have been added yet. <a href='%s'>Please create one</a>.", 'ad-code-manager' ), esc_url( $create_url ) ); ?></span>
<?php endif; ?>
</p>
Expand Down
6 changes: 3 additions & 3 deletions src/class-ad-code-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ function edit_conditionals( $ad_code_id, $conditionals = array() ) {
* Hook in our submenu page to the navigation
*/
public function action_admin_menu() {
$hook = add_management_page(
$hook = add_options_page(
__( 'Ad Code Manager', 'ad-code-manager' ),
__( 'Ad Code Manager', 'ad-code-manager' ),
$this->manage_ads_cap,
Expand Down Expand Up @@ -641,7 +641,7 @@ function parse_readme_into_contextual_help() {

function contextual_help() {
global $pagenow;
if ( 'tools.php' !== $pagenow || ! isset( $_GET['page'] ) || $_GET['page'] !== $this->plugin_slug ) {
if ( 'options-general.php' !== $pagenow || ! isset( $_GET['page'] ) || $_GET['page'] !== $this->plugin_slug ) {
return;
}
[ $description, $configuration, $filters ] = $this->parse_readme_into_contextual_help();
Expand Down Expand Up @@ -716,7 +716,7 @@ function register_scripts_and_styles() {
global $pagenow;

// Only load this on the proper page
if ( 'tools.php' !== $pagenow || ! isset( $_GET['page'] ) || $_GET['page'] != $this->plugin_slug ) {
if ( 'options-general.php' !== $pagenow || ! isset( $_GET['page'] ) || $_GET['page'] != $this->plugin_slug ) {
return;
}

Expand Down