get_contents( $file ); } return false; } /** * Loading Core File and Script Loader. */ require THEMEOO_THEME_DIR . 'inc/themeoo-include.php'; /** * Content width based on the theme's design and stylesheet. */ if ( ! isset( $content_width ) ) { $content_width = 870; /* pixels */ } if ( ! function_exists('themeoo_setup') ) { /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. * * @return void */ function themeoo_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Pxlr-theme, use a find and replace * to change 'ayyash' to the name of your theme in all the template files */ if ( ! load_theme_textdomain('ayyash', get_stylesheet_directory() . '/languages') ) { load_theme_textdomain('ayyash', get_template_directory() . '/languages'); } if ( get_theme_mod('woocommerce_general_enable_product_zoom') ) { add_theme_support( 'wc-product-gallery-zoom' ); } if ( get_theme_mod('woocommerce_general_enable_product_lightbox') ) { add_theme_support( 'wc-product-gallery-lightbox' ); } if ( get_theme_mod('woocommerce_general_enable_product_gallery_slider') ) { add_theme_support( 'wc-product-gallery-slider' ); } // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded
' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '
'; } else { $output = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ); } $radios .= 'slug, false ) . '>'; } } } else { foreach ( $options as $option ) { $id = $name . '-' . $option; $term = get_term_by( 'slug', $option, 'pa_color' ); if ( $term && 'attribute_pa_color' == $name ) { $themeoo_select_color = get_term_meta( $term->term_id, 'color', true ); // @phpstan-ignore-line // Swatch. $output = '' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '
'; // @phpstan-ignore-line $checked = sanitize_title( $args['selected'] ) === $args['selected'] ? checked( $args['selected'], sanitize_title( $option ), false ) : checked( $args['selected'], $option, false ); $radios .= ''; } } } } $radios .= '