shortcode-vc-wp-rss.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => 'WP ' . esc_html__( 'RSS' ),
  7. 'base' => 'vc_wp_rss',
  8. 'icon' => 'icon-wpb-wp',
  9. 'category' => esc_html__( 'WordPress Widgets', 'js_composer' ),
  10. 'class' => 'wpb_vc_wp_widget',
  11. 'weight' => - 50,
  12. 'description' => esc_html__( 'Entries from any RSS or Atom feed', 'js_composer' ),
  13. 'params' => array(
  14. array(
  15. 'type' => 'textfield',
  16. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  17. 'param_name' => 'title',
  18. 'description' => esc_html__( 'What text use as a widget title. Leave blank to use default widget title.', 'js_composer' ),
  19. ),
  20. array(
  21. 'type' => 'textfield',
  22. 'heading' => esc_html__( 'RSS feed URL', 'js_composer' ),
  23. 'param_name' => 'url',
  24. 'description' => esc_html__( 'Enter the RSS feed URL.', 'js_composer' ),
  25. 'admin_label' => true,
  26. ),
  27. array(
  28. 'type' => 'dropdown',
  29. 'heading' => esc_html__( 'Items', 'js_composer' ),
  30. 'param_name' => 'items',
  31. 'value' => array(
  32. esc_html__( '10 - Default', 'js_composer' ) => 10,
  33. 1,
  34. 2,
  35. 3,
  36. 4,
  37. 5,
  38. 6,
  39. 7,
  40. 8,
  41. 9,
  42. 10,
  43. 11,
  44. 12,
  45. 13,
  46. 14,
  47. 15,
  48. 16,
  49. 17,
  50. 18,
  51. 19,
  52. 20,
  53. ),
  54. 'description' => esc_html__( 'Select how many items to display.', 'js_composer' ),
  55. 'admin_label' => true,
  56. ),
  57. array(
  58. 'type' => 'checkbox',
  59. 'heading' => esc_html__( 'Options', 'js_composer' ),
  60. 'param_name' => 'options',
  61. 'value' => array(
  62. esc_html__( 'Item content', 'js_composer' ) => 'show_summary',
  63. esc_html__( 'Display item author if available?', 'js_composer' ) => 'show_author',
  64. esc_html__( 'Display item date?', 'js_composer' ) => 'show_date',
  65. ),
  66. 'description' => esc_html__( 'Select display options for RSS feeds.', 'js_composer' ),
  67. ),
  68. array(
  69. 'type' => 'el_id',
  70. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  71. 'param_name' => 'el_id',
  72. 'description' => sprintf( esc_html__( 'Enter element ID (Note: make sure it is unique and valid according to %sw3c specification%s).', 'js_composer' ), '<a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">', '</a>' ),
  73. ),
  74. array(
  75. 'type' => 'textfield',
  76. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  77. 'param_name' => 'el_class',
  78. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  79. ),
  80. ),
  81. );