How to pass custom options from widget form to widget update callback?

Not sure if you’re still struggling with this, but for anyone that is, here’s the solution: Add the following arguments to wse_widget_context_form(): $widget, $return and $instance Then use the following to get field IDs and field names: <?php echo $widget->get_field_id(‘field_name’); ?> and <?php echo $widget->get_field_name(‘field_name’); ?> respectively. e.g. <li><label><input value=”on” type=”checkbox” name=”<?php echo $widget->get_field_name(‘noHome’); ?>” … Read more

Add new section to “Right Now” widget

I believe the hook you are looking for is right_now_discussion_table_end Update: From your comment i see that i did not explain myself, WordPress closes the table and div just after right_now_discussion_table_end action hook so you can use right_now_discussion_table_end and at the begging of your function close the table and div yourself and open your own, … Read more

How to get popular post from across a network?

simple list all last post about the network, not the popular posts; for popular posts you must use an plugin or track via Google Analytics etc. <ul class=”postlist no-mp”> <?php $blogs = $wpdb->get_results( “SELECT blog_id,path FROM {$wpdb->blogs} WHERE blog_id != {$wpdb->blogid} AND site_id = ‘{$wpdb->siteid}’ AND spam = ‘0’ AND deleted = ‘0’ AND archived … Read more

Closest thing to an is_widget() tag?

Well, if you insist using get_template_part, the only solution I see is to define a global variable in your widget’s widget() function, and set it to true or something. After you call get_template_part in your widget, set this variable to false. Within your template check for that variable, and if it’s true, it means you … Read more

Multiple users editting widgets

I have never personally had this problem, but to the best of my knowledge WordPress does not have the system to support multiple users managing widgets at the same time, at least not widgets in the same widget areas. Is it a problem to just have one user at a time manage the widgets? I … Read more