Help with my first Metabox helper class

The problem seems on the line no 279 of metabox class api definition, below is your code: ‘<img src=”‘.$label.'” class=”optionimg ‘.$selected_value.'” onclick=”document.getElementById(\ ”.$field[‘id’].$choices.’\’).checked=true” style=”display:inline-block;” /><input type=”radio” name=”%s” id=”%s” value=”%s” style=”display:none;”/>’, $choices is not defined variable in the scope (error thrown by WAMP), I think you should replace $field[‘id’].$choices with $value as in below code: ‘<img … Read more

Get foreach for meta_query value

Don’t implode $artistNames. The value meta_query argument will take an array if you use any of several compare arguments. You need IN, I believe. value (string|array) – Custom field value. It can be an array only when compare is ‘IN’, ‘NOT IN’, ‘BETWEEN’, or ‘NOT BETWEEN’…. http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters Assuming that $artistNames is an array of ids … Read more

WordPress function to add text

As your hook only passes the $post_content and $attachment_id, you’ll first need to get the relevant post, and then you can output your required data. Please try this and comment if it does not meet your requirements. function myprefix_change_afip_post_content( $post_content, $attachment_id ) { global $post $post = get_post( $attachment_id ); setup_postdata( $post ); $my_uploaded_image = … Read more

wp_customize_image_control default value

I had the same problem a few minutes ago. Here is what I used in the src tag: <?php if (get_theme_mod( ‘custom_logo_image’ )) : echo get_theme_mod( ‘custom_logo_image’); else: echo get_template_directory_uri().’/inc/images/default_logo.png’; endif; ?> It seemed to solve my problem. Let me know if it works for you.

magic-quotes – breaks admin totally

You can check for details on open_basedir in PHP documentation. Your issues very well might be caused by it. Despite that scripts and styles are typically not affected by PHP settings, in case of WP admin by default they are loaded through PHP script for concatenation. It is hard to guess what and how exactly … Read more