Skip to content

Instantly share code, notes, and snippets.

View fatihtoprak's full-sized avatar
🎯
Focusing

Fatih Toprak fatihtoprak

🎯
Focusing
View GitHub Profile
@fatihtoprak
fatihtoprak / amp-fullscreen.amp.html
Created November 8, 2019 13:53
amp fullscreen video
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>AMP #0</title>
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="apple-mobile-web-app-title" content="AppTitle">
<meta name="apple-mobile-web-app-capable" content="yes">
<div id="sidebar" class="col-12 col-sm-4 d-none d-sm-block pt-3">
<div class="sidebar__inner">
<?php echo render_urinix_ad('sidebar_1'); ?>
</div>
</div>
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
global $numpages;
global $page;
$featured_img_url = get_the_post_thumbnail_url($post->ID, 'full');
$is_gallery = $numpages>1 ? true : false;
$ad_format = $is_gallery ? 'gallery' : 'single';
?>
<div class="container">
<div class="row mt-2">
<?php
if ( is_admin() ) {
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
'noPerm' => __('You do not have permission to do that.'),
'broken' => __('An unidentified error has occurred.')
));
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 );
did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
function add_cartmagician(product_id, usdz_path) {
jQuery(document).ready(function ($) {
// iOS Safari
if (navigator.userAgent.match(/(\(iPod|\(iPhone|\(iPad)/)) {
var ua = window.navigator.userAgent;
var iOSSafari = ((!!ua.match(/iPad/i)) || (!!ua.match(/iPhone/i))) && ((!!ua.match(/WebKit/i)) && (!!ua.match(/CriOS/i) != true));
// Var to know when the arview is open
var arView = false;
WP_Query Object
(
[query] => Array
(
[post_type] => product
[tax_query] => Array
(
[0] => Array
(
[taxonomy] => product_cat
WP_Query Object
(
[query] => Array
(
[post_type] => product
[posts_per_page] => -1
[meta_key] => ohubsort_101
[orderby] => meta_value_num
[order] => ASC
[post_status] => Array
WP_Hook Object
(
[callbacks] => Array
(
[0] => Array
(
[00000000693ea8760000000039db1f96add_query_vars] => Array
(
[function] => Array
(
@fatihtoprak
fatihtoprak / migrateorders.php
Created October 8, 2020 20:57 — forked from cfaria/migrateorders.php
Migrate WooCommerce Orders
<?php
//increase max execution time of this script to 150 min:
ini_set('max_execution_time', 9000);
//increase Allowed Memory Size of this script:
ini_set('memory_limit','960M');
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.