@charset 'utf-8';
/*
  Theme Name:  RECS (Norebro Child)
  Theme URI:   https://www.osborn.cl/
  Author:      Pablo Masquiarán
  Author URI:  https://pmasquiaran.dev/
  License:     LGPLv3 (Licencia Pública General Reducida de GNU)
  License URI: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
  Description: Tema hijo basado en Norebro de <a href="https://clbthemes.com/">Colabrio</a>
  Version:     1.5.7.1
  Tags:        one-column, two-columns, left-sidebar, right-sidebar, custom-colors, custom-header, custom-menu, featured-images, full-width-template, post-formats, theme-options, translation-ready
  Template:    recs-base
  Text Domain: norebro
  Domain Path: /languages/
  Paleta:      #b32e03 #090349 #fbdce7 #ceefff #151515 #f7f7f7
  ========================================================================== */

/*
  RECS1012013 incluye un libro al final ¿?
  // @pablo.masquiaran - ciclo para incorporar slug
  // plugins/issuem/issuem-functions.php
  if ( preg_match( '/%SLUG\[?(\d*)\]?%/i', $string, $matches ) ) {

    $post_cats  = get_the_terms( $post->ID, $cats );
    $categories = '';

    if ( $post_cats && ! is_wp_error( $post_cats ) ) :

      if ( ! empty( $matches[1] ) ) {
        $max_cats = $matches[1];
      } else {
        $max_cats = 0;
      }

      $cat_array = array();

      $count = 1;
      foreach ( $post_cats as $post_cat ) {

        $cat_array[] = $post_cat->slug;

        if ( 0 != $max_cats && $max_cats <= $count ) {
          break;
        }

        $count++;
      }

      $categories = join( ', ', $cat_array );

    endif;

    $string = preg_replace( '/%SLUG\[?(\d*)\]?%/i', preg_quote( $categories ), $string );
  }
  // @pablo.masquiaran - ciclo para incorporar slug

  ========================================================================== */