Skip to content

Instantly share code, notes, and snippets.

View fatihtoprak's full-sized avatar
🎯
Focusing

Fatih Toprak fatihtoprak

🎯
Focusing
View GitHub Profile
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_Query Object
(
[query] => Array
(
[post_type] => product
[tax_query] => Array
(
[0] => Array
(
[taxonomy] => product_cat
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;
<?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(
<?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">
<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>
@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">
@fatihtoprak
fatihtoprak / amp form.md
Last active October 18, 2019 14:31
amp form push

amp form submission

            return response($return, 200)
                ->header("Content-type", "application/json")
                ->header("Access-Control-Allow-Credentials", "true")
                ->header("Access-Control-Allow-Origin", "*.ampproject.org")
                //->header("AMP-Access-Control-Allow-Source-Origin", $ampxhr)
                ->header("Access-Control-Expose-Headers", "AMP-Access-Control-Allow-Source-Origin");
@fatihtoprak
fatihtoprak / remove_DS_store_files.md
Last active May 24, 2019 07:13
How to remove .DS_Store files.

Tüm DS_Store dosyalarını kaldırma

sudo crontab -e

Vi editor'da klavyenizden bir kez I harfine basın ve aşağıdaki komutu girin:

*/10 * * * * root find / -name ".DS_Store" -depth -exec rm {} \;

  • Bu crontab girişi aşağıdaki formata sahiptir: