/** * Add meta boxes for a custom Status that is used when posting to an Author's Timeline * * @since 1.0.2 */ function fb_add_social_plugin_settings_box_content($post) { $options = get_option('fb_options'); $features = array('like', 'subscribe', 'send', 'comments', 'recommendations_bar'); echo '<table><p>Change the settings below to show or hide particular Social Plugins. </p>'; foreach ($features as $feature) { if (isset($options[$feature]['enabled'])) { $value = get_post_meta($post->ID, "fb_social_plugin_settings_box_{$feature}", true); echo '<tr><td>' . fb_option_name($feature) . "</td> <td><label><input type = \"radio\" name=\"fb_social_plugin_settings_box_{$feature}\" value=\"default\" " . ($value == 'default' || empty($value) ? 'checked="checked" ' : '') . "/>Default (" . $options[$feature]['show_on'] . ")</label></td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_{$feature}\" value =\"show\" " . ($value == 'show' ? 'checked="checked" ' : '') . "/>Show</label></td> <td><label><input type=\"radio\" name=\"fb_social_plugin_settings_box_{$feature}\" value =\"hide\" " . ($value == 'hide' ? 'checked="checked" ' : '') . "/>Hide</label></td> </tr>"; } } echo '</table><p class="howto"> If \'Default\' is selected, the Social Plugin will appear based on the global setting, set on the Facebook Settings page. If you choose "Show" or "Hide", the Social Plugin will ignore the global setting for this ' . ($post->post_type == 'page' ? 'page' : 'post') . '.</p>'; }
/** * Add meta boxes for a custom Status that is used when posting to an Author's Timeline * * @since 1.0.2 */ function fb_add_social_plugin_settings_box_content($post) { $options = get_option('fb_options'); $features = array('like', 'subscribe', 'send', 'comments', 'recommendations_bar'); echo '<table><p>' . esc_html(__('Change the settings below to show or hide particular Social Plugins.', 'facebook')) . '</p>'; foreach ($features as $feature) { if (isset($options[$feature]['enabled'])) { $value = get_post_meta($post->ID, "fb_social_plugin_settings_box_{$feature}", true); echo '<tr><td>' . fb_option_name($feature) . '</td><td><label><input type="radio" name="fb_social_plugin_settings_box_' . $feature . '" value="default" ' . ($value == 'default' || empty($value) ? 'checked="checked" ' : '') . ' />' . esc_html(__('Default', 'facebook')) . ' (' . esc_html(isset($options[$feature]['show_on']) && isset($options[$feature]['show_on'][$post->post_type]) ? _x('Show', 'action: show what was hidden', 'facebook') : _x('Hide', 'verb: hide from view', 'facebook')) . ')</label></td> <td><label><input type="radio" name="fb_social_plugin_settings_box_' . $feature . '" value="show" ' . ($value == 'show' ? 'checked="checked" ' : '') . ' />' . esc_html(_x('Show', 'action: show what was hidden', 'facebook')) . '</label></td><td><label><input type="radio" name="fb_social_plugin_settings_box_' . $feature . '" value="hide" ' . ($value == 'hide' ? 'checked="checked" ' : '') . ' />' . esc_html(_x('Hide', 'verb: hide from view', 'facebook')) . '</label></td></tr>'; } } echo '</table><p class="howto">' . esc_html(sprintf(__('If \'%s\' is selected, the Social Plugin will appear based on the global setting set on the Facebook Settings page.', 'facebook'), 'Default')) . ' ' . esc_html(sprintf(__('If you choose "%1$s" or "%2$s", the Social Plugin will ignore the global setting for this %3$s.', 'facebook'), _x('Show', 'action: show what was hidden', 'facebook'), _x('Hide', 'verb: hide from view', 'facebook'), $post->post_type)) . '</p>'; }