Plugin does not add action

Activation hook is run only after the plugin get activated. So only once and only during that one request. It’s meant to allow author of a plugin to perform some actions after the plugin is activated. Actions, that need to be done only once. For example if your plugin uses custom database table – you can use activation hook to create such table.

On the other hand, add_action has to be done every time, for every request, if you want it to be run during that request.

And if plugin is not active, then its code is not run any more, so its actions won’t get executed.

This means that:

  1. You don’t need to use activation hook in this case.
  2. You have to add your actions every time.
  3. You don’t need to remove your actions – they won’t be executed after your plugin gets deactivated.

So here’s your code after fixes:

function my_general_section() {
    register_setting('general','option_1', 'esc_attr');
    register_setting('general','option_2', 'esc_attr');

    add_settings_section(  
        'my_settings_section', // Section ID 
        'My Options Title', // Section Title
        'my_section_options_callback', // Callback
        'general' // What Page?  This makes the section show up on the General Settings Page
    );

    add_settings_field( // Option 1
        'option_1', // Option ID
        'Option 1', // Label
        'my_textbox_callback', // !important - This is where the args go!
        'general', // Page it will be displayed (General Settings)
        'my_settings_section', // Name of our section
        array( // The $args
            'option_1' // Should match Option ID
        )  
    ); 

    add_settings_field( // Option 2
        'option_2', // Option ID
        'Option 2', // Label
        'my_textbox_callback', // !important - This is where the args go!
        'general', // Page it will be displayed
        'my_settings_section', // Name of our section (General Settings)
        array( // The $args
            'option_2' // Should match Option ID
        )  
    ); 
}

function my_section_options_callback() { // Section Callback
    echo '<p>A little message on editing info</p>';  
}

function my_textbox_callback($args) {  // Textbox Callback
    $option = get_option($args[0]);
    echo '<input type="text" id="'. $args[0] .'" name="'. $args[0] .'" value="' . $option . '" />';
}
add_action('admin_init', 'my_general_section');