Custom meta box save values issues – Deprecated: Function ereg() and more

Try the following. Replace ereg(‘/\edit\.php’, $_SERVER[‘REQUEST_URI’]) with preg_match(‘/edit.php/’, $_SERVER[‘REQUEST_URI’]) And also change if(isset($_POST[$meta_box[‘name’].’_value’])){ $data = $_POST[$meta_box[‘name’].’_value’]; } to if(isset($_POST[$meta_box[‘name’].’_value’])){ $data = $_POST[$meta_box[‘name’].’_value’]; } else $data = “”;

Notice: Undefined index: fix with isset [closed]

You have some problems with the way you are doing it. The following line reads your settings in… $settings = get_option( ‘eddreldlc_options’, $eddreldlc_options ); So settings looks like: array( ‘loop_true’ => array( ‘value’ => ‘true’, ‘label’ => ‘True’ ), ‘loop_false’ => array( ‘value’ => ‘false’, ‘label’ => ‘False’ ) ); Your loop looks like the … Read more

WordPress HTML Helper

The short answer is that there isn’t one. WordPress templating consists mostly of raw PHP and Template Tags API. The API is more focused on outputting specific content, than producing specific HTML. As result the technique is pretty much unknown in WordPress development. It doesn’t mean that you can’t use one, but it’s just not … Read more

WP_Widget dynamic field array with external AJAX

I’m not sure I fully understand what you’re trying to achieve, but I’d suggested to attempt to construct the field’s ID and name from data you’ve got available from the source code of the generated widget. If you check out the code, you’ll find that by every widget, there’s a hidden form field called id_base … Read more

Styling admin page rows in order of importance (checkboxes)

The problem you are seeing is that you have your declarations of the same importance from a CSS standpoint. If you add another style to give it more preference: #cqrm-current-item-list tr.cue-deletion.cue-coming-soon, #cqrm-current-item-list tr.cue-deletion.tr.cue-coming-soon *{ background-color: #fbb !important; filter: alpha(opacity=100) !important; } Or move the cue-deletion below the cue-comingsoon declaration you should find things work as … Read more

MySQL queries in WordPress

I found the errors thanks to the help from @Milo @Milo’s query on catno pointed me to my error with my first query involving catno, and I also noticed a double equals in $catno == $row[0]; when it should be $catno = $row[0]; Final coding is function QueryStock($cat) { $query = “SELECT * FROM stock … Read more