#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| /* | |
| * | |
| * This CSS template will customize WordPress.org login pages: | |
| * | |
| * Login page: /wp-login.php | |
| * Register page: /wp-login.php?action=register | |
| * Lost Password page: /wp-login.php?action=lostpassword | |
| * | |
| * @site https://tudoparawp.com.br | |
| * @author Guga Alves |
| <?php | |
| /** | |
| * Add to cart redirect to checkout. | |
| * | |
| * @param string $url | |
| * @return string | |
| */ | |
| function my_wc_add_to_cart_redirect_to_checkout( $url ) { | |
| return wc_get_checkout_url(); |
| <?php // only copy this line if needed! | |
| /** | |
| * Adds a section with custom downloadable files to the "View Order Screen" | |
| * if the order has a "custom_file" custom field with a download ID | |
| * Requires Download Monitor | |
| * | |
| * SEE https://jilt.com/blog/selling-custom-files-woocommerce/ | |
| * |
| <?php | |
| /** | |
| * Plugin Name: WP REST API Subdomain | |
| * Plugin URI: https://wordpress.org/plugins/wp-rest-api-subdomain/ | |
| * Author: Mark McWilliams | |
| * Author URI: https://profiles.wordpress.org/markmcwilliams/ | |
| * License: GPLv2 or later | |
| * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| * Description: Move your RESTful API to a subdomain in WordPress |
| <?php | |
| $location = get_field('map_location'); | |
| if ( !empty( $location ) ) : | |
| $map_url = 'https://www.google.com/maps/dir/?api=1&destination=' . $location['lat'] . ',' . $location['lng']; | |
| echo '<a href=". esc_url( $map_url ) . '" rel="nooopener">Get directions</a>'; | |
| endif; | |
| ?> | |
| <p>This should produce a link like this:</p> | |
| <a href="https://www.google.com/maps/dir/?api=1&destination=51.072159,1.088130">Get directions</a> |
| <?php | |
| /* | |
| * Plugin Name: Example Modify Price | |
| */ | |
| class Example_Modify_Price { | |
| private static $instance; | |
| public static function register() { | |
| if (self::$instance == null) { |
| echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| <!DOCTYPE html> | |
| <head> | |
| <title>Stay Standalone</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <script src="stay_standalone.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="http://google.com/">Remote Link (Google)</a></li> |