• Resolved lbeckerpointio

    (@lbeckerpointio)


    I used the code as shown on Otto’s tutorial and tried to change the option name ‘text_string’ to something else – ‘embedded_url’. I have WP_DEBUG enabled. When I loaded my plugin’s settings page, right above my text input field is this error: “Notice: Undefined index: embedded_url in ….” and then it points to the echo line of this function:

    function plugin_setting_url() {
    	$options = get_option('plugin_options');
    	echo "<input id='plugin_url' name='plugin_options[embedded_url]' size='40' type='text' value='{$options['embedded_url']}' />";
    }

    Since this is the only place that ‘text_string’ appears other than the validation method, I do not understand why ’embedded_url’ is not defined in the same manner as ‘text_string’ was. What am I doing incorrectly?

  • The topic ‘Error when changing option name’ is closed to new replies.