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( 'wp_logout', 'flowmattic_custom_logout' ); | |
function flowmattic_custom_logout( $user_id ) { | |
$user_details = array(); | |
$current_user = get_user_by( 'ID', $user_id ); | |
$user_details['username'] = $current_user->user_login; | |
$user_details['user_email'] = $current_user->user_email; | |
$user_details['user_first_name'] = $current_user->user_firstname; | |
$user_details['user_last_name'] = $current_user->user_lastname; | |
$user_details['user_display_name'] = $current_user->display_name; |
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 | |
/** | |
* Save the base64 encoded image in WP. | |
* | |
* @param string $title Image title without extension. | |
* @param string $base64_img Base64 encoded image string. | |
*/ | |
function flowmattic_save_base64_image( $title, $base64_img ) { | |
// Upload dir. |
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 | |
*/ |
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
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
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
// 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
<?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
/** | |
* 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
// 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 ) { |
NewerOlder