Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
programmatically activate widgets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Turner  
View profile  
 More options Apr 20, 8:46 am
From: John Turner <Turne...@cofc.edu>
Date: Mon, 20 Apr 2009 08:46:02 -0400
Local: Mon, Apr 20 2009 8:46 am
Subject: [wp-hackers] programmatically activate widgets
I need a way to programmatically activate widgets, anyone know the function
or method to call?

Thanks,

John
@johnturner

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
scribu  
View profile  
 More options Apr 20, 10:15 am
From: scribu <scr...@gmail.com>
Date: Mon, 20 Apr 2009 17:15:53 +0300
Local: Mon, Apr 20 2009 10:15 am
Subject: Re: [wp-hackers] programmatically activate widgets
There is no such thing. You will have to dig into the widgets admin page and
see how it's done manually and try to work from there.

--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Wheatley  
View profile  
 More options Apr 20, 10:17 am
From: Simon Wheatley <si...@sweetinteraction.com>
Date: Mon, 20 Apr 2009 15:17:31 +0100
Local: Mon, Apr 20 2009 10:17 am
Subject: Re: [wp-hackers] programmatically activate widgets

On Mon, Apr 20, 2009 at 1:46 PM, John Turner <Turne...@cofc.edu> wrote:

> I need a way to programmatically activate widgets, anyone know the function
> or method to call?

The K2 theme has a sidebar management page, you might get some clues
from there perhaps?

S

---
Sweet Interaction Ltd is Registered in England/Wales, no. 6610741
Registered office: 7 Malton Av, Manchester, M21 8AT
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ibrahim A. Mohamed  
View profile  
 More options Apr 20, 10:21 am
From: "Ibrahim A. Mohamed" <bingorab...@gmail.com>
Date: Mon, 20 Apr 2009 16:21:54 +0200
Local: Mon, Apr 20 2009 10:21 am
Subject: Re: [wp-hackers] programmatically activate widgets
I think that the activated widgets are stored in the database, in the *
prefix*_options table. I dun remember where exactly but I'm going to tell
you when I find it.

On Mon, Apr 20, 2009 at 4:17 PM, Simon Wheatley
<si...@sweetinteraction.com>wrote:

--
Regards,
Ibrahim Abdel Fattah Mohamed
Web Developer
Twitter: @bingorabbit
e-mail: bingorab...@gmail.com
Personal bLOG: http://bingorabbit.com/
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Turner  
View profile  
 More options Apr 20, 10:41 am
From: John Turner <Turne...@cofc.edu>
Date: Mon, 20 Apr 2009 10:41:44 -0400
Local: Mon, Apr 20 2009 10:41 am
Subject: Re: [wp-hackers] programmatically activate widgets
I'll trace it tonight and see if I can find anything and report back

John Turner
@johnturner

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ptah Dunbar  
View profile  
 More options Apr 22, 1:48 am
From: Ptah Dunbar <p...@ptahd.com>
Date: Wed, 22 Apr 2009 01:48:00 -0400
Subject: Re: [wp-hackers] programmatically activate widgets
http://ptahdunbar.com/wordpress/droppin-knowledge-on-wordpress-how-to...

<?php
// Debug: Makes sure no widgets are registered already. If so, be gone.
//update_option( 'sidebars_widgets', NULL );

$current_theme = get_option( 'template' ); // variable stores the current
theme
$target_theme = 'wpframework'; // variable stores the theme we want to
target
$debug = false; // skip the ladie, da.

/**
 * $preset_widgets:
 * A two-dimensional array that stores all active sidebars and their active
widgets
 *
 * Qiktip: Sidebars and widgets are identified by their unique ID
 */
$preset_widgets = array ( 'sidebar-1'  => array( 'search', 'pages' ) );

// this checks to see if the user is trying to change themes, if so,
// compare that theme with our target theme.
if ( isset( $_GET['activated'] ) && $current_theme == $target_theme ||
$debug ) {
    update_option( 'sidebars_widgets', $preset_widgets );

}

// Debug: What widgets/widget areas are active?
// Uncomment the next line and find out for yourself buddy ;P
//var_dump( get_option( 'sidebars_widgets' ) );
?>

Ptah Dunbar — p...@ptahd.com
http://ptahdunbar.com

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google