Plugin Directory

Changeset 3111204


Ignore:
Timestamp:
07/02/2024 01:26:09 PM (19 months ago)
Author:
susheelhbti
Message:

shortcode updates

Location:
saksh-text-to-voice-system/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • saksh-text-to-voice-system/trunk/readme.txt

    r3110929 r3111204  
    77Stable tag: 4.8.0
    88Requires PHP: 7.0
    9 Version : 2.0.0
     9Version : 2.0.2
    1010Tags:   booking system , appointments booking ,     salon booking system
    1111 
  • saksh-text-to-voice-system/trunk/saksh_admin/saksh_support.php

    r3110924 r3111204  
    3131 
    3232 
    33     echo "<p>For support whatsapp ".$data_json->whatsapp."  email ".$data_json->email." website ".$data_json->url."</p>";
    34    
    35    
     33    echo "<p>For 100% FREE  support whatsapp ".$data_json->whatsapp."  email ".$data_json->email." website ".$data_json->url."</p>";
     34   
     35      /* 
    3636    $plugins=$data_json->plugins;
    3737   
    3838   
    39    /*
     39
    4040   
    4141    foreach( $plugins as $plugin){
  • saksh-text-to-voice-system/trunk/saksh_appointment.php

    r3110929 r3111204  
    66
    77Author: susheelhbti
    8 Version: 2.0.0
     8Version: 2.0.2
    99Stable tag: 4.8.0
    1010Author URI: https://profiles.wordpress.org/susheelhbti/
     
    382382 
    383383 
     384 
     385 
     386 
    384387 $product_data=$dummy_data->product;
    385388 
    386  
    387  
    388 
     389 
     390 
     391$term =wp_insert_term(
     392    'appointments' , 
     393    'product_cat'
     394);
     395
     396 
    389397
    390398      $product = new WC_Product_Simple();
     
    397405
    398406$product->set_short_description( $product_data->description  );
     407
     408 
     409 
     410 
     411if(!is_wp_error($term))
     412
     413{
     414 
     415$term_id=$term['term_id'];
     416 
     417
     418$term_array= array($term_id )  ;
     419
     420}
     421else
     422{
     423   
     424    $term_array= saksh_get_term_ids( 'appointments','product_cat');
     425   
     426
     427   
     428}
     429
     430
     431 $product->set_category_ids( $term_array);
     432 
    399433 
    400434$product->save();
     435
     436
     437 
     438 echo "<div class='wrap   '>";
     439 
     440 echo "<div class='card   '>";
     441 
     442 
     443echo "If no error then task done successfully.";
     444
     445
     446echo "</div>";
     447echo "</div>";
    401448}
    402449
     
    407454register_activation_hook(__FILE__, 'saksh_plugin_table_install');
    408455
    409  
     456
     457
     458
     459  function saksh_get_term_ids($name__like,$taxonomy){
     460     
     461     
     462
     463  $terms = get_terms([
     464    'taxonomy' => $taxonomy,
     465    'name__like' => $name__like ,
     466    'hide_empty' => false,
     467]);
     468
     469$term_id=array();
     470
     471if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
     472 
     473    foreach ( $terms as $term ) {
     474    $term_id[]= $term->term_id  ;
     475    }
     476 
     477}
     478
     479return $term_id;
     480
     481 
     482  }
     483 
     484
     485 
  • saksh-text-to-voice-system/trunk/saksh_sortcode.php

    r3106021 r3111204  
    186186
    187187
    188 function saksh_appointment_calendar_funcV1(   ) {
    189   $str="";
    190  
    191  
     188function saksh_appointment_calendar_funcV1(  $atts ) {
     189
     190
     191$product_cat=$atts['product_cat'] ;
     192
     193 
     194 
     195    $term_id= saksh_get_term_ids($product_cat,'product_cat');
     196 
     197 
    192198     $args = array(
    193199    'status'            => array(  'publish' ),
    194200 
    195    
     201  'tax_query'             => array(
     202        array(
     203            'taxonomy'      => 'product_cat',
     204            'field'         => 'term_id',
     205            'terms'         => $term_id,
     206            'operator'      => 'IN'
     207        ),
     208    ),
    196209    'tag'               => array()
    197210   
     
    201214  $products = wc_get_products( $args ) ;
    202215 
    203  
    204        $str  .="<div class='saksh alignfull'><div class='container '><div class='row'><div class='col-md-2'>";
     216 
     217 
     218       $str   ="<div class='saksh alignfull'><div class='container '><div class='row'><div class='col-md-2'>";
     219       
     220       
    205221            foreach( $products as $product ) {
    206222
     
    246262       
    247263 
    248     $str .=   "<input type='HIDDEN' name='selected_date' id='selected_date'>";
    249     $str .=   "<input type='nounce' name='selected_date' value='".esc_attr($nonce)."'>";
     264    $str .=   "<input type='hidden' name='selected_date' id='selected_date'>";
     265 //   $str .=   "<input type='hidden' name='selected_date' value='".esc_attr($nonce)."'>";
    250266   
    251267   
     
    277293
    278294
    279 function add_this_script_footer() {
    280 ?>
    281    
    282    
    283    
    284  
    285  
    286      <div id="saksh_my_modal" class="modal fade" tabindex="-1">
    287         <div class="modal-dialog">
    288             <div class="modal-content">
    289                   <form id="saksh_booking_form" action="/cart" method="post">
    290                      
    291                        <div class="modal-header">
    292                    
    293                     <button type="button" class="close" data-dismiss="modal">&times;</button>
    294                 </div>
    295                 <div class="modal-body">
    296                  
    297                     <div id="saksh_booking_form_model_contents"> </div>
    298                    
    299                    
    300                 </div>
    301                 <div class="modal-footer">
    302                  
    303                     <button id="submit_form"  type="submit" class="btn btn-primary">Save</button>
    304                 </div>
    305                
    306                
    307                 </form>
    308                
    309             </div>
    310         </div>
    311     </div>
    312          
    313      
    314 <?php }
    315 add_action('wp_footer', 'add_this_script_footer');
    316 
    317 
    318 
     295
     296
     297
     298
Note: See TracChangeset for help on using the changeset viewer.