__( 'AT Pricing', 'aakanksha'), 'size' => 'span12', ); //create the widget parent::__construct('as_Pricing_Block', $block_options); //add ajax functions add_action('wp_ajax_as_block_pricing_add_new', array($this, 'add_pricing')); } function form($instance) { $defaults = array( 'pricings' => array( 1 => array( 'title' => __('Basic $9/month', 'aakanksha'), 'left' => '0', 'right' => '0', 'option_1' => '3G Space', 'option_2' => '4 Subdomain', 'option_3' => 'Unlimited Bandwidth', 'option_4' => 'Support 24/7', 'content_link' => 'sign up', 'type_pricing' => 'none', 'duration' => '900', 'delay' => '0', 'animation' => 'None', ) ), 'margin_top' => 10, 'margin_bottom' => 10, ); $instance = wp_parse_args($instance, $defaults); extract($instance); ?>

 - 

Add New

'None', 'main' => 'Main Pricing', ); ?>
  • px px

    ms(Millisecond) -  ms(Millisecond)

  • POPULAR', 'aakanksha'); } $pricing['left'] = ( ! empty ( $pricing['left'] ) ) ? 'left:'. (int)$pricing['left'] .'px;': ''; $pricing['right'] = ( ! empty ( $pricing['right'] ) ) ? 'right:'. (int) $pricing['right'] .'px;': ''; /** Style position */ $style_wrapper = ( ! empty( $pricing['left'] ) || ! empty( $pricing['right'] ) ) ? sprintf( '%s %s', $pricing['left'], $pricing['right']) : ''; $css_wrapper= ''; if ( ! empty( $style_wrapper ) ) { $css_wrapper= 'style="'. $style_wrapper .'" '; } $output .='
    '.$porpular.'

    '.htmlspecialchars_decode($pricing['title']).'

    '; } echo $output; echo '
    '; } /* AJAX add pricing */ function add_pricing() { $nonce = $_POST['security']; if (! wp_verify_nonce($nonce, 'aspb-settings-page-nonce') ) die('-1'); $count = isset($_POST['count']) ? absint($_POST['count']) : false; $this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'as-block-9999'; //default key/value for the pricing $pricing = array( 'title' => __('Basic $9/month', 'aakanksha'), 'left' => '0', 'right' => '0', 'option_1' => '3G Space', 'option_2' => '4 Subdomain', 'option_3' => 'Unlimited Bandwidth', 'option_4' => 'Support 24/7', 'content_link' => 'sign up', 'type_pricing' => 'none', 'duration' => '900', 'delay' => '0', 'animation' => 'None', ); if($count) { $this->pricing($pricing, $count); } else { die(-1); } die(); } function update($new_instance, $old_instance) { $new_instance = as_recursive_sanitize($new_instance); return $new_instance; } function before_block($instance) { extract($instance); echo '
    '; } function after_block($instance) { extract($instance); echo '
    '; } } as_register_block( 'as_pricing_Block' ); endif;