I am making a custom options page for WordPress and making use of wp_editor. Here is the code I have:
$settings = array('wpautop' => false, 'textarea_name' => $editor_id);
echo '<table class="form-table">';
echo '<tbody>';
echo '<tr>';
echo '<th scope="col">Enabled?</th>';
echo '<td><input name="emp_enabled" type="checkbox" value="checked" '.$get_settings['emp_enabled'].'><p class="description">Do you want to enable Maintenance Page?</p></td>';
echo '</tr>';
echo '<tr>';
echo '<th scope="col">Background Colour</th>';
echo '<td><input id="emp_background_colour" class="regular-text ltr emp_background_colour" name="emp_background_colour" type="input" value="'.$get_settings['emp_background_colour'].'"><p class="description">Do you want to set a background colour?</p></td>';
echo '</tr>';
echo '<th scope="col">Background Image </th>';
echo '<td><input id="upload_image_url" class="regular-text ltr" name="emp_background_image" type="input" value="'.$get_settings['emp_background_image'].'"><input id="upload_image_button" class="button" type="button" value="Upload Image" /><p class="description">Do you want to set a background image? This will override Background Colour.</p></td>';
echo '</tr>';
echo '<tr>';
echo '<th scope="col">Content</th>';
echo '<td>'.wp_editor( $get_settings[$editor_id] , $editor_id, $settings ).'</td>';
echo '</tr>';
echo '</tbody>';
echo '</table>';
Content is getting pulled through as it should, but for some reason the editor doesn't sit within the table cell, it sits above the actually table.
Any ideas why this is? I can't see any obvious issues, so was wandering if there is a setting I am missing?
Here You could create something like below:
function editor_tobe_used($user)
{
if (!current_user_can('edit_posts')) {
return;
}
?>
<table class="form-table">
<tbody>
<tr>
<th scope="col">Enabled?</th>
<td><input name="emp_enabled" type="checkbox" value="checked" <?php echo $get_settings['emp_enabled'];?>'><p class="description">Do you want to enable Maintenance Page?</p></td>
</tr>
<tr>
<th scope="col">Background Colour</th>
<td><input id="emp_background_colour" class="regular-text ltr emp_background_colour" name="emp_background_colour" type="input" value="<?php $get_settings['emp_background_colour'];?>"><p class="description">Do you want to set a background colour?</p></td>
</tr>
<th scope="col">Background Image </th>
<td><input id="upload_image_url" class="regular-text ltr" name="emp_background_image" type="input" value="<?php $get_settings['emp_background_image'];?>"><input id="upload_image_button" class="button" type="button" value="Upload Image" /><p class="description">Do you want to set a background image? This will override Background Colour.</p></td>
</tr>
<tr>
<th scope="col">Content</th>
<td> <?php wp_editor( "Your content Goes here" , $editor_id, $settings );?></td>
</tr>
</tbody>
</table>
<?php
}
Related
I put a popup trigger inside a td because i transferred several of the of the data of the table into the popup window. However, i cannot get the details from the table since I placed the main popup window outside the while loop because the popup window displays several times instead of just one window. How do I pass the table results to the popup?
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)) {
$k=1;
?>
<td>
<a href="#0" id="info" class="info popup-trigger"
title="info">View</a>
</td>
<td style="font-size:16px;"><STRONG><?php echo $row['eqdesc'];
$eqid=$row['eq_inv_id'];?>
</STRONG></td>
<td><?php echo $row['eq_inv_id']; ?></td>
<td style="color:red; font-size:15px;"><strong><a href="timeline.php?
emp_no=<?php echo
$row['empl_no'];?>" style="color:inherit;"><?php echo
$row['empl_firstname']; ?></a></strong>
</td>
<td style="color:red; font-size:15px;"><strong><a href="timeline.php?
emp_no=<?php echo
$row['empl_no'];?>" style="color:inherit;"><?php echo
$row['middlename']; ?></a></strong>
</td>
<td style="color:red; font-size:15px;"><strong><a href="timeline.php?
emp_no=<?php echo
$row['empl_no'];?>" style="color:inherit;"><?php echo
$row['empl_lastname']; ?></a>
</strong></td>
<td><?php echo $row['brand']; ?></td>
<td><?php echo $row['serial_no']; ?></td>
<td><?php echo $row['eq_state']; ?></td>
<td><?php echo $row['eq_condition']; ?></td>
<td><?php echo $row['curr_equip_loc']; ?></td>
</tbody>
<?php
}
?>
</table>
</div>
<div id="#0" class="popup" role="alert">
<div class="popup-container">
Close
<h2 class="modal-heading">EQUIPMENT INFORMATION</h2>
<label>EMPL. NO.:<strong><?php echo $row['eq_inv_id'];?></strong>
</label><br>
<label>FIRST NAME:</label><br>
<label>MIDDLE NAME:</label><br>
<label>LAST NAME:</label><br>
<label>EQ DESCRIPTION:</label><br>
<label>DESCRIPTION:</label><br>
<label>BRAND:</label><br>
<label>TAG NO.:</label><br>
<label>SERIAL NO.:</label><br>
<label>MODEL NO:</label><br>
<label>IP ADDRESS:</label><br>
<label>DATE ISSUED:</label><br>
<label>EQ STATE:</label><br>
<label>EQ CONDITION:</label><br>
<label>DATE PURCHASED:</label><br>
<label>AGE:</label><br><BR>
<label>PRICE:</label><br>
<label>LOCATION:</label><br>
<label>REMARKS:</label><br>
<label>PAR NO.:</label><br><BR>
<button class="">UPDATE</button>
<button class="">Assign this equipment to an employee</button>
<button class="">EQ HISTORY</button>
</div>
</div>
<script>
jQuery(document).ready(function($){
//open popup
$('.popup-trigger').on('click', function(event){
event.preventDefault();
$('.popup').addClass('is-visible');
});
//close popup
$('.popup').on('click', function(event){
if( $(event.target).is('.popup-close') || $(event.target).is('.popup')
) {
event.preventDefault();
$(this).removeClass('is-visible');
}
});
//close popup when clicking the esc keyboard button
$(document).keyup(function(event){
if(event.which=='27'){
$('.popup').removeClass('is-visible');
}
});
});
</script>
UPDATED
I finally figured it out. I separated the display of modal and the passing of the table result. I used bootstrap to display the modal. The script below is only to pass the table result into the pop-up modal. This is the working code.
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)) {
?>
<td>
<!-- Button trigger modal -->
<button type="button" value="<?php echo $row['eq_inv_id'];?>"
onclick="foggyDetails(this)" class="btn btn-primary" data-
toggle="modal" data-target="#exampleModalCenter">
View EQ
</button>
</td>
<td><?php echo $row['eq_inv_id']; ?></td>
<td style="font-size:16px;"><STRONG><?php echo $row['eqdesc'];?>
</STRONG></td>
<td style="color:red; font-size:15px;"><strong><a
href="timeline.php?emp_no=<?php echo $row['empl_no'];?>"
style="color:inherit;"><?php echo $row['empl_firstname']; ?></a>
</strong></td>
<td style="color:red; font-size:15px;"><strong><a
href="timeline.php?emp_no=<?php echo $row['empl_no'];?>"
style="color:inherit;"><?php echo $row['middlename']; ?></a>
</strong></td>
<td style="color:red; font-size:15px;"><strong><a
href="timeline.php?emp_no=<?php echo $row['empl_no'];?>"
style="color:inherit;"><?php echo $row['empl_lastname']; ?></a>
</strong></td>
<td><?php echo $row['brand']; ?></td>
<td><?php echo $row['serial_no']; ?></td>
<td><?php echo $row['eq_state']; ?></td>
<td><?php echo $row['eq_condition']; ?></td>
<td><?php echo $row['curr_equip_loc']; ?></td>
</tbody>
<?php
}
?>
</table>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1"
role="dialog" aria-labelledby="exampleModalCenterTitle" aria-
hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">EQ Information</h5>
<button type="button" class="close" data-dismiss="modal" aria-
label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label>Equipment ID:<strong><span id="foggy"></span></strong><br>
<label>Description:<strong><span id="foggy2"></span></strong><br>
<label>Brand:<strong><span id="foggy3"></span></strong>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
Script
function foggyDetails(details){
var invId = details.value;
$.ajax({
url: "test.php",
method: "GET",
data: {"invId": invId},
success: function(response) {
// Parsing the JSON string to javascript object
var reu = JSON.parse(response);
//Displaying in proper field
$("#foggy").text(reu.eq_inv_id);
$("#foggy2").text(reu.eqdesc);
$("#foggy3").text(reu.brand);
}
});
}
test.php
<?php
include('connect.php');
$invId=$_GET['invId'];
$sql="SELECT * FROM eq_inv WHERE eq_inv_id='$invId'";
$result=mysqli_query($conn, $sql);
$a=mysqli_fetch_object($result);
echo json_encode($a); //returning the json string
?>
I'm trying to setup a custom post type for Landing Pages in WordPress, including the option to customize the text for the html auto response email.
I am able to call the post meta on a different page using using the following loop, but I can't figure out how to put it in a format that works in the html auto response.
Is it possible to turn the following loop into this ". $_POST['content'] ." or something more appropriate?
<?php
$args = array( 'post_type' => 'landing_pages');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo esc_html( get_post_meta( get_the_ID(), 'landing_pages_short_description', true ) );
endwhile;
wp_reset_query();
?>
Here is the html auto response
<?php
if(!empty($_POST['rev_captcha'])) {
die('Nice try robot. Nothing for you here.');
}
$autoResponse = true;
$autoResponseSubject = "Brand Name: A copy of your message";
$autoResponseMessage = "<html>
<head>
<title>Brand Name: A copy of your message</title>
</head>
<body>
<table cellpadding='0' cellspacing='0' width='100%' border='0' bgcolor='#f0f3f5' style='margin:0;padding:0;padding-bottom:15px;width:100%!important;height:100%!important;line-height:100%!important;background:#f0f3f5'>
<tbody>
<tr>
<td width='100%' height='110px' valign='top'>
<table cellpadding='0' cellspacing='0' width='95%' border='0' align='center'>
<tbody>
<tr>
<td width='40%' align='center' style='padding:25px 0 0'>
<img src='' width='160' height='55' alt=''>
</td>
<td width='60%' style='padding:40px 0 0'>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width='100%' valign='top' align='center'>
<table cellpadding='0' cellspacing='0' border='0' align='center' width='95%' bgcolor='#ffffff' style='background:#ffffff;padding-top:0px;border:1px solid #eeeeee;border-top:none' valign='top'>
<tbody>
<tr>
<td align='center' style='padding-bottom:30px;padding-top:50px;border-bottom:1px solid #eeeeee'>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#444444;margin:0 30px 5px;padding-top:10px;line-height:1.5\">
<strong style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:32px;line-height:30px;color:#444444\">Good news, ". $_POST['name'] ."!</strong></p>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#444444;margin:0;padding: 10px 50px 30px;line-height:1.5;text-align:center\">Your message has been sent.</p>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#444444;margin:0;padding: 10px 50px 0;line-height:1.5;text-align:left\">Here is a copy for your records:</p>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#444444;margin:10px 0 10px 52px;padding:0 50px 0 20px;border-left:4px solid #666666;line-height:1.5;text-align:left\"><em>". $_POST['notes'] ."<br>--<br>". $_POST['name'] ."<br>". $_POST['phone'] ."<br>". $_POST['email'] ."</em></p>
<br>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#444444;margin:0;padding: 10px 50px 0;line-height:1.5;text-align:left\">Sent from: ". $_POST['referrer'] ."</p>
</td>
</tr>
<tr>
<td align='center'>
<p style=\"font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;color:#888888;line-height:1.3;padding:10px 50px\">Thanks for contacting</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
";
$autoResponseHeaders = "From: ___#___.ca"."\r\n";
$autoResponseHeaders .= "MIME-Version: 1.0"."\r\n";
$autoResponseHeaders .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
$email_to = $_POST['email'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$notes = $_POST['notes'];
$referrer = $_POST['referrer'];
$time = date('F j, Y g:i:s A T', time());
$message = "From: $name "."\r\n"."Email: $email_to "."\r\n"."Time: $time "."\r\n";
$headers = "From: $email_to"."\r\n";
$headers .= "Reply-To: $email_to"."\r\n";
if(mail('___#___.ca', 'Brand Name', $notes . "\r\n \r\n" . $name . "\r\n". $phone . "\r\n". $email_to . "\r\n \r\n" . 'Sent from: ' . $referrer , $headers)){
if($autoResponse === true){
mail($email_to, $autoResponseSubject, $autoResponseMessage, $autoResponseHeaders);
}
header("Location:/sent.php" ); // send to the proper page when done.
}else{
echo 'failed';// ... or this one to tell it that it wasn't sent
}
?>
on the file single-landing_page.php create a hidden form field
<input type="hidden" name="custom_postmeta" value="<?php echo esc_html( get_post_meta( get_the_ID(), 'landing_pages_short_description', true ) ); ?>" />
then on the other file as you get all other fields you can get this hidden field too like
$custompostmeta = $_POST['custom_postmeta'];
then concatinate this $custompostmeta variable within your html table
Hope it will work
I'm trying to build a widget with some checkboxes but i don't know how to save values.
is there a way to save them i'm almost at the end of finish my widget, thank you.
this part of my code:
function update($new_instance, $old_instance){
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']); // new_instance es el titulo que ingresa el usuario
$urlsprite = strip_tags($new_instance['urlsprite']);
$urlfacebook = strip_tags($new_instance['urlfacebook']);
$urltwitter = strip_tags($new_instance['urltwitter']);
$urlpicassa = strip_tags($new_instance['urlpicassa']);
$urlyoutube = strip_tags($new_instance['urlyoutube']);
$urlrss = strip_tags($new_instance['urlrss']);
$chkfacebook = $new_instance['chkfacebook'];
$chktwitter = $new_instance['chktwitter'];
$chkpicassa = $new_instance['chkpicassa'];
$chkyoutube = $new_instance['chkyoutube'];
$chkrss = $new_instance['chkrss'];
return $instance;
}
function widget($args, $instance){
extract($args);
<a id="facebook" target="_blank" href="<?php echo $instance['urlfacebook'] ?>"></a>
<a id="twitter" target="_blank" href="<?php echo $instance['urltwitter'] ?>"></a>
<a id="picassa" target="_blank" href="<?php echo $instance['urlpicassa'] ?>"></a>
<a id="youtube" target="_blank" href="<?php echo $instance['urlyoutube'] ?>"></a>
<a id="rss" target="_blank" href="<?php echo $instance['urlrss'] ?>"></a>
<?php
}
This will help you. Basic example of saving wordpress options.
<?php
// create custom plugin settings menu
add_action('admin_menu', 'baw_create_menu');
function baw_create_menu() {
//create new top-level menu
add_menu_page('BAW Plugin Settings', 'BAW Settings', 'administrator', __FILE__, 'baw_settings_page',plugins_url('/images/icon.png', __FILE__));
//call register settings function
add_action( 'admin_init', 'register_mysettings' );
}
function register_mysettings() {
//register our settings
register_setting( 'baw-settings-group', 'new_option_name' );
register_setting( 'baw-settings-group', 'some_other_option' );
register_setting( 'baw-settings-group', 'option_etc' );
}
function baw_settings_page() {
?>
<div class="wrap">
<h2>Your Plugin Name</h2>
<form method="post" action="options.php">
<?php settings_fields( 'baw-settings-group' ); ?>
<?php do_settings_sections( 'baw-settings-group' ); ?>
<table class="form-table">
<tr valign="top">
<th scope="row">New Option Name</th>
<td><input type="text" name="new_option_name" value="<?php echo get_option('new_option_name'); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row">Some Other Option</th>
<td><input type="text" name="some_other_option" value="<?php echo get_option('some_other_option'); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row">Options, Etc.</th>
<td><input type="text" name="option_etc" value="<?php echo get_option('option_etc'); ?>" /></td>
</tr>
</table>
<?php submit_button(); ?>
</form>
</div>
<?php } ?>
Source: http://codex.wordpress.org/Creating_Options_Pages
This is code....
<?php
if (!defined('IPHORM_VERSION')) exit;
if (!isset($element['logic'])) $element['logic'] = false;
?>
<tr valign="top">
<th scope="row">
<label for="prevent_duplicates_<?php echo $id; ?>"><?php esc_html_e('Enable conditional logic', 'iphorm'); ?></label>
</th>
<td>
<input type="checkbox" id="logic_<?php echo $id; ?>" name="logic_<?php echo $id; ?>" <?php checked(true, $element['logic']); ?> onclick="iPhorm.toggleLogic(iPhorm.getElementById(<?php echo $id; ?>));" />
<p class="description">
<?php
if ($element['type'] == 'groupstart') {
esc_html_e('Enables you to create rules to show or hide this group depending on the values of other fields', 'iphorm');
} else {
esc_html_e('Enables you to create rules to show or hide this field depending on the values of other fields', 'iphorm');
}
?>
</p>
</td>
</tr>
<?php
if (!isset($element['logic_action'])) $element['logic_action'] = 'show';
if (!isset($element['logic_match'])) $element['logic_match'] = 'all';
if (!isset($element['logic_rules'])) $element['logic_rules'] = array();
?>
<tr valign="top" class="ifb-show-if-logic-on <?php if (!$element['logic']) echo 'ifb-hidden'; ?>">
<th scope="row">
<label><?php esc_html_e('Logic rules', 'iphorm'); ?></label>
</th>
<td>
<div id="ifb_logic_rules_<?php echo $id; ?>"></div>
</td>
</tr>
Create toggleLogic() javascript function and put your popup box code and check your logic to display content.
Like this.
function toggleLogic(someid)
{
// your logic code
...
}
I recently installed the mouse / cursor trials plugin for wordpress.
The plugin is working, however the mouse trail image dissapears behind the content of the site and only shows on the background
Would anyone perhaps be able to guide me in the right direction to repair it please?
Thank you
Link to the plugin: Wordpress Cursor Trails
function add_cursor_trail(){
$ct_data = get_option('cursor_trail_options');
if( date('Y-m-d', current_time('timestamp')) == '2011-02-14'){
$ct_data['pointer'] = WP_PLUGIN_URL.'/cursor-trail/valentines.png';
}
if( !empty($ct_data['start']) && current_time('timestamp') <= strtotime($ct_data['start']) ){
return;
}
if( !empty($ct_data['end']) && current_time('timestamp') >= strtotime($ct_data['end']) ){
return;
}
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
var container = $(document.body);
var speed = <?php echo $ct_data['speed']; ?>;
container.mousemove( function(e){
if( $(this).parents('a').length == 0 ){
$('<img src="<?php echo $ct_data['pointer']; ?>" />').css({ 'position':'absolute', 'top':e.pageY+5, 'left':e.pageX+5}).prependTo(container).fadeOut(speed, function(){
$(this).remove();
});
}
});
});
</script>
<?php
}
add_action('wp_head','add_cursor_trail',999);
/* Creating the wp_events table to store event data*/
function cursor_trail_activate() {
$ct_data = array(
'pointer' => WP_PLUGIN_URL.'/cursor-trail/pointer.png',
'speed' => 900
);
add_option('cursor_trail_options', $ct_data);
}
register_activation_hook( __FILE__,'cursor_trail_activate');
class CursorTrailAdmin{
// action function for above hook
function CursorTrailAdmin() {
global $user_level;
add_action ( 'admin_menu', array (&$this, 'menus') );
}
function menus(){
$page = add_options_page('Cursor Trail', 'Cursor Trail', 'manage_options', 'cursor-trail', array(&$this,'options'));
add_action('admin_head-'.$page, array(&$this,'options_head'));
}
function options_head(){
?>
<style type="text/css">
.nwl-plugin table { width:100%; }
.nwl-plugin table .col { width:100px; }
.nwl-plugin table input.wide { width:100%; padding:2px; }
</style>
<?php
}
function options() {
add_option('cursor_trail_options');
if( is_admin() && !empty($_POST['ctsubmitted']) ){
//Build the array of options here
foreach ($_POST as $postKey => $postValue){
if( substr($postKey, 0, 3) == 'ct_' ){
//For now, no validation, since this is in admin area.
if($postValue != ''){
$ct_data[substr($postKey, 3)] = $postValue;
}
}
}
update_option('cursor_trail_options', $ct_data);
?>
<div class="updated"><p><strong><?php _e('Changes saved.'); ?></strong></p></div>
<?php
}else{
$ct_data = get_option('cursor_trail_options');
}
?>
<div class="wrap nwl-plugin">
<h2>Cursor Trail</h2>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<div id="side-info-column" class="inner-sidebar">
<div id="categorydiv" class="postbox ">
<div class="handlediv" title="Click to toggle"></div>
<h3 class="hndle">Donations</h3>
<div class="inside">
<em>Plugins don't grow on trees.</em> Please remember that this plugin is provided to you free of charge, yet it takes many hours of work to maintain and improve!
<div style="text-align:center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8H9R5FVER3SWW">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</div>
</div>
<div id="categorydiv" class="postbox ">
<div class="handlediv" title="Click to toggle"></div>
<h3 class="hndle">Plugin Information</h3>
<div class="inside">
<p>This plugin was developed by Marcus Sykes # NetWebLogic</p>
<p>Please visit our forum for plugin support.</p>
</div>
</div>
</div>
<div id="post-body">
<div id="post-body-content">
<p>If you have any suggestions, come over to our plugin page and leave a comment. It may just happen!</p>
<form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
<table class="form-table">
<tbody id="lwa-body">
<tr valign="top">
<td colspan="2">
<h3><?php _e("General Settings", 'cursor-trail'); ?></h3>
</td>
</tr>
<tr valign="top">
<td scope="row">
<label><?php _e("Cursor Image", 'cursor-trail'); ?></label>
</td>
<td>
<input type="text" name="ct_pointer" value='<?php echo (!empty($ct_data['pointer'])) ? $ct_data['pointer']:WP_PLUGIN_URL.'/cursor-trail/pointer.png'; ?>' class='wide' />
<i><?php _e("Add the url for the image you want to use as a cursor trail. Defaults to a mouse pointer if left blank.", 'cursor-trail'); ?></i>
</td>
</tr>
<tr valign="top">
<td scope="row">
<label><?php _e("Cursor Fade Speed", 'cursor-trail'); ?></label>
</td>
<td>
<input type="text" name="ct_speed" value='<?php echo (!empty($ct_data['speed'])) ? $ct_data['speed']:900; ?>' class='wide' />
<i><?php _e("Speed in ms that each cursor trail will take to fade out.", 'cursor-trail'); ?></i>
</td>
</tr>
<tr valign="top">
<td scope="row">
<label><?php _e("Start Date", 'cursor-trail'); ?></label>
</td>
<td>
<input type="text" name="ct_start" value='<?php echo (!empty($ct_data['start'])) ? $ct_data['start']:''; ?>' class='wide' />
<i><?php _e("If filled, cursors won't start to trail until this date. Use YYYY-MM-DD format.", 'cursor-trail'); ?></i>
</td>
</tr>
<tr valign="top">
<td scope="row">
<label><?php _e("Cut-Off Date", 'cursor-trail'); ?></label>
</td>
<td>
<input type="text" name="ct_end" value='<?php echo (!empty($ct_data['end'])) ? $ct_data['end']:''; ?>' class='wide' />
<i><?php _e("If filled, cursors won't trail after this date. Use YYYY-MM-DD format.", 'cursor-trail'); ?></i>
</td>
</tr>
</tbody>
<tfoot>
<tr valign="top">
<td colspan="2">
<input type="hidden" name="ctsubmitted" value="1" />
<p class="submit">
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
</p>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
</div>
</div>
<?php
}
}
global $CursorTrailAdmin;
$CursorTrailAdmin = new CursorTrailAdmin();
As the plugin seems to add absolute positioned images with no class or id attribute (at least in the demo), try adding
img[src$="/pointer.png"] {
z-index: 1000;
}
to your style.css.
might not be the most beautiful solution, but should do the trick.