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_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); | |
function my_theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} |
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
/* | |
Theme Name: Twenty Fifteen Child | |
Theme URI: http://www.abdurrehman.net/blog Description: | |
Twenty Fifteen Child | |
Theme Author: Abd Ur Rehman | |
Author URI: http://www.abdurrehman.net | |
Template: twentyseventeen | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready |
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
Database Name: wordpress | |
User Name (database): root | |
Password (database): root | |
Database Host/server: localhost | |
Table Prefix: wp_ |
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
// Disabling admin bar for non admin users (this would work on a non-Woo site...) | |
function abdurrehman_net_hide_admin_bar_if( $show ) { | |
if ( /* CONDITION */ ) $show = false; | |
return $show; | |
} | |
add_filter( 'show_admin_bar', 'abdurrehman_net_hide_admin_bar_if' ); |
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
/** | |
* Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from seeing the admin bar. | |
* | |
*/ | |
function wc_disable_admin_bar( $show_admin_bar ) { | |
if ( apply_filters( 'woocommerce_disable_admin_bar', get_option( 'woocommerce_lock_down_admin', 'yes' ) === 'yes' ) && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) ) { | |
$show_admin_bar = false; | |
} | |
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 bbloomer_hide_admin_bar_if_non_admin( $show ) { | |
if ( ! current_user_can( 'administrator' ) ) $show = false; | |
return $show; | |
} | |
add_filter( 'show_admin_bar', 'bbloomer_hide_admin_bar_if_non_admin', 20, 1 ); | |
// please note the priority = '20' to make sure we run the filter after Woo's one |
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
add_action ( 'woocommerce_after_shop_loop_item', 'user_logged_in_product_already_bought', 30); | |
function user_logged_in_product_already_bought() { | |
if ( is_user_logged_in() ) { | |
global $product; | |
$current_user = wp_get_current_user(); | |
if ( wc_customer_bought_product( $current_user->user_email, $current_user->ID, $product->id ) ) echo '<div class="user-bought">♥ Hey ' . $current_user->first_name . ', you\'ve purchased this in the past. Buy again?</div>'; | |
} |
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
{ | |
"token": "s3924fdb1d93304f73fd1r13101e59f05b240d7f", | |
"include_users": ["ernilambar"] | |
} |
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
<files readme.html> | |
order allow,deny | |
deny from all | |
</files> |
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 lynt_remove_ver( $src ) { | |
$src = remove_query_arg('ver', $src); | |
return $src; | |
} | |
add_filter( 'script_loader_src', 'lynt_remove_ver' ); | |
add_filter( 'style_loader_src', 'lynt_remove_ver' ); |
OlderNewer