Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / WordPress - favicon.phtml
Created May 23, 2021 21:09
WordPress - favicon #wordpress
<!-- favicon -->
<link rel="shortcut icon" type="image/x-icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico">
<link rel="apple-touch-icon" href="<?php bloginfo('stylesheet_directory'); ?>/apple-touch-icon.png">
@frankyonnetti
frankyonnetti / WordPress - Custom widget plugin.php
Created May 23, 2021 21:09
WordPress - Custom widget plugin #wordpress #plugin #widget
<?php
/**
* Direction for starting a new widget plugin using this boilerplate.
*
* Replace the following:
* Plugin Name: "THEME Custom Widget Plugin"
* Description: "Custom widget for..."
* Machine Name: "THEME_Custom_Widget" with caps and underscores
* Machine Name: "theme_custom_widget" lower case and underscores
* Load: "theme_load_custom_widget" load widget lower case and underscores
@frankyonnetti
frankyonnetti / WordPress - CPT parent only based on taxonomy.phtml
Created May 23, 2021 21:08
WordPress - CPT parent only based on taxonomy #wordpress #taxonomy
<?php
// https://developer.wordpress.org/reference/classes/wp_query
$args = array(
'post_type' => 'dan_health_resources',
'post_parent' => 0,
'orderby' => 'menu_order',
'tax_query' => array(
array (
'taxonomy' => 'dan_health_resource_types',
@frankyonnetti
frankyonnetti / WordPress - contrib plugin to Must-Use (MU).md
Created May 23, 2021 21:07
WordPress - contrib plugin to Must-Use (MU) #wordpress

Upload (or move) the contrib plugin directory into the /wp-content/mu-plugins/ directory.

Then create a proxy PHP loader file (such as load.php) in your mu-plugins directory.

for example:

<?php require WPMU_PLUGIN_DIR . '/add-to-any/add-to-any.php';

@frankyonnetti
frankyonnetti / FrontendGuide.vue
Created May 23, 2021 21:04
Vue - router #vue2 #router
<template>
<div id="frontend-guide">
<h1>Front-end Guide</h1>
<router-link to="/frontend-guide/buttons">Buttons</router-link>
<router-link to="/frontend-guide/grid">Grid</router-link>
<!-- children routes work here -->
<router-view/>
@frankyonnetti
frankyonnetti / Vue Bootstrap - create.md
Created May 23, 2021 21:00
Vue - Bootstrap #vue #bootstrap

Laravel Valet

commands

valet trust # stop from always asking for password

valet restart
@frankyonnetti
frankyonnetti / SVG--in-html.html
Created May 23, 2021 20:36
SVG - in html #svg
<!-- object embed -->
<object data="your.svg" type="image/svg+xml">
<img src="yourfallback.jpg" />
</object>
<!-- img tag -->
<img src="your.svg" onerror="this.src='your.png'">
<!-- css -->
div {
@frankyonnetti
frankyonnetti / CSS - Selector performance.md
Created May 23, 2021 20:26
CSS - selector performance #css
@frankyonnetti
frankyonnetti / SASS--animation-mixin.scss
Created May 23, 2021 20:23
SASS - animation mixin #sass #animation
// Animation
// https://css-tricks.com/almanac/properties/a/animation/
// ---
// animation-name: NAME
// animation-duration: Xs or Xms
// animation-timing-function: ease, ease-out, ease-in, ease-in-out, linear, cubic-bezier(x1, y1, x2, y2)
// animation-delay: Xs or Xms
// animation-direction: normal, alternate
// animation-iteration-count: X, infinite
// animation-fill-mode: forwards, backwards, both, none