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
<h2><?php echo esc_html( 'Contact Us!' ); ?></h2> | |
<p><?php echo esc_html( 'Do you need any help? Please feel free to contact us from here!' ); ?></p> | |
<?php echo do_shortcode( 'WRITE HERE YOUR CONTACT FORM 7 SHORTCODE' ); ?> |
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 | |
class WC_Custom_My_Account_Tabs extends WC_Query { | |
/** | |
* Adds main filters and actions and inits the endpoints. | |
*/ | |
public function __construct() { | |
add_action( 'init', array( $this, 'add_endpoints' ) ); | |
if ( ! is_admin() ) { | |
add_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 ); |
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
class WC_Custom_My_Account_Tabs extends WC_Query { | |
/** | |
* Adds main filters and actions and inits the endpoints. | |
*/ | |
public function __construct() { | |
add_action( 'init', array( $this, 'add_endpoints' ) ); | |
if ( ! is_admin() ) { | |
add_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 ); | |
add_filter( 'woocommerce_account_menu_items', array( $this, 'edit_navigation' ) ); |
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
/** | |
* Print a View Comment link in the comments list in the admin. | |
* | |
* @param array $actions | |
* @return array | |
*/ | |
function custom_view_comment_action( $actions ) { | |
global $comment; | |
if ( $comment->comment_type !== '' ) { |
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
.breadcrumbs { | |
background-color: #f8f8f8; | |
margin-left: -99em; | |
margin-right: -99em; | |
margin-bottom: 4.235801032em; | |
padding: 1.41575em 99em; | |
} | |
.breadcrumbs a { | |
color: #92969e; |
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
/** | |
* Prints the Breadcrumb in Storefront using the function by Yoast SEO. | |
*/ | |
function storefront_yoast_breadcrumb() { | |
if ( function_exists( 'yoast_breadcrumb' ) && ! is_home() ) { | |
yoast_breadcrumb( '<nav class="breadcrumbs">','</nav>' ); | |
} | |
} | |
add_action( 'storefront_content_top', 'storefront_yoast_breadcrumb' ); |
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
/** | |
* Shows a notice in the admin once the bulk action is completed. | |
*/ | |
function my_bulk_action_admin_notice() { | |
if ( ! empty( $_REQUEST['bulk_draft_posts'] ) ) { | |
$drafts_count = intval( $_REQUEST['bulk_draft_posts'] ); | |
printf( | |
'<div id="message" class="updated fade">' . | |
_n( '%s post moved to drafts.', '%s posts moved to drafts.', $drafts_count, 'domain' ) |
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
/** | |
* Handles the bulk action. | |
*/ | |
function my_bulk_action_handler( $redirect_to, $action, $post_ids ) { | |
if ( $action !== 'draft_posts' ) { | |
return $redirect_to; | |
} | |
foreach ( $post_ids as $post_id ) { | |
wp_update_post( array( |
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
/** | |
* Adds a new item into the Bulk Actions dropdown. | |
*/ | |
function register_my_bulk_actions( $bulk_actions ) { | |
$bulk_actions['draft_posts'] = __( 'Move to Draft', 'domain' ); | |
return $bulk_actions; | |
} | |
add_filter( 'bulk_actions-edit-post', 'register_my_bulk_actions' ); |
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
/** | |
* Remove the additional CSS section, introduced in 4.7, from the Customizer. | |
* @param $wp_customize WP_Customize_Manager | |
*/ | |
function mycustomfunc_remove_css_section( $wp_customize ) { | |
$user = wp_get_current_user(); | |
if ( $user->ID !== 1 ) { | |
$wp_customize->remove_section( 'custom_css' ); | |
} |