Preset Widgets ONLY after site is initially created

Why not output your Theme’s custom Widgets using the_widget(), inside of a if ( ! dynamic_sidebar( ‘sidebar-name’ ) ) conditional? e.g. <?php if ( !dynamic_sidebar( ‘sidebar-right’ ) ) { $widgetsidebarrightargs = array( ‘before_widget’ => ‘<div class=”widget”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”title widgettitle”>’, ‘after_title’ => ‘</div>’ ); the_widget(‘WP_Widget_Calendar’ , ‘title=” , $widgetsidebarrightargs ); the_widget( … Read more

add_action hook for links.php page

OK, I made an awful, but working solution: the hook is admin_menu, than, in the called function, I added if( strstr($_SERVER[‘PHP_SELF’],’link.php’) in the begining. If there’s a better solution, please someone send it.