I want to create table only if my custom theme is activated. I have tried with
after_switch_theme action hook but it is creating table regardless my custom theme. This means it is triggering action if I activate
Twenty fifteen or any other theme.
add_action('after_switch_theme', ['\Recruitment\recruitment', 'create_table']);
I want to create table only if my custom theme is a current theme or activating that theme.
Is there any hook for it or any alternate way?