Skip to content

Instantly share code, notes, and snippets.

View HelloAlberuni's full-sized avatar
🏠
Working from home

Alberuni Azad HelloAlberuni

🏠
Working from home
View GitHub Profile
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Azad
Azad(config)#int
Azad>enable
Azad#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Azad(config)#int f0/0
$layout = isset($_GET['layout']) ? $_GET['layout'] : 'fullw';
switch($layout){
case 'left':
$shoplayout = 'left';
$shopcolclass = 9;
break;
case 'right':
$shoplayout = 'right';
$shopcolclass = 9;
<?php
//templates\global\quantity-input.php
//remove qty class from input field
//add the markup below after input field
<div class="qty">
<a class="plus" href="javascript:void(0);">
<i class="fa fa-plus"></i>
</a>
<a class="minus" href="javascript:void(0);">
<i class="fa fa-minus"></i>
#i/bin/bash
echo Number of inputs
read n
echo Imput $n numbers
for ((i=0;i<$n;i++))
do
read num[$i]
done
//metabox field
$pages->add_field( array(
'name' => esc_html__( 'Select header layout', 'uniqlo' ),
'id' => $prefix.'page_header_style',
'type' => 'select',
'options' => array(
'none' => esc_html__( 'None', 'uniqlo' ),
'header_default' => esc_html__( 'Header Default', 'uniqlo' ),
'header_style_2' => esc_html__( 'Header Style 2', 'uniqlo' ),
'header_style_3' => esc_html__( 'Header Style 3', 'uniqlo' ),
$container_size = 'container';
// theme option value
if($uniqlo_opt['uniqlo_header_full_width'] == true){
$container_size = 'container-fluid';
}
// page meta value
$page_box_style = get_post_meta( get_the_id(), '_uniqlo_page_box_style', true );
//register field
array(
'type' => 'text',
'label' => __( 'Image Size', 'uniqlo' ),
'name' => 'image_size',
'value' => '570x290-crop',
'description' => __(' Set the image size: "full", "thumbnail", "medium", "large", "390x450-crop" or ex:500x250', 'uniqlo'),
),
// custom image size
if All is selected
$cat_list = get all terms
else
$cat_list = get selected terms
endif
<div class="tab_menu">
<ul>
foreach $cat_list
$term_slug_list = array()
$query = new WP_Query( $args );
// loop through every product
while($query->have_posts()){
$query->the_post();
// get categories of product
$product_terms = wp_get_post_terms( get_the_id(), 'product_cat');
@HelloAlberuni
HelloAlberuni / add_new_user.php
Last active November 8, 2017 09:27
new user add for hgapp
<?php include 'config.php'; ?>
<?php
if (isset($_POST['form_referer_add'])) {
try{
$refer_name = $_POST['refer_name'];
if (empty($refer_name)) {
throw new Exception("Referance name can't be empty");
}