shortcode-vc-wp-pages.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => 'WP ' . esc_html__( 'Pages' ),
  7. 'base' => 'vc_wp_pages',
  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__( 'Your sites WordPress Pages', '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. 'value' => esc_html__( 'Pages' ),
  20. ),
  21. array(
  22. 'type' => 'dropdown',
  23. 'heading' => esc_html__( 'Order by', 'js_composer' ),
  24. 'param_name' => 'sortby',
  25. 'value' => array(
  26. esc_html__( 'Page title', 'js_composer' ) => 'post_title',
  27. esc_html__( 'Page order', 'js_composer' ) => 'menu_order',
  28. esc_html__( 'Page ID', 'js_composer' ) => 'ID',
  29. ),
  30. 'description' => esc_html__( 'Select how to sort pages.', 'js_composer' ),
  31. 'admin_label' => true,
  32. ),
  33. array(
  34. 'type' => 'textfield',
  35. 'heading' => esc_html__( 'Exclude', 'js_composer' ),
  36. 'param_name' => 'exclude',
  37. 'description' => esc_html__( 'Enter page IDs to be excluded (Note: separate values by commas (,)).', 'js_composer' ),
  38. 'admin_label' => true,
  39. ),
  40. array(
  41. 'type' => 'el_id',
  42. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  43. 'param_name' => 'el_id',
  44. '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>' ),
  45. ),
  46. array(
  47. 'type' => 'textfield',
  48. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  49. 'param_name' => 'el_class',
  50. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  51. ),
  52. ),
  53. );