$value ) { if ( is_int( $key ) ) { $result[ $key ] = strip_tags( $input[ $key ] ); } } return $result; } add_settings_section( 'awr_plugin_primary' , 'Settings', 'awr_plugin_section_text', 'awr_options_page' ); function awr_plugin_section_text() { _e( 'Titles of widget row pages' , 'adapter-widget-rows' ); } add_settings_field( 'awr_plugin_first_page_title' , __( 'Page titles' , 'adapter-widget-rows' ) , 'awr_plugin_setting_first_page_title_output' , 'awr_options_page' , 'awr_plugin_primary' ); function awr_plugin_setting_first_page_title_output() { $map_awr_index_to_page_title = get_option( 'map_awr_index_to_page_title' ); foreach( $map_awr_index_to_page_title as $awr_index => $page_title ) { if ( $page_title ) { $delete_text = __( 'Delete' , 'adapter-widget-rows' ); echo " {$delete_text}

\n"; } } } } // Add settings link on the main plugin page add_filter( 'plugin_action_links' , 'awr_add_settings_link' , 2 , 2 ); function awr_add_settings_link( $actions, $file ) { if ( false !== strpos( $file, AWR_PLUGIN_SLUG ) ) { $options_url = admin_url( 'options-general.php?page=awr_options_page' ); $actions[ 'settings' ] = "" . __( 'Settings' , 'adapter-widget-rows' ) . ""; } return $actions; }