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
width: min-intrinsic; | |
width: -webkit-min-content; | |
width: -moz-min-content; | |
width: min-content; | |
display: table-caption; | |
display: -ms-grid; | |
-ms-grid-columns: min-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
<?php | |
/** | |
* Using wp_dropdown_categories with the post type filter applied. | |
* | |
* @link https://joshuadnelson.com/category-taxonomy-dropdown-filtered-by-post-type/ | |
*/ | |
// Taxonomy dropdown arguments | |
$args = array( | |
'taxonomy' => 'department', |
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
$string = preg_replace('/[^a-zA-Z0-9_ -]/s','',$term->name); //$term->name change what string you need to change |
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 /* menu */ | |
wp_nav_menu( array( | |
'menu' => 'menu-1', | |
'theme_location' => 'menu-1', | |
'depth' => 5, | |
'container' => 'div', | |
'container_class' => 'collapse navbar-collapse navbar-ex1-collapse ', | |
'menu_class' => 'nav navbar-nav ', | |
'fallback_cb' => 'wp_bootstrap_navwalker::fallback', | |
'walker' => new wp_bootstrap_navwalker()) |
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 | |
/* | |
Plugin Name: Dashboard Widget Activity Custom Post Type | |
Plugin URI: | |
Description: | |
Author: Daniele Mte90 Scasciafratte | |
Version: 1.0.0 | |
Author URI: http://mte90.net | |
*/ |
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 forgotpass_message() { | |
$action = $_REQUEST['action']; | |
if( $action == 'lostpassword' ) { | |
$message = '<p class="message">Please enter your email address. Then check your email inbox for instructions to reset your password.</p>'; | |
return $message; | |
} | |
} | |
add_filter('login_message', 'forgotpass_message'); | |
The url on the forgot password page includes the query string “action=lostpassword” so that’s what I’m checking for with my $_REQUEST call. If we’re on the forgot password page, then make a new message and return it. |
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
$user = new WP_User( (int) $user_id ); | |
$adt_rp_key = get_password_reset_key( $user ); | |
$user_login = $user->user_login; | |
$rp_link = '<a href="' . network_site_url("wp-login.php?action=rp&key=$adt_rp_key&login=" . rawurlencode($user_login), 'login') . '">' . network_site_url("wp-login.php?action=rp&key=$adt_rp_key&login=" . rawurlencode($user_login), 'login') . '</a>'; | |
?> | |
<div id="signup-welcome"> | |
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p> | |
<p>To set your password, select the following link: <?php echo $rp_link; ?></p> | |
</div> |
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_action( 'resetpass_form', 'resettext'); | |
function resettext(){ ?> | |
<script type="text/javascript"> | |
jQuery( document ).ready(function() { | |
jQuery('#resetpassform input#wp-submit').val("Set Password"); | |
}); | |
</script> | |
<?php | |
} |
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 admin_login_redirect( $redirect_to, $request, $user ) { | |
global $user; | |
if( isset( $user->roles ) && is_array( $user->roles ) ) { | |
if( in_array( "administrator", $user->roles ) ) { | |
return $redirect_to; | |
} | |
else { | |
return home_url('/portal'); | |
} |
NewerOlder