Using the values of Widget for another file
-
I wrote a widget, it looks something like this:
<?php class IIPredictionLogWidget extends WP_Widget { function IIPredictionLogWidget() { $widget_ops = array('classname' => 'IIPredictionLogWidget', 'description' => 'Un widget che mostra le previsioni aziendali di II' ); $this->WP_Widget('IIPredictionLogWidget', 'II Prediction Log', $widget_ops); } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $title = $instance['title']; ?> stuff <?php } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = $new_instance['title']; return $instance; } function widget($args, $instance) { echo $after_widget; } } add_action( 'widgets_init', create_function('', 'return register_widget("IIPredictionLogWidget");') );
It lets creates a widget and it lets a user type in a Stock, and a date. When you hit save it saves those values in the widget.
I want to create a script from another file altogether that runs once a day, but it needs to use the values that the user adds through the widget in WP-admin.
How does one go about doing this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using the values of Widget for another file’ is closed to new replies.