Plugin Directory

Changeset 2584968


Ignore:
Timestamp:
08/18/2021 04:08:12 PM (5 years ago)
Author:
treehost
Message:

Version 1.3.0 Category selection

Location:
any-content-carousel
Files:
46 added
12 edited

Legend:

Unmodified
Added
Removed
  • any-content-carousel/trunk/admin/option-panel.php

    r2557993 r2584968  
    128128                    $options['select_post_type'] = sanitize_text_field( $options['select_post_type'] );
    129129                }
    130 
     130                if ( ! empty( $options['select_category'] ) ) {
     131                    $options['select_category'] = sanitize_text_field( $options['select_category'] );
     132                }
    131133                // Input button color for product
    132134                if ( ! empty( $options['add_to_cart_button_color'] ) ) {
     
    265267                            </td>
    266268                        </tr>
     269
     270                      <?php // Category ?>
     271                        <tr valign="top">
     272                            <th scope="row"><?php esc_html_e( 'Category', 'tdm_carousel' ); ?></th>
     273                            <td>
     274                                <?php $value = self::get_ecctdm_option( 'selected_category' ); ?>
     275                                <select id="selected_category" name="ecctdm_options[selected_category]">
     276                                <option value=""><?php esc_html_e('Category','tdm_carousel') ?></option>
     277                                <?php if($value != null ){
     278                                    $term = get_term( $value );
     279                                    $category_name = $term->name;
     280                                    ?>
     281                                 <option value="<?php echo esc_attr( $value ); ?>" selected>
     282                                    <?php echo strip_tags( $category_name ); ?>
     283                                </option>
     284                                <?php } ?>
     285                                </select>
     286                            </td>
     287                        </tr>
    267288                        <tr class="produtc_option" valig="top" hidden>
    268289                        <th scope="row"> <?php  esc_html_e('Product Options','tdm_carousel') ?></th>
  • any-content-carousel/trunk/admin/tdm-admin-script.js

    r2547339 r2584968  
    55        $('.produtc_option').show();
    66    }
     7
     8    fill_select_category($('select#select_post_type').val());
    79
    810    // select post type chenge
     
    1315            $('.produtc_option').hide();
    1416        }
     17
     18        fill_select_category(this.value);
     19
    1520      });
    1621
     22      // get category by post type
     23      function fill_select_category(post_type){
     24        $('select#selected_category').prop('disabled', 'disabled');
     25
     26        if (post_type == 'users' ){
     27          $('select#selected_category').html('');
     28          $('select#selected_category').append('<option value="" >Catgory</option>');
     29        }else{
     30          $.ajax({
     31            type: 'POST',
     32            url: ajaxurl,
     33            data: {
     34                action: 'tdm_get_terms_by_post_type',
     35                post_type: post_type,
     36            },
     37            success: function (response) {
     38             var jsonData = JSON.parse(response);
     39
     40                if(jsonData != null ){   
     41                  $('#selected_category option').not(':eq(0), :selected').remove();
     42                  $.each(jsonData, function( index, value ) {
     43                    if ($('select#selected_category').find("option[value='" + value['term_id'] + "']").length == 0) {
     44                      $('select#selected_category').append('<option value="'+value['term_id']+'" >'+value['name']+'</option>')
     45                    }
     46                  });
     47                  $('select#selected_category').prop('disabled', false);
     48                }else{
     49                  $('select#selected_category').html('');
     50                  $('select#selected_category').append('<option value="" >Category</option>');
     51                 
     52                }
     53           
     54            },
     55            error: function (response) {
     56                console.log(response);
     57            }
     58        });
     59        }
     60 
     61      }
     62
    1763});
  • any-content-carousel/trunk/content-slider.php

    r2558102 r2584968  
    44   * Plugin URI: https://www.treehost.eu/
    55   * Description: Create Carousels with any post Type
    6    * Version: 1.2.2
     6   * Version: 1.3.0
    77   * Author: TreeHost
    88   * Author URI: http://treehost.eu/
     
    5858   $carousel_title = esc_html(get_ecctdm_option( 'carousel_title' ));
    5959   $post_type = esc_html(get_ecctdm_option( 'select_post_type' ));
     60   $post_category = esc_html(get_ecctdm_option('selected_category'));
    6061   $posts_number = sanitize_option('posts_per_page',get_ecctdm_option( 'post_number' ));
    6162   $button_bg_color = esc_html(get_ecctdm_option('read_more_button_color'));
     
    6566   $product_button_color = esc_html(get_ecctdm_option('add_to_cart_button_txt_color'));
    6667   $product_button_color_border = esc_html(get_ecctdm_option('add_to_cart_button_color_border'));
    67    
    6868
    6969   if ( $a['type'] == ''){
     
    9494            $tax_query   = WC()->query->get_tax_query();
    9595           
    96             $tax_query[] = array(
    97                'taxonomy' => 'product_visibility',
    98                'field'    => 'name',
    99                'terms'    => 'featured',
    100                'operator' => 'IN',
    101             );
     96            if($post_category){
     97               $tax_query[] = array(
     98                  'taxonomy' => 'product_cat',
     99                  'field'    => 'term_id',
     100                  'terms'     =>  array($post_category),
     101                  'operator'  => 'IN'
     102               );
     103            }else{
     104               $tax_query[] = array(
     105                  'taxonomy' => 'product_visibility',
     106                  'field'    => 'name',
     107                  'terms'    => 'featured',
     108                  'operator' => 'IN',
     109               );
     110            }
    102111
    103112            $args = array(
     
    111120               'tax_query'           => $tax_query,
    112121            );
     122
    113123            $prdotti = new WP_Query( $args );
    114124
     
    121131         /* Users */
    122132         $args = array(
    123             'role__not_in'   => array('subscriber','contributor'),
     133            'role__in'   => array('author','editor'),
    124134            'order' => 'ASC',
    125135            'number'=>$posts_number,
    126             'has_published_posts'=> true
     136            'has_published_posts'=> [ 'post' ]
    127137        );
    128138        $users = get_users( $args );
     
    135145         /* Post Type */
    136146         $args = array(
    137                'post_type' => $tipo_di_post,
    138                'orderby'   => 'date',
    139                'order' => 'DESC',
    140                'posts_per_page'=>$posts_number,
    141          );
     147            'post_type'       => $tipo_di_post,
     148            'orderby'         => 'date',
     149            'order'           => 'DESC',
     150            'posts_per_page'  =>$posts_number,
     151            'category'        =>$post_category
     152      );
    142153         $posts = get_posts( $args );     
    143154
  • any-content-carousel/trunk/css/slider-style.css

    r2558102 r2584968  
    11.container-slide {
    22  width: 100%;
    3   margin-bottom: 30px;
    43  /* bottoni */
    54  /* Tab */ }
    65  .container-slide .carosello {
    76    width: 90%;
    8     margin: 0 auto; }
     7    margin: 0 auto;
     8    min-height: 540px; }
    99    @media only screen and (min-width: 769px) {
    1010      .container-slide .carosello {
     
    2828      -o-box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    2929      box-shadow: 0 0 20px black; }
    30       @media only screen and (min-width: 769px) {
    31         .container-slide .item.item-contenuto {
    32           height: 500px; } }
    3330  .container-slide .slick-slide {
    3431    transform: scale(0.8);
     
    9390    @media only screen and (min-width: 769px) {
    9491      .container-slide .item-inner {
    95         max-width: 100%;
    96         flex-wrap: nowrap; } }
     92        max-width: 100%; } }
    9793    .container-slide .item-inner .col-sx {
    9894      width: 100%;
     
    136132        width: 8rem;
    137133        height: 8rem;
    138         margin: 6.9rem;
     134        margin: 6.6rem;
    139135        -webkit-box-shadow: 0px 0px 0px 8px #3d3d3d, 0px 0px 0px 16px #4B4C4B, 0px 0px 0px 24px #828482, 0px 0px 0px 31px #B2B5B2, 0px 0px 0px 39px #DADDDA, 0px 0px 50px 50px rgba(193, 187, 184, 0);
    140136        box-shadow: 0px 0px 0px 8px #3d3d3d, 0px 0px 0px 16px #4B4C4B, 0px 0px 0px 24px #828482, 0px 0px 0px 31px #B2B5B2, 0px 0px 0px 39px #DADDDA, 0px 0px 50px 50px rgba(193, 187, 184, 0); }
     137        @media only screen and (min-width: 769px) {
     138          .container-slide .item-inner .col-sx .avatar-image {
     139            margin: 0 auto;
     140            margin-top: 5rem; } }
     141        @media only screen and (min-width: 992px) {
     142          .container-slide .item-inner .col-sx .avatar-image {
     143            margin: 11.6rem; } }
    141144      .container-slide .item-inner .col-sx a.play {
    142145        width: 100%;
     
    165168      float: left;
    166169      text-align: left;
    167       padding: 30px;
    168       white-space: break-spaces; }
     170      padding: 30px; }
    169171      .container-slide .item-inner .col-dx h3 {
    170172        text-transform: uppercase;
     
    172174        font-size: 1.1em;
    173175        margin-bottom: 0;
    174         margin-top: 0px;
    175         white-space: break-spaces; }
     176        margin-top: 0px; }
    176177      .container-slide .item-inner .col-dx hr {
    177178        height: 0;
     
    179180        border: 1px solid #000;
    180181        border-width: 4px 0 0 0; }
    181       .container-slide .item-inner .col-dx p {
    182         white-space: break-spaces; }
    183182      @media only screen and (min-width: 769px) {
    184183        .container-slide .item-inner .col-dx {
     
    205204    .container-slide .btn-arancio:hover {
    206205      opacity: 0.8; }
    207   .container-slide #tabs {
     206  .container-slide ul.tabs {
    208207    width: 90%;
    209208    margin: 0 auto;
     
    211210    padding: 0; }
    212211    @media only screen and (min-width: 500px) {
    213       .container-slide #tabs {
     212      .container-slide ul.tabs {
    214213        padding: auto; } }
    215     .container-slide #tabs li {
     214    .container-slide ul.tabs li {
    216215      list-style: none;
    217216      margin-right: 5px;
     
    220219      outline: none;
    221220      display: inline-block; }
    222       .container-slide #tabs li a {
     221      .container-slide ul.tabs li a {
    223222        cursor: pointer;
    224223        font-family: Arial, Helvetica, sans-serif;
     
    235234        outline: none;
    236235        border-bottom: 1px solid #000; }
    237         .container-slide #tabs li a.inactive {
     236        .container-slide ul.tabs li a.inactive {
    238237          padding-top: 5px;
    239238          padding-bottom: 8px;
     
    242241          outline: none;
    243242          border-bottom: 0; }
    244           .container-slide #tabs li a.inactive:hover {
     243          .container-slide ul.tabs li a.inactive:hover {
    245244            color: #000;
    246245            outline: none; }
    247         .container-slide #tabs li a:hover {
     246        .container-slide ul.tabs li a:hover {
    248247          color: #000;
    249248          outline: none; }
  • any-content-carousel/trunk/css/slider-style.css.map

    r2558102 r2584968  
    11{
    22"version": 3,
    3 "mappings": "AAUA,gBAAgB;EACZ,KAAK,EAAE,IAAI;EAEX,aAAa,EAAE,IAAI;EAgPnB,aAAa;EA4Bb,SAAS;EA3QT,2BAAU;IACN,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,MAAM;IAEd,yCAA6C;MAJjD,2BAAU;QAKJ,KAAK,EAAE,IAAI;EAMb,iCAAG;IACC,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,MAAM;EAGzB,sBAAK;IACD,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,kCAAW;MACP,UAAU,EAAE,IAAI;MAChB,UAAU,EAAE,MAAM;MAClB,OAAO,EAAE,CAAC;IAEd,qCAAgB;MACd,OAAO,EAAE,CAAC;MACV,OAAO,EAAE,IAAI;MACb,gBAAgB,EAAE,IAAI;MACtB,kBAAkB,EAAE,cAAmB;MACvC,eAAe,EAAE,4BAAyB;MAC1C,aAAa,EAAE,4BAAyB;MACxC,UAAU,EAAE,cAAmB;MAC/B,yCAA6C;QAR/C,qCAAgB;UASZ,MAAM,EAAE,KAAK;EAMrB,6BAAY;IACR,SAAS,EAAE,UAAU;IACrB,OAAO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B,kBAAS;IACP,OAAO,EAAE,aAAa;;AAI5B,YAAY;EACV,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,UAAU,EAAE,YAAY;EACxB,kBAAkB,EAAE,YAAY;;AAGlC,gBAAgB;AAEhB,sBAAuB;EACnB,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,gBAAgB;EACvB,MAAM,EAAE,cAAc;EACtB,yCAAkD;IAJtD,sBAAuB;MAKjB,KAAK,EAAE,gBAAgB;MACvB,MAAM,EAAE,gBAAgB;EAE1B,yCAA6C;IARjD,sBAAuB;MASjB,KAAK,EAAE,gBAAgB;MACvB,MAAM,EAAE,gBAAgB;EAE1B,yCAA6C;IAZjD,sBAAuB;MAajB,KAAK,EAAE,gBAAgB;MACvB,MAAM,EAAE,gBAAgB;;AAI1B,cAAM;EACJ,OAAO,EAAE,IAAI",
    44"sources": ["slider-style.scss"],
    55"names": [],
  • any-content-carousel/trunk/css/slider-style.scss

    r2558102 r2584968  
    1111.container-slide{
    1212    width: 100%;
    13     //height: 950px;
    14     margin-bottom: 30px;
    1513    .carosello{
    1614        width: 90%;
    1715        margin: 0 auto;
    18         //height: 750px;
     16        min-height: 540px;
    1917        @media only screen and (min-width: $mobile ) {
    2018          width: 100%;
    21          // height: 540px;
    2219        }
    2320    }
     
    4542          -o-box-shadow: 0 0 20px rgba(0,0,0,0.15);
    4643          box-shadow: 0 0 20px rgb(0,0,0);
    47           @media only screen and (min-width: $mobile ) {
    48             height: 500px;
    49           }
    5044        }
    5145       
     
    138132      @media only screen and (min-width: $mobile ) {
    139133        max-width: 100%;
    140         flex-wrap: nowrap;
    141134       
    142135      }
     
    188181          width: 8rem;
    189182          height: 8rem;
    190           margin: 6.9rem;
     183          margin: 6.6rem;
    191184          @include avatar-shadow();
     185          @media only screen and (min-width:$mobile){
     186            margin: 0 auto;
     187            margin-top: 5rem;
     188          }
     189          @media only screen and (min-width:$tablet){
     190            margin: 11.6rem;
     191          }
    192192        }
    193193        a.play {
     
    227227        text-align: left;
    228228        padding: 30px;
    229         white-space: break-spaces;
    230229        h3 {
    231230          text-transform: uppercase;
     
    234233          margin-bottom: 0;
    235234          margin-top:0px;
    236           white-space: break-spaces;
    237235        }
    238236        hr{
     
    241239          border: 1px solid #000;
    242240          border-width: 4px 0 0 0;
    243         }
    244         p{
    245           white-space: break-spaces;
    246241        }
    247242        @media only screen and (min-width: $mobile ) {
     
    281276   
    282277    /* Tab */
    283    
    284     #tabs {
     278    ul.tabs {
    285279        width: 90%;
    286280        margin: 0 auto;
  • any-content-carousel/trunk/inc/content-post.php

    r2557967 r2584968  
    66if ( $posts ) {
    77   
    8    $content .= '<ul id="tabs" >';
     8   $content .= '<ul class="tabs" >';
    99
    1010   if ($carousel_title != null || $carousel_title !=''){
     
    3535      }
    3636
    37       $post_date =get_the_date( 'D j M' );
     37      $post_date =get_the_date( 'D j M' ,$id_post );
    3838      $thumnail_url = esc_url(get_the_post_thumbnail_url( $id_post, 'full' ));
    3939      if ($thumnail_url == null){
  • any-content-carousel/trunk/inc/content-product.php

    r2557967 r2584968  
    55 if ( $prdotti ) {
    66   
    7     $content .= '<ul id="tabs" >';
     7    $content .= '<ul class="tabs" >';
    88
    99   if ($carousel_title != null || $carousel_title !=''){
  • any-content-carousel/trunk/inc/content-user.php

    r2557967 r2584968  
    55if ( $users ) {
    66   
    7    $content .= '<ul id="tabs" >';
     7   $content .= '<ul class="tabs" >';
    88
    99   if ($carousel_title != null || $carousel_title !=''){
  • any-content-carousel/trunk/inc/utility.php

    r2557967 r2584968  
    4545    return $types;
    4646} );
     47
     48/* Get taxonomy by custom post type  */
     49
     50function tdm_get_terms_by_post_type( $postType = 'post', $taxonomy = 'category'){
     51   
     52  /**
     53   * @param postType default 'post'
     54   * @param taxonomy default 'category'
     55   *
     56   * @return array of terms for a given $posttype and $taxonomy
     57   * @since 1.0.1
     58   *
     59   * 1. Get all posts by post type
     60   * 2. Loop through the posts array and retrieve the terms attached to those posts
     61   * 3. Store the new terms objects within `$post_terms`
     62   * 4. loop through `$post_terms` as it's a array of term objects.
     63   * 5. store the terms with our desired key, value pair inside `$post_terms_array`
     64   */
     65
     66  $postType = (isset($_REQUEST['post_type']) ) ? $_REQUEST['post_type'] : 'post';
     67
     68  if($postType == 'product'){
     69    $taxonomy = 'product_cat';
     70  }
     71  //1. Get all posts by post type
     72  $get_all_posts = get_posts( array(
     73      'post_type'     => esc_attr( $postType ),
     74      'post_status'   => 'publish',
     75      'numberposts'   => -1
     76  ) );
     77
     78  if( !empty( $get_all_posts ) ){
     79
     80      //First Empty Array to store the terms
     81      $post_terms = array();
     82     
     83      //2. Loop through the posts array and retrieve the terms attached to those posts
     84      foreach( $get_all_posts as $all_posts ){
     85
     86          /**
     87           * 3. Store the new terms objects within `$post_terms`
     88           */
     89          $post_terms[] = get_the_terms( $all_posts->ID, esc_attr( $taxonomy ) );
     90
     91      }
     92
     93      //Second Empty Array to store final term data in key, value pair
     94      $post_terms_array = array();
     95
     96      /**
     97       * 4. loop through `$post_terms` as it's a array of term objects.
     98       */
     99
     100      foreach($post_terms as $new_arr){
     101          foreach($new_arr as $arr){
     102
     103              /**
     104               * 5. store the terms with our desired key, value pair inside `$post_terms_array`
     105               */
     106              $post_terms_array[] = array(
     107                  'name'      => $arr->name,
     108                  'term_id'   => $arr->term_id,
     109                  'slug'      => $arr->slug,
     110                  'url'       => get_term_link( $arr->term_id )
     111              );
     112          }
     113      }
     114
     115      //6. Make that array unique as duplicate entries can be there
     116      $terms = array_unique($post_terms_array, SORT_REGULAR);
     117
     118      //7. Return the final array
     119      //return $terms;
     120      echo json_encode( $terms);
     121      // Don't forget to always exit in the ajax function.
     122      exit();
     123  }
     124
     125}
     126
     127add_action('wp_ajax_tdm_get_terms_by_post_type', 'tdm_get_terms_by_post_type');
     128/********* */
  • any-content-carousel/trunk/js/slider-function.js

    r2558102 r2584968  
    2727        /* tab title function */
    2828
    29         $('.container-slide #tabs li a:not(:first)').addClass('inactive');
     29        $('.container-slide .tabs li a:not(:first)').addClass('inactive');
    3030            $('.container-slide .tab-content').hide();
    3131            $('.container-slide .tab-content:first').show();
    3232   
    33             $('.container-slide #tabs li a').click(function(){
     33            $('.container-slide .tabs li a').click(function(){
    3434                var t = $(this).attr('id');
    3535
    3636               if($(this).hasClass('inactive')){ //this is the start of our condition
    37                   $('.container-slide #tabs li a').addClass('inactive');           
     37                  $('.container-slide .tabs li a').addClass('inactive');           
    3838                  $(this).removeClass('inactive');
    3939             
  • any-content-carousel/trunk/readme.txt

    r2567092 r2584968  
    1 === Any Content Carousel ===
     1=== Any Content Carousel ===
    22Contributors: treehost,Matteo182
    33Tags: woocommerce, carousel, author carousel, post carousel, product carousel, slick slider, custom post type, post, type, shortcode
    44Donate link: https://paypal.me/treehost
    55Requires at least: 3.8
    6 Tested up to: 5.8
     6Tested up to: 5.7.2
    77Requires PHP: 5.2.4
    88Stable tag: 1.2.2
     
    100100= 1.2.2, July 03, 2021 =
    101101* FIX: add library fslightboxjs
     102
     103= 1.3.0, August 18, 2021 =
     104* ADD: Post and Products category Selection
     105* FIX: User Author carousel
Note: See TracChangeset for help on using the changeset viewer.