This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A bash script to run WP-CLI commands on multiple sites at once. It requires WP-CLI, obviously (https://wp-cli.org/). | |
# The script will search for all WordPress installations under a given directory and will run the command. You can declare more than one such directories. | |
# You don't have to modify the script every time you add a new site. As long as the new site is under a declared parent directory, its database will be backed up. | |
# After creating the file, don't forget to make it executable by doing: `chmod +x superwp.sh`. Then, include it to `.bashrc` or `.bash_profile` by adding `source path/to/superwp.sh`. | |
# Then, you can run any `wp` command you like on all the sites of your server, by replacing `wp` with `superwp`. | |
# Example: `superwp plugin list`. | |
# We use a function, in order to be able to call it as many times as we want, for as many different directories containing WordPress installations there are on the server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A bash script to batch update a server's WordPress sites with WP-CLI. It requires WP-CLI, obviously (https://wp-cli.org/). | |
# The script will search for all WordPress installations under a given directory and will update them. You can declare more than one such directories. | |
# You don't have to modify the script every time you add a new site. As long as the new site is under a declared parent directory, its database will be backed up. | |
# After creating the file, don't forget to make it executable by doing: | |
# chmod +x update_sites.sh | |
# Set PATH environment variable | |
export PATH="/usr/local/bin:/usr/bin:/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"timezone": "Africa/Abidjan", | |
"lat": "5.32812", | |
"lng": "-3.97654" | |
}, | |
{ | |
"timezone": "Africa/Accra", | |
"lat": "5.605189800262451", | |
"lng": "-0.16678600013256073" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Timezone Coordinates | |
* Description: Guess the default coordinates for WordPress timezones. | |
* Author: Giorgos Sarigiannidis | |
* Version: 0.1 | |
* Author URI: http://www.gsarigiannidis.gr | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
* | |
* @package TimezoneCoordinates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Live server | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: deploy to server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wp-block:not([data-type="core/paragraph"]):not(.block-list-appender):not(.block-editor-default-block-appender):not(.editor-post-title):hover::before, | |
.wp-block-group:hover::before { | |
content: ''; | |
width: 100%; | |
height: 100%; | |
pointer-events: none; | |
border: 1px dashed; | |
position: absolute; | |
top: 0; | |
left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get Instagram media on WordPress using the current Instagram (Facebook) API | |
* | |
* @param $token // Info on how to retrieve the token: https://www.gsarigiannidis.gr/instagram-feed-api-after-june-2020/ | |
* @param $user // User ID can be found using the Facebook debug tool: https://developers.facebook.com/tools/debug/accesstoken/ | |
* @param int $limit // Add a limit to prevent excessive calls. | |
* @param string $fields // More options here: https://developers.facebook.com/docs/instagram-basic-display-api/reference/media | |
* @param array $restrict // Available options: IMAGE, VIDEO, CAROUSEL_ALBUM | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form_id = 3; | |
add_filter( 'gform_form_post_get_meta_' . $form_id, 'add_repeater_field' ); | |
function add_repeater_field( $form ) { | |
$field_id = 1000; | |
$fields = [ | |
GF_Fields::create( | |
[ | |
'type' => 'text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Spoilers toggler for insomnia.gr | |
// @match https://www.insomnia.gr/* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Show ACF field names in WP Admin | |
// @match http://*/wp-admin/* | |
// @match https://*/wp-admin/* | |
// @match http://*/*/wp-admin/* | |
// @match https://*/*/wp-admin/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
NewerOlder