Permission error on plugin save

Its stored in a single file called quote.php Assuming that means that your plugin is stored in wp-content/plugins/quote.php, then the problem is that your code is hard-coded to submit to wse140202.php— presumably you cribbed some code from another question here. In other words, this line: add_menu_page(‘Quotes Settings’, ‘Quotes Styling’, ‘manage_options’, __FILE__, ‘dw_styling_quotes_settings’); Registers a page … Read more

Gravity Forms After Submission – GFFormsModel::update_lead_field_value?

Going to close this and answer myself. Apparently, there is something wrong with the way that GFFormsModel::update_lead_field_value truncates fields. I was unable to get this to work. Instead – I opted to use a direct WP insert (with if elseif etc…) – like so : $csql = $wpdb->insert(“wp_rg_lead_detail”, array(“id” => NULL,”lead_id” => $lead,”form_id” => $form,”field_number” … Read more

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

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