pykler
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Sharebar] Throwing Javascript ErrorsActually my patch does not work as well as @lifeinthegrid patch … here is his patch in patchable format
Index: js/sharebar.js =================================================================== --- js/sharebar.js (revision 707593) +++ js/sharebar.js (working copy) @@ -15,6 +15,8 @@ var start = sharebar_init(); function sharebar_init(){ + var $sharebar = jQuery(sharebar); + if ($sharebar.length <= 0) { return 0; } jQuery(sharebar).css('width',o.swidth+'px'); if (o.position == 'left') jQuery(sharebar).css('marginLeft',(0-o.swidth-o.leftOffset)); else {
Forum: Plugins
In reply to: [Sharebar] Throwing Javascript ErrorsHere is my patch, found this issue after I coded it up and was looking for a way to send it to the developer. Hope s/he starts checking these issues.
Index: sharebar.php =================================================================== --- sharebar.php (revision 707593) +++ sharebar.php (working copy) @@ -155,7 +155,7 @@ echo '<link rel="stylesheet" href="'.get_bloginfo('wpurl').'/wp-content/plugins/sharebar/css/sharebar.css" type="text/css" media="screen" />'; if($horizontal) $hori = 'true'; else $hori = 'false'; if(!$width) $width = 1000; - echo "\n"; ?><script type="text/javascript">jQuery(document).ready(function($) { $('.sharebar').sharebar({horizontal:'<?php echo $hori; ?>',swidth:'<?php echo $swidth; ?>',minwidth:<?php echo $width; ?>,position:'<?php echo $position; ?>',leftOffset:<?php echo $leftoffset; ?>,rightOffset:<?php echo $rightoffset; ?>}); });</script><?php echo "\n"; ?><!-- Sharebar Plugin by Monjurul Dolon (https://mdolon.com/) - more info at: https://devgrow.com/sharebar-wordpress-plugin --><?php echo "\n"; ?><?php + echo "\n"; ?><script type="text/javascript">jQuery(document).ready(function($) { if(!$('.sharebar').length){ return; } $('.sharebar').sharebar({horizontal:'<?php echo $hori; ?>',swidth:'<?php echo $swidth; ?>',minwidth:<?php echo $width; ?>,position:'<?php echo $position; ?>',leftOffset:<?php echo $leftoffset; ?>,rightOffset:<?php echo $rightoffset; ?>}); });</script><?php echo "\n"; ?><!-- Sharebar Plugin by Monjurul Dolon (https://mdolon.com/) - more info at: https://devgrow.com/sharebar-wordpress-plugin --><?php echo "\n"; ?><?php } }
Forum: Hacks
In reply to: bypass sanitize_post from wp_insert_post!Thanks Ryan, that did the trick. The security concern is valid based on the input data my script uses; However the WordPress instance that I use this script for is purely there for cmd line purposes so it wouldn’t affect any HTTP requests to the live site in any way (if that was somehow possible otherwise, maybe if this was used in a plugin it would be possible to break the site).
Viewing 3 replies - 1 through 3 (of 3 total)