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
define( 'CHILD_THEME_FILES', __FILE__ ); | |
define( 'CHILD_THEME_NAME_SLUG', 'astra-child' ); | |
$stylesheet_directory = get_stylesheet_directory(); | |
/** | |
* Load the file that include the code of product single page | |
*/ |
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
/** | |
* Add Settings link to plugins area. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $links Links array in which we would prepend our link. | |
* @param string $file Current plugin basename. | |
* @return array Processed links. | |
*/ |
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
/** | |
* Only allow the product CPT to be search on the golbal search page | |
* | |
* @param WP_Query $query The WP_Query instance (passed by reference). | |
*/ | |
function tometal_filter_search_only_products( $query ) { | |
if ( ! is_admin() && $query->is_main_query() && $query->is_search() ) { | |
$query->set( 'post_type', 'product' ); | |
} |
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
/** | |
* Filter to alter the rest_query args to add draft and filter | |
* | |
* @param array $args Array of arguments for WP_Query. | |
* @param WP_REST_Request $request The REST API request. | |
* | |
* @return array $args Array of arguments for WP_Query. | |
*/ | |
function lubus_custom_allow_drafts_in_rest_query( $args, $request ) { |
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
/** | |
* Generate the post slug for the draft post as well | |
* | |
* @param int $post_id Post ID. | |
* @param WP_Post $post Post object. | |
* @param bool $update Whether this is an existing post being updated. | |
**/ | |
function lubus_generate_slug_for_draft_post( $post_id, $post, $update ) { | |
// If the post is a draft and has no slug. |
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
function delete_user_account( $query_args ) { | |
// Use this array to specify multiple roles to show in dropdown | |
$query_args['role__in'] = array( 'administrator' ); | |
// Unset the 'who' as this defaults to the 'author' role | |
unset( $query_args['who'] ); | |
return $query_args; | |
} |
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 | |
global $prli_link, $prli_blogurl; | |
// Create the pretty link | |
$pretty_link_id = prli_create_pretty_link( | |
'https://google.com', // Target URL | |
'api-link-1', // Slug | |
'API Link', // Name of pretty link | |
'', // Description |
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
function limit_activities_displayed( $retval ) { | |
$isMob = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "mobile")); | |
if ($isMob) { | |
$retval['per_page'] = 15; | |
} | |
else { | |
$retval['per_page'] = 5; | |
} | |
return $retval; | |
} |
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_action( 'bp_activity_after_email_content', 'bb_gif_activity_after_email_content' ); |
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
/** | |
* Update the place holder into the login page | |
*/ | |
function acrosswp_custom_bb_login_head_callback() { | |
?> | |
<script> | |
jQuery( document ).ready( function ($) { | |
jQuery( 'form#loginform #user_login' ).attr( 'placeholder', "Custom Email" ); | |
}); |
NewerOlder