Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# Kinsta Deployment through Github Actions for Bedrock/Sage. | |
# | |
# Placed at: .github/workflow/deploy.yml | |
# | |
# Process should be studied from code, but some quick brief: | |
# - runs composer / sage installation | |
# - moves correct `.env.*` file for multiple configs | |
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there | |
# - symlinks uploads folder and symlink release folder to kinsta public hostname | |
# - if you want to clear cache, please uncomment the last job |
<?php | |
/* | |
Plugin Name: Programmatically add Gravity Forms | |
Plugin URI: https://daan.kortenba.ch/programmatically-add-gravity-forms/ | |
Description: Programmatically add persistent Gravity Forms forms. | |
Author: Daan Kortenbach | |
Version: 0.1 | |
Author URI: https://daan.kortenba.ch/ | |
License: GPLv2 or later | |
*/ |
<?php | |
$args = array( | |
'label' => '', // Text in Label | |
'class' => '', | |
'style' => '', | |
'wrapper_class' => '', | |
'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
'id' => '', // required | |
'name' => '', //name will set from id if empty |
// This function implements a "Load More" button. | |
// It assumes that there is already a matching query that has executed on the page, so this AJAX call is just a continuation of that query to grab additional posts. | |
// There are no animations added here. For a smoother experience, it is a good idea to add animations to the button (ex. a loading icon during the request), or making the new posts animate in (ex, using Animate.css to fade them into the page) | |
$(function() { | |
// Grab the load more button, since I only want to run the code if the button is on the page | |
var loadMoreButton = $('#load-more'); | |
if (loadMoreButton) { | |
// Because there are already posts on the page, we need to manually tell this query what page of results to grab so that is doesn't load duplicate posts | |
var loadPosts = function(page) { |
var countryCodes = { | |
'Afghanistan': '93', | |
'Albania': '355', | |
'Algeria': '213', | |
'American Samoa': '684', | |
'Andorra': '376', | |
'Angola': '244', | |
'Antigua and Barbuda': '1-268', | |
'Argentina': '54', | |
'Armenia': '374', |
<?php | |
// Credit to http://joshuaiz.com/words/ordering-events-by-advanced-custom-fields-date-time-picker-field/ | |
$time = current_time( 'timestamp' ); // Get current unix timestamp | |
// Set up custom query with meta_query to compare event start date with today's date | |
$args = array ( | |
'post_type' => 'event', // your event post type slug | |
'post_status' => 'publish', // only show published events | |
'orderby' => 'meta_value', // order by date |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Example</title> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.3.6/slick.css"/> | |
<style> | |
.menu { | |
text-align: center; | |
} |
<?php | |
/** | |
* Display how many spots are left in the choice label when using the GP Limit Choices perk | |
* http://gravitywiz.com/gravity-perks/ | |
*/ | |
add_filter( 'gplc_remove_choices', '__return_false' ); | |
add_filter( 'gplc_pre_render_choice', 'my_add_how_many_left_message', 10, 5 ); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Set sizes without units | |
$basefont: 20; | |
$total-width-px: 1169; | |
$column-width-px: 72; | |
// Concatenation of units by addition results in conversion to string. This is bad | |
$basefont-px: $basefont+'px'; // = "20px" | |
// Conversion to pixels using multiplication | |
$basefont-px: $basefont*1px; // = 20px; |