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 | |
/** | |
* Redirect users to custom URL based on their role after login and restore the cart | |
* | |
* @param string $redirect | |
* @param object $user | |
* @return string | |
*/ | |
function wp_custom_user_redirect( $redirect, $user ) { | |
// Get the first of all the roles assigned to the user |
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 | |
/* | |
* Create Admin User | |
*/ | |
$wp_password = 'PASSWORD'; #enter your desired password here, if you don't line 16 makes sure nothing bad happens like setting you actual password to 'PASSWORD' | |
$wp_username = 'new-admin'; | |
$wp_email = '[email protected]'; | |
if ( $wp_password === 'PASSWORD' ) |
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
// Override the woocommerce default filter for getting max price for filter widget. | |
add_filter( 'woocommerce_price_filter_widget_max_amount', 'theme_woocommerce_price_filter_widget_max_amount', 10, 2 ); | |
/** | |
* Fix max_price issue in price filter widget. | |
* | |
* @param int $max_price The price filter form max_price. | |
* @return int Max price for the filter. | |
*/ | |
function theme_woocommerce_price_filter_widget_max_amount( $max_price ) { |
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
/** | |
* removes the 'view' link for CPT in the admin bar | |
*/ | |
function pdw_admin_bar_render() { | |
global $wp_admin_bar; | |
if('client' == get_post_type()){ | |
$wp_admin_bar->remove_menu('view'); | |
} |
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 | |
/** | |
* Change text strings | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function my_text_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Border Style' : | |
$translated_text = __( 'Border Type', 'fusion-builder' ); |
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
// Project Description. | |
add_filter( 'fusion_portfolio_post_project_description_label', 'fusion_portfolio_post_project_description_label_change', 99, 4 ); | |
function fusion_portfolio_post_project_description_label_change( $project_desc_html, $project_desc_title, $project_desc_title_style, $project_desc_tag ) { | |
return '<' . $project_desc_tag . ' style="' . esc_attr__( $project_desc_title_style ) . '">' . esc_html__( 'Project Description New Text', 'fusion-core' ) . '</' . $project_desc_tag . '>'; | |
} | |
// Project Details. | |
add_filter( 'fusion_portfolio_post_project_details_label', 'fusion_portfolio_post_project_details_label_change', 99, 3 ); | |
function fusion_portfolio_post_project_details_label_change( $project_details_html, $project_details_title, $project_details_tag ) { |
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 avada_child_fusion_portfolio_archive_template( $archive_post_template ) { | |
$archive_portfolio_template = get_stylesheet_directory() . '/templates/archive-avada_portfolio.php'; | |
// Checks if the archive is portfolio. | |
if ( is_post_type_archive( 'avada_portfolio' ) | |
|| is_tax( 'portfolio_category' ) | |
|| is_tax( 'portfolio_skills' ) | |
|| is_tax( 'portfolio_tags' ) ) { | |
if ( file_exists( $archive_portfolio_template ) ) { | |
fusion_portfolio_scripts(); |
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 the code in "Space befor </head>" option - | |
<script type="text/javascript"> | |
jQuery( 'document' ).ready( function() { | |
jQuery( '.fusion-middle-logo-menu-logo.fusion-logo' ).insertAfter( jQuery('.fusion-middle-logo-menu-logo.fusion-logo').siblings(':eq(1)') ); | |
}); | |
</script> |
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
// Update strings with custom branding strings. | |
add_filter( 'fusion_user_login_notices_array', 'update_registration_messages_text', 10, 3 ); | |
/** | |
* Update strings with the new ones. | |
* | |
* @access public | |
* @since 1.0 | |
* @param array $notice_array Array with default messages. | |
* @param string $action The current action performed by user. |
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 | |
/** | |
* Alter the response sent from webhook to the source. | |
* | |
* @param array $response Original response being sent to the source. | |
* @param string $workflow_id The workflow ID. | |
* @param array $capture_data Data captured in the webhook. | |
* | |
* @return array | |
*/ |
OlderNewer