__( 'URL', WPRSS_TEXT_DOMAIN ), 'id' => $prefix .'url', 'type' => 'url', 'after' => 'wprss_validate_feed_link', 'placeholder' => 'http://' ); $wprss_meta_fields[ 'limit' ] = array( 'label' => __( 'Limit', WPRSS_TEXT_DOMAIN ), 'id' => $prefix . 'limit', 'type' => 'number' ); $wprss_meta_fields[ 'enclosure' ] = array( 'label' => __( 'Link to enclosure', WPRSS_TEXT_DOMAIN ), 'id' => $prefix . 'enclosure', 'type' => 'checkbox' ); $wprss_meta_fields[ 'unique_titles' ] = array( 'label' => __( 'Unique titles only', WPRSS_TEXT_DOMAIN ), 'id' => $prefix . 'unique_titles', 'type' => 'checkbox' ); $wprss_meta_fields[ 'source_link' ] = array( 'label' => __( 'Link Source', WPRSS_TEXT_DOMAIN ), 'id' => $prefix . 'source_link', 'type' => 'boolean_fallback' ); // for extensibility, allows more meta fields to be added return apply_filters( 'wprss_fields', $wprss_meta_fields ); } /** * Set up the meta box for the wprss_feed post type * * @since 2.0 */ function wprss_show_meta_box_callback() { global $post; $meta_fields = wprss_get_custom_fields(); $field_tooltip_id_prefix = 'field_'; $help = WPRSS_Help::get_instance(); // Use nonce for verification wp_nonce_field( basename( __FILE__ ), 'wprss_meta_box_nonce' ); // Fix for WordpRess SEO JS issue ?>
'',
'placeholder' => '',
'type' => 'text'
) );
$tooltip = isset( $field['tooltip'] ) ? trim( $field['tooltip'] ) : null;
$tooltip_id = isset( $field['id'] ) ? $field_tooltip_id_prefix . $field['id'] : uniqid( $field_tooltip_id_prefix );
$field_description = __( $field['desc'], WPRSS_TEXT_DOMAIN );
/*
* So, here's how tooltips work here.
* Tooltip output will be attempted in any case.
* If 'tooltip' index is not defined, or is null, then
* a registered tooltip will be attempted. If that is
* not found, default value will be output. This value
* is by default an empty string, but can be altered
* by the `tooltip_not_found_handle_html` option of `WPRSS_Help`.
*/
switch( $field['type'] ) {
// text/url
case 'url':
case 'text':
?>tooltip( $tooltip_id, $tooltip );
if ( strlen( trim( $field['desc'] ) ) > 0 ) {
?> tooltip( $tooltip_id, $tooltip ); if ( strlen( trim( $field['desc'] ) ) > 0 ) { ?> />tooltip( $tooltip_id, $tooltip ); if ( strlen( trim( $field['desc'] ) ) > 0 ) { ?>tooltip( $tooltip_id, $tooltip ); if ( strlen( trim( $field['desc'] ) ) > 0 ) { ?>tooltip( $tooltip_id, $tooltip ); break; // number case 'number': ?>tooltip( $tooltip_id, $tooltip ); if ( strlen( trim( $field['desc'] ) ) > 0 ) { ?> |
' . __( 'No feed URL defined yet', WPRSS_TEXT_DOMAIN ) . '
'; } echo '/> tooltip( 'field_wprss_force_feed' ) ?>
ID, 'wprss_state', TRUE ); $activate = get_post_meta( $post->ID, 'wprss_activate_feed', TRUE ); $pause = get_post_meta( $post->ID, 'wprss_pause_feed', TRUE ); $update_interval = get_post_meta( $post->ID, 'wprss_update_interval', TRUE ); $age_limit = get_post_meta( $post->ID, 'wprss_age_limit', FALSE ); $age_unit = get_post_meta( $post->ID, 'wprss_age_unit', FALSE ); $age_limit = ( count( $age_limit ) === 0 )? wprss_get_general_setting( 'limit_feed_items_age' ) : $age_limit[0]; $age_unit = ( count( $age_unit ) === 0 )? wprss_get_general_setting( 'limit_feed_items_age_unit' ) : $age_unit[0]; // Set default strings for activate and pause times $default_activate = 'immediately'; $default_pause = 'never'; // Prepare the states $states = array( 'active' => __( 'Active', WPRSS_TEXT_DOMAIN ), 'paused' => __( 'Paused', WPRSS_TEXT_DOMAIN ), ); // Prepare the schedules $default_interval = __( 'Default', WPRSS_TEXT_DOMAIN ); $wprss_schedules = apply_filters( 'wprss_schedules', wprss_get_schedules() ); $default_interval_key = wprss_get_default_feed_source_update_interval(); $schedules = array_merge( array( $default_interval_key => array( 'display' => $default_interval, 'interval' => $default_interval, ), ), $wprss_schedules ); // Inline help $help = WPRSS_Help::get_instance(); $help_options = array('tooltip_handle_class_extra' => $help->get_options('tooltip_handle_class_extra') . ' ' . $help->get_options('tooltip_handle_class') . '-side'); ?> View the documentation'; echo ''; _e( 'Need help?', WPRSS_TEXT_DOMAIN ); echo ' '; _e( 'Check out the support forum', WPRSS_TEXT_DOMAIN ); echo '
'; echo ' '; _e( 'Suggest a new feature', WPRSS_TEXT_DOMAIN ); echo ''; } /** * Generate Like this plugin meta box * * @since 2.0 * */ function wprss_like_meta_box_callback() { ?>id ) return; // Remove meta boxes of other plugins that tend to appear on all posts //remove_meta_box( 'wpseo_meta', 'wprss_feed' ,'normal' ); remove_meta_box( 'postpsp', 'wprss_feed' ,'normal' ); remove_meta_box( 'su_postmeta', 'wprss_feed' ,'normal' ); remove_meta_box( 'woothemes-settings', 'wprss_feed' ,'normal' ); remove_meta_box( 'wpcf-post-relationship', 'wprss_feed' ,'normal' ); remove_meta_box( 'wpar_plugin_meta_box ', 'wprss_feed' ,'normal' ); remove_meta_box( 'sharing_meta', 'wprss_feed' ,'advanced' ); remove_meta_box( 'content-permissions-meta-box', 'wprss_feed' ,'advanced' ); remove_meta_box( 'theme-layouts-post-meta-box', 'wprss_feed' ,'side' ); remove_meta_box( 'post-stylesheets', 'wprss_feed' ,'side' ); remove_meta_box( 'hybrid-core-post-template', 'wprss_feed' ,'side' ); remove_meta_box( 'wpcf-marketing', 'wprss_feed' ,'side' ); remove_meta_box( 'trackbacksdiv22', 'wprss_feed' ,'advanced' ); remove_meta_box( 'aiosp', 'wprss_feed' ,'advanced' ); remove_action( 'post_submitbox_start', 'fpp_post_submitbox_start_action' ); }