What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?

First issue – you have dependency backwards. Depending on something means loading after dependency, while you want earlier. Second issue – theme’s stylesheet doesn’t actually use enqueue, it is usually codded directly in header.php file of theme. And since it seems to come before wp_head() call – you have no hook to ensure your stylesheet … Read more

How do I write into a file (css)

What’s wrong with saving CSS to the database? That is the correct approach. And that way, you can simply output the options to a function, which can be enqueued properly, using wp_print_styles, and entirely avoid file operations/writing to .css files.

add a class when login

If you are using the body_class() function, a class admin-bar will be added automatically when the admin bar is active. For example: <body class=”home blog logged-in admin-bar”> You can then use that class in your CSS to specify specific rules: .admin-bar .Div1 { /* custom styles */ }

Extend a class plugin

This works for me: class father { var $user; function __construct() { add_action( ‘init’, array( &$this, ‘set_user’ ) ); } function set_user() { $this->user = wp_get_current_user(); } } class child extends father { function __construct() { parent::__construct(); } function user_id(){ return $this->user->ID; } } $father = new father(); $child = new child(); add_action( ‘admin_notices’, ‘test_stuff’ … Read more