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 | |
// Exit if accessed directly. | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
if ( ! class_exists( 'Mai_WooCommerce_Account_Tab' ) ): | |
/** | |
* A class to create new WooCommerce account tabs. | |
* | |
* @version 0.1.0 |
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 direct file access. | |
defined( 'ABSPATH' ) || die; | |
if ( ! class_exists( 'Mai_User_Role_Base' ) ): | |
/** | |
* The User Role Base class. | |
* | |
* @version 0.1.0 |
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 direct file access. | |
defined( 'ABSPATH' ) || die; | |
/** | |
* WP-CLI to delete all content. | |
* | |
wp post delete $(wp post list --post_type=post --format=ids) --force | |
wp post delete $(wp post list --post_type=page --format=ids) --force |
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 | |
/** | |
* Check if user is logged in and is post author | |
* Setup functions for front end post editing | |
* @author Mike Hemberger | |
* @link http://thestizmedia.com/front-end-post-editing-with-acf-pro/ | |
* @uses Advanced Custom Fields Pro | |
* @uses Sidr | |
*/ |
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
//* Put these in functions.php | |
/** | |
* Description: This redirects the failed login to the custom login page instead of default login page with a modified url | |
* @link ttp://wordpress.stackexchange.com/questions/110094/custom-login-redirects-to-wp-admin-on-wrong-password | |
**/ | |
add_action( 'wp_login_failed', 'prefix_front_end_login_fail' ); | |
function prefix_front_end_login_fail( $username ) { | |
// Getting URL of the login page |
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 | |
/** | |
* Mai WooCommerce Permalink Silos. | |
* | |
* @version 1.2.0 | |
* | |
* @package BizBudding\MaiWooCommercePermalinkSilos | |
* @link https://bizbudding.com | |
* @author BizBudding | |
* @copyright Copyright © 2023 BizBudding |
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 | |
/** | |
* Template Name: Create Post | |
* | |
* @author Mike Hemberger | |
* @link http://thestizmedia.com/front-end-posting-with-acf-pro/ | |
* @uses Advanced Custom Fields Pro | |
*/ | |
/** |
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 | |
/** | |
* Gets the primary term of a post, by taxonomy. | |
* If Yoast Primary Term is used, return it, | |
* otherwise fallback to the first term. | |
* | |
* @version 1.3.0 | |
* | |
* @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f |
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( 'enqueue_block_editor_assets', 'mai_enqueue_block_editor_assets' ); | |
/** | |
* Enqueues block assets for the editor, | |
* since front-end assets are loaded on-demand. | |
* | |
* @since TBD | |
* | |
* @return void |
NewerOlder