// @OnlyCurrentDoc | |
const BearerTokenKey = 'twitterBearerToken'; | |
function onOpen() { | |
SpreadsheetApp | |
.getUi() | |
.createMenu('Twitter') | |
.addItem('Set Bearer token', 'helpers.requestBearerToken') | |
.addItem('Sign out', 'helpers.logout') |
const BearerTokenKey = 'twitterBearerToken'; | |
function onOpen() { | |
SpreadsheetApp | |
.getUi() | |
.createMenu('Twitter') | |
.addItem('Set Bearer token', 'helpers.requestBearerToken') | |
.addItem('Sign out', 'helpers.logout') | |
.addToUi(); | |
} |
Calculate the age of a person and write it to the event's description in your birthday calendar using Google Apps Script
This script uses Google Apps Script to access one's Google Calendar and calculate the age on a person's birthday. In the best case you have a custom calendar where your birthdays are stored at. If not, uncomment line 20 and use the filter function at the bottom.
- Head to https://script.google.com/home/my and create a new project. Rename the existing file Code.gs to your liking and paste the code from calculateAge.gs.
- Paste your calendar ID in line 9 (you can find it in the Google Calendar Settings)
- Make sure to add the birth year of a person to the location field (or customize the script)
- Customize the message in line 36
<?php | |
$columnNumber++ | |
?> | |
<div class="et_pb_row et_pb_row_<?php echo $columnNumber++ ?> et_pb_gutters2 wcf_gallery_row"> | |
<div class="et_pb_column et_pb_column_4_4 et_pb_column_<?php echo $columnNumber++ ?>"> | |
<div class="et_pb_module et_pb_gallery et_pb_gallery_<?php echo $columnNumber++ ?> et_pb_gallery_grid et_pb_bg_layout_light clearfix"> | |
<div class="et_pb_gallery_items et_post_gallery clearfix" data-per_page="20"> | |
<?php |
I'll start off with letting you know this is a fork from someone else. However, for some bizarre reason, this is the one everyone finds, so I better get round to updating this. Credit to Cristiano#2233 for the original idea.
Also, I've had a lot of people saying the rules are to strict. If you pick all the rules here, you're right, it would be very strict. However the rules below are guidelines! They are there for you to pick the ones you desire, you can ignore ones you don't want. Hopefully they might help with rules you wouldn't have thought of otherwise.
<?php | |
function change_yoast_seo_og_meta() { | |
add_filter( 'wpseo_opengraph_desc', 'change_desc' ); | |
} | |
function change_desc( $desc ) { | |
// This article is actually a landing page for an eBook | |
if( is_singular( 123 ) ) { |
/** | |
* Password reset on sub site (1 of 4) | |
* Replace login page "Lost Password?" urls. | |
* | |
* @param string $lostpassword_url The URL for retrieving a lost password. | |
* @param string $redirect The path to redirect to. | |
* | |
* @return string | |
* | |
* @since 1.0.0 |
{ | |
"$schema": "http://json-schema.org/schema#", | |
"id": "http://advancedcustomfields.com/json-schema/field_group", | |
"type": "object", | |
"definitions": { | |
"empty": { | |
"type": "string", | |
"maxLength": 0 | |
}, | |
"intOrEmpty": { |
add_filter('simplefavorites_user_list', 'filter_favorites_user_list', 10, 3); | |
function filter_favorites_user_list($output, $users, $anonymous_count) | |
{ | |
$output = '<ul>'; | |
foreach($users as $user){ | |
$output .= '<li><a href="' . site_url() . '/members/' . $user->user_login . '">' . $user->display_name . '</a></li>'; | |
} | |
$output .= '</ul>'; | |
$output .= '(+' . $anonymous_count . ' Anonymous Users)'; | |
return $output; |