Trouble with checked() for array of multiple checkboxes

Why take empty answer foreach ( $options as $key => $title ) { rpq_plugin_debug_var( $key, ‘Key: ‘ ); rpq_plugin_debug_var( $title, ‘Title: ‘ ); $checked = checked((in_array($title, $values)), true, false); After this loop end you get empty $checked because it replace every loop step. Trace: 1: $checked = ‘checked=”checked”‘ 2: $checked = ”; 3: $checked = … Read more

Comparing Dates within plugin using PHP If statement

$current_date is a timestamp and $compare_date is a formatted date, so you’re comparing different things. As you’re already using DateTime and as of PHP 5.2.2 DateTime objects can be compared using comparison operators, you can compare instead $expired_date (DateTime object) with today’s date as a DateTime object: $current_date = new DateTime(); $expired = new DateTime(); … Read more

Adding action item to admin users table and sending email

Thanks for that guidance, mmm. That was helpful. I resolved the problem this way: // Adds “Send rejection email” action to Users page function jm_send_rejection_link($actions, $user_object) { if( ($_GET[‘action’] == ‘jm_send_rejection’) && ($_GET[‘user’] == $user_object->user_email) ) { $sendto = $_GET[‘user’]; $sendsub = “Your registration has been rejected.”; $sendmess = “Your registration for has been rejected.”; … Read more

Multisite – Display different header content based on which site is accessed

You can use options to customize this for every site. Options are stored separately for each site. So, inside your header you can do something like <?php $login_link = get_option(“worduoso_login_link”); $login_text = get_option(“worduoso_login_text”); ?> and then print it like this <?php if($login_link && $login_text): ?> <div class=”added-header”><a href=”https://wordpress.stackexchange.com/questions/273810/<?php echo $login_link; ?>”><?php echo $login_text; ?></a></div><?php endif; … Read more

Editable Student file associated with basic User ID

Absolutely nothing about this is any simple. WordPress was never engineered to smoothly integrate with other systems. Though that is quite commonly done in practice. You have multiple distinct challenges here that all need to be studied, scoped, and developed: What data needs to be saved in WP installation and which data structures are appropriate … Read more