Skip to content

Instantly share code, notes, and snippets.

View danyn's full-sized avatar
😃
ok

Daniel Eisen danyn

😃
ok
View GitHub Profile
<script>
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: [email protected]
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus
var Shopify = Shopify || {};
Shopify.optionsMap = {};
Shopify.updateOptionsInSelector = function(selectorIndex) {
<html>
<head>
<title></title>
</head>
<body style="border: 0; margin:0; padding:0; background-color:#000000">
<script src="http://www.youtube.com/iframe_api"></script>
<script type="text/javascript">
var player;
@danyn
danyn / get_current_post_type.php
Created March 7, 2017 23:52 — forked from bradvin/get_current_post_type.php
Get the current post_type context in the WordPress admin.
<?php
/**
* gets the current post type in the WordPress Admin
*/
function get_current_post_type() {
global $post, $typenow, $current_screen;
//we have a post so we can just get the post type from that
if ( $post && $post->post_type )
return $post->post_type;