This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const authContext = React.createContext(); | |
function useAuth() { | |
const [authed, setAuthed] = React.useState(false); | |
return { | |
authed, | |
login() { | |
return new Promise((res) => { | |
setAuthed(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******* Add Room Fields **********// | |
var count = 0; | |
$('.extra_room_field').click(function(e){ | |
e.preventDefault(); | |
$('.room_record:last').clone().insertAfter($('.room_record:last')).addClass('single remove row'); | |
$('.room_record:last').find("input.r_name, input.r_price").remove(); | |
$(".room_record:last").find("label[for='room_name']").after( | |
' <input type="text" class="form-control r_name" id="room_name" name="room_name" placeholder="Enter room name" value=""></input>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
function DebAp() { | |
const [inputList, setInputList] = useState([{ fName: "", ltName: "" , hobbys:[] }]); | |
const handleInputChange = (e, index) => { | |
const { name, value } = e.target; | |
const list = [...inputList]; | |
switch(name) { | |
case 'fName': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#header { | |
background: #fff; | |
position: relative; } | |
#header a#logo { | |
margin: 10px 0px; | |
display: inline-block; } | |
#header a.nav-trig { | |
color: #007AC0; | |
position: absolute; | |
right: 30px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select class="theater-select form-control" name="theater-select"> <!-- Making a select box populated with theater names --> | |
<option>Select a Theater</option> | |
<!-- Start the ACF plugin loop to fetch the showtimes metadata --> | |
<?php if( have_rows('showtime_info') ): | |
while( have_rows('showtime_info') ): the_row(); ?> | |
<?php $theater = get_sub_field('theater_name'); ?> <!--Returns theater taxonomy ID --> | |
<?php $theater_name = get_term( $theater, 'theater' ); //Returns an array of taxonomy term | |
$theater_nicename = $theater_name->name; //Get theater name from the array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('#kommunity').tinyNav({ | |
active: 'current-menu-item' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'posts_per_page' => $count, // Limit to posts | |
'post_type' => 'portfolio', // Query for the default Post type | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'genre', | |
'field' => 'slug', | |
'terms' => 'your term name' | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_template_part( 'inc/carousel' ); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="slider"> | |
<?php | |
$carousel_cat = get_theme_mod('carousel_setting','1'); | |
$carousel_count = get_theme_mod('count_setting','4'); | |
$new_query = new WP_Query( array( 'cat' => $carousel_cat , 'showposts' => $carousel_count )); | |
while ( $new_query->have_posts() ) : $new_query->the_post(); ?> | |
<div class="item"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom control for carousel category | |
if (class_exists('WP_Customize_Control')) { | |
class WP_Customize_Category_Control extends WP_Customize_Control { | |
public function render_content() { | |
$dropdown = wp_dropdown_categories( | |
array( |
NewerOlder