// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
'first_name' => 'Fresher',
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 | |
class CalendarController extends ControllerBase | |
{ | |
public function indexAction() | |
{ | |
include "incld/load.php"; | |
include "incld/insert.php"; | |
include "incld/update.php"; | |
include "incld/delete.php"; | |
} |
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 | |
/* Recheck if user is logged in just to be sure, this should have been done already */ | |
if( !is_user_logged_in() ) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' ) { |
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="content-carousel" class="content-carousel-widget" data-carousel="swiper"> | |
<!-- | |
You can use: data-items="5" for total items display in single page | |
data-autoplay="true" or "false" for autoplay. | |
data-loop="true" or "false" for looping the carousel | |
data-effect="fade" or "cube" for slide changing effects | |
data-direction="horizontal" or "vertical" for sliding direction | |
data-initlal="3" for for first active slide | |
data-center="true" or "false" for centerize slider | |
--> |
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 | |
/** | |
* Plugin Name: Convert ACF PHP to JSON | |
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
*/ | |
namespace ConvertAcfPhpToJson; | |
/** | |
* Add submenu item under 'Custom Fields' |
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 | |
function bootstrap_gallery( $output = '', $atts, $instance ) | |
{ | |
if (strlen($atts['columns']) < 1) { | |
$columns = 3; | |
} | |
else { | |
$columns = $atts['columns']; | |
} |
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 | |
check_page_security(); | |
require_once('includes/update-profile.php'); | |
?> | |
<?php get_header(); ?> | |
<?php get_template_part('parts/dashboard/user'); ?> |
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 | |
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
// original code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
/* | |
* NOTE: | |
* We are registering the fields for a custom taxonomy, called "user-logement". | |
*/ |
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 | |
/****** | |
Parallelize downloads across hostnames for WordPress. | |
Useful to boost static resources load speed on websites. | |
Recommended by GTmetrix, Pingdom, Google Speed Insights, and others. | |
See full post > https://medium.com/p/32e9dc2fec0c | |
In order to work properly, all subdomains/hostnames MUST have the same structure/path. Ex: | |
http://mydomain.com/wp-content/uploads/2015/11/myimage.jpg |
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 | |
/* | |
Plugin Name: Simple Popular Posts Lite | |
Plugin URI: - | |
Description: - | |
Version: 2015.03.01 | |
Author: khromov | |
Author URI: http://snippets.khromov.se | |
License: GPL2 | |
*/ |
NewerOlder