This file contains hidden or 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
| <select onchange="window.location=this.value"> | |
| <option disabled selected>Choose location</option> | |
| <option value="https://example.com/location-page-one">Location One</option> | |
| <option value="https://example.com//location-page-two">Location Two</option> | |
| </select> |
This file contains hidden or 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 -xv | |
| # parse the current directory name | |
| currentdirectory=${PWD##*/} | |
| # get env variables | |
| export $(grep -v '^#' .env | xargs) | |
| ssh ${LIVE_USER}@${LIVE_DOMAIN} "cd /home/${LIVE_DIR};wp db export --add-drop-table db.sql" |
This file contains hidden or 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
| export default function Edit(props) { | |
| const {attributes, setAttributes} = props | |
| const UnitSelector = () => { | |
| const updateUnits = (val) => { | |
| setAttributes({units: val}); | |
| } | |
| return ( | |
| <TextControl | |
| label={__('Enter Units', 'blocks-for-weatherlink')} | |
| help={__('Knots, MPH, KPH', 'blocks-for-weatherlink')} |
This file contains hidden or 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: Get Data | |
| Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
| Description: A brief description of the Plugin. | |
| Version: 1.0 | |
| Author: alan | |
| Author URI: http://URI_Of_The_Plugin_Author | |
| License: A "Slug" license name e.g. GPL2 |
This file contains hidden or 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
| version: '3.3' | |
| services: | |
| db: | |
| image: mariadb:latest | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: | |
| MYSQL_ROOT_PASSWORD: mypass |
This file contains hidden or 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
| FROM php:8.1-apache | |
| ENV PORT 80 | |
| ENTRYPOINT [] | |
| CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && docker-php-entrypoint apache2-foreground | |
| RUN a2enmod rewrite | |
| RUN apt-get update \ | |
| && apt-get install -y libzip-dev \ | |
| && apt-get install -y libxml2-dev \ |
This file contains hidden or 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 | |
| add_filter( 'woocommerce_return_to_shop_redirect', function ( $shop_url ) { | |
| if ( is_cart() && wc()->cart->cart_contents_count == 0 ) { | |
| $deleted_items = wc()->cart->get_removed_cart_contents(); | |
| $deleted_items = array_reverse( $deleted_items ); | |
| foreach ( $deleted_items as $deleted_item ) { | |
| $deleted_id = (int) $deleted_item['product_id']; | |
| $vendor_id = wcfm_get_vendor_id_by_post( $deleted_id ); | |
| if ( $vendor_id ) { | |
| return wcfmmp_get_store_url( $vendor_id ); |
This file contains hidden or 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
| { | |
| "track_general_name": "Thread", | |
| "session_general_name": "Session", | |
| "login_page": "http:\/\/55", | |
| "logout_page": "http:\/\/2", | |
| "stream": [ | |
| { | |
| "header": "Thread 1", | |
| "0": { | |
| "name": "Opening Remarks", |
This file contains hidden or 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: Trent Valley Woodturners Code Snippets | |
| * Description: Custome functions specific for the TVW website | |
| * Author: Ben Wild | |
| * Version: 1.1 | |
| */ | |
| // just a check to make sure no hacker tries this file | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| die(); |
This file contains hidden or 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 | |
| //* Do NOT include the opening php tag shown | |
| add_filter( | |
| 'wfea_cal_event_extra_options', | |
| function ( $options ) { | |
| $title = get_the_title(); | |
| if (preg_match('/securing/i',$title) ) { | |
| $options['backgroundColor'] = 'red'; | |
| $options['borderColor'] = 'black'; | |
| $options['textColor'] = 'white'; |