Skip to content

Instantly share code, notes, and snippets.

View ofyalcin's full-sized avatar
🎯
Focusing

Ömer Faruk ofyalcin

🎯
Focusing
View GitHub Profile
@adijvlian
adijvlian / CalendarController.php
Created May 28, 2018 04:11
JQuery FullCalendar Integration with PHP and MySQL
<?php
class CalendarController extends ControllerBase
{
public function indexAction()
{
include "incld/load.php";
include "incld/insert.php";
include "incld/update.php";
include "incld/delete.php";
}
@martijn94
martijn94 / edit-profile.php
Created November 29, 2017 19:35
edit-profile.php
<?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' ) {
@Uranbold
Uranbold / swiperinit.html
Created November 8, 2017 05:27 — forked from AminulBD/swiperinit.html
Swiper Initialization with data attribute and Animate.css integrate
<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
-->
@ollietreend
ollietreend / acf-php-to-json.php
Last active September 18, 2024 05:24
Convert Advanced Custom Fields Pro configuration from PHP to JSON.
<?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'
@najlepsiwebdesigner
najlepsiwebdesigner / wp-bootstrap-gallery.php
Created December 30, 2016 09:56
make wordpress gallery responsive with bootstrap grid
@stormwild
stormwild / woocommerce-create-order.md
Last active October 28, 2024 06:17
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@martijn94
martijn94 / page-edit-profile.php
Last active May 29, 2019 13:40
Page template for wp profile edit page
<?php
check_page_security();
require_once('includes/update-profile.php');
?>
<?php get_header(); ?>
<?php get_template_part('parts/dashboard/user'); ?>
@ms-studio
ms-studio / add-several-term-meta-fields-to-custom-taxonomy.php
Last active February 28, 2022 10:02
A variation on the previous gists, this time we add *several* term meta fields
<?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".
*/
@leowebguy
leowebguy / parallelize.php
Last active August 31, 2020 15:28
Parallelize downloads across hostnames for WordPress. Useful to boost static resources load speed on websites. Recommended by GTmetrix, Pingdom, Google Speed Insights, and others.
<?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
@khromov
khromov / spp.php
Last active April 13, 2023 17:36
Count post view counts in WordPress via AJAX (Compatible with caching plugins)
<?php
/*
Plugin Name: Simple Popular Posts Lite
Plugin URI: -
Description: -
Version: 2015.03.01
Author: khromov
Author URI: http://snippets.khromov.se
License: GPL2
*/