I’ve managed to add this feature myself. Anyone looking to also add it (or if the developers want to considering adding to the next version), here is a rough guide of how to edit fpp_index.php:
- Look for the function
fpp_render_options_page() which renders the plugin’s settings. Inside that function, just before the submit button code, add the following:
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Open Graph meta data', FPP_TEXT_DOMAIN) ?></th>
<td>
<label><input id="fpp_options-add_meta_data" type="checkbox" name="fpp_options[add_meta_data]" value="1" <?php checked('1', $options['add_meta_data']); ?> /> <?php _e('Add meta tags to header?', FPP_TEXT_DOMAIN) ?></label>
</td>
</tr>
</table>
- Now locate the
fpp_render_meta_tags() function, and enclose its contents in an if statement which tests for the add_meta_data option:
$options = get_option('fpp_options');
if ($options['add_meta_data']) :
echo '<meta property="og:type" content="article"/>'; // Required by FB
.
.
.
echo '<meta property="og:image" content="'.esc_attr($image_url)/*, ENT_COMPAT, 'UTF-8')*/.'"/>';
endif;
- Locate
fpp_validate_options() and add the following to the “Customization options” section:
$options['add_meta_data'] = array_key_exists('add_meta_data', $input) && !empty($input['add_meta_data']);
- Locate
fpp_initialize_options() and add 'add_meta_data' => false to the $options array.
I hope that’s clear enough!