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 | |
| p.ID as 'Subscription ID', | |
| p.post_status as 'Subscription Status', | |
| pm1.meta_value as 'Billing First Name', | |
| pm2.meta_value as 'Billing Last Name', | |
| pm3.meta_value as 'Billing Email', | |
| oitems.order_item_name as 'Product', | |
| pm4.meta_value as 'Order Total', | |
| pm5.meta_value as 'Order Tax' | |
| FROM wp_posts p |
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
| ############ WordPress #################### | |
| # Disable logging for favicon and robots.txt | |
| location = /favicon.ico { | |
| try_files /favicon.ico @empty; | |
| access_log off; | |
| log_not_found off; | |
| expires max; | |
| } |
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 | |
| defined( 'ABSPATH' ) or die( 'No direct access here.' ); | |
| /** | |
| * Plugin Name: Simple Map | Defer | |
| * Description: Makes sure Google Maps API script from <a href="https://wordpress.org/plugins/simple-map/">Simple Map</a> gets loaded deferred. | |
| * Author: Caspar Hübinger | |
| * Author URI: https://profiles.wordpress.org/glueckpress | |
| * Plugin URI: https://gist.github.com/glueckpress/56c88900aad391b95b5d44f4e752a1a4 | |
| * License: GNU General Public License v3 or later | |
| * License URI: http://www.gnu.org/licenses/gpl-3.0.html |
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
| wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx | |
| #next add the following to your nginx site conf | |
| #In nginx you then just include the blacklist. | |
| include /etc/nginx/conf.d/tor-block.conf; | |
| #The file contains statements like this: |
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 | |
| # ------------------------------------------------- | |
| # Make site directory | |
| # Download WP and install WP to site directory | |
| # Set WP configuration | |
| # Configure NGINX for new domain-name | |
| # ------------------------------------------------- | |
| # | |
| # Requirments: | |
| # |
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 | |
| /** | |
| * | |
| * Create Shortcode for WooCommerce Basket Item and WooCommerce Account Item | |
| * @link https://wpbeaches.com/add-woocommerce-cart-icon-to-menu-with-cart-item-count/#just-icon | |
| */ | |
| function mic_woo_cart_but() { | |
| ob_start(); | |
| $cart_count = WC()->cart->cart_contents_count; // Set variable for cart item count |
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
| (function($) { | |
| 'use strict'; | |
| jQuery(document).ready(function() { | |
| //Load all posts | |
| asr_ajax_get_postdata(-1); | |
| $('.asr_texonomy').on('click',function(){ | |
| var term_id = $(this).attr('data_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
| <?php | |
| /** | |
| * | |
| * Prevent update notification for plugin | |
| * | |
| */ | |
| function ns_disable_plugin_updates( $value ) { | |
| $pluginsToDisable = [ | |
| 'plugin-folder/plugin.php', |
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
| /** | |
| * | |
| * Redirect all users that are not in the users array to the wp-admin dashboard page if trying to access the pages below declared | |
| * | |
| */ | |
| if ( ! function_exists( 'ns_redirect_users_by_role' ) ) : | |
| function ns_redirect_users_by_role() { | |
| global $pagenow; |
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 | |
| /** | |
| * | |
| * Default/fallback post thumbnail image. | |
| * | |
| */ | |
| function aoa_filter_thumbnail_id( $thumbnail_id, $post = null ) { | |
| if ( ! $thumbnail_id ) { |
NewerOlder