WDWT_VAR.'_random_post', 'description' => __( 'Spider Random Post allows you to show posts in a random order in a sidebar.', "business-elite" ) ); // Widget Settings $control_ops = array( 'id_base' => WDWT_VAR.'_random_post' ); // Widget Control Settings parent::__construct( WDWT_VAR.'_random_post', __( 'Spider Random Post', "business-elite" ), $widget_ops, $control_ops ); // Create the widget } // Extract Args // function widget($args, $instance) { extract( $args ); $title=$instance['title']; $url = plugins_url(); global $wdwt_random_post_id; // Before widget // echo $before_widget; // Title of widget // if ( $title ) { echo $before_title . $title . $after_title; } // Widget output // if($wdwt_random_post_id==0){ /////// print script code one time ?>
Update(".$wdwt_random_post_id.",".$instance['Updating_Time'].",".$instance['Category'].",".$instance['quantity_of_posts'].",".$instance['Style_sra']."); "; $wdwt_random_post_id++; ?>
'', 'Category' => '1', 'quantity_of_posts' => '1', 'AutoUpdate' => '1', 'Style_sra' =>'1', 'Updating_Time' => '10'); $instance = wp_parse_args( (array) $instance, $defaults ); ?>

>


onchange="document.getElementById('get_field_id('Updating_Time') ?>time_sec').setAttribute('style','display:none')" id="showup0"> onchange="document.getElementById('get_field_id('Updating_Time') ?>time_sec').removeAttribute('style');" id="showup1">


0){ $numberposts=$_GET['count_pages']; } else{ $numberposts=1; } } else{ $numberposts=1; } if(isset($_GET['categori_id'])){ if($_GET['categori_id']>0){ $cat_id=$_GET['categori_id']; } else{ $cat_id=""; } } else{ $cat_id=""; } $args = array( 'numberposts' => $numberposts, 'offset' => 0, 'category' => $cat_id, 'orderby' => 'rand', 'order' => 'ASC', 'post_type' => 'post', 'post_status' => 'publish' ); $lastposts = get_posts($args); foreach($lastposts as $post) { $content = $post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); ?>

ID); ?>