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 | |
/** | |
* | |
* Prevent update notification for plugin | |
* | |
*/ | |
function ns_disable_plugin_updates( $value ) { | |
$pluginsToDisable = [ | |
'plugin-folder/plugin.php', |
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
/** | |
* | |
* 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 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 ) { |
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
############ 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 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_shortcode( 'wp-nav-slider', 'nav_slider' ); | |
function nav_slider( $atts ) { | |
if(empty($atts['id'])){ | |
echo 'enter menu id'; | |
return; | |
}?> | |
<div class="nav-slider-main"> | |
<div class="nav-slider-inner swiper-container"> |
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
/** | |
* | |
* Shortcode contact form | |
*/ | |
// @codingStandardsIgnoreStart | |
function decorativefair_shortcode_product_form($item) { | |
ob_start(); | |
global $post, $product; | |
$author_name = get_the_author_meta( 'user_email', $product->post->post_author ); |
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
(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 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 | |
/** | |
* | |
* Usage [newscpt posts_per_page="4" term="4"] . | |
* Change post_type to your CPT name | |
* Change taxonomy to your taxonomy name | |
* | |
*/ | |
// @codingStandardsIgnoreStart |
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
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 |
NewerOlder