shortcode-vc-pie.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Pie Chart', 'js_composer' ),
  7. 'base' => 'vc_pie',
  8. 'class' => '',
  9. 'icon' => 'icon-wpb-vc_pie',
  10. 'category' => esc_html__( 'Content', 'js_composer' ),
  11. 'description' => esc_html__( 'Animated pie chart', 'js_composer' ),
  12. 'params' => array(
  13. array(
  14. 'type' => 'textfield',
  15. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  16. 'param_name' => 'title',
  17. 'description' => esc_html__( 'Enter text used as widget title (Note: located above content element).', 'js_composer' ),
  18. 'admin_label' => true,
  19. ),
  20. array(
  21. 'type' => 'textfield',
  22. 'heading' => esc_html__( 'Value', 'js_composer' ),
  23. 'param_name' => 'value',
  24. 'description' => esc_html__( 'Enter value for graph (Note: choose range from 0 to 100).', 'js_composer' ),
  25. 'value' => '50',
  26. 'admin_label' => true,
  27. ),
  28. array(
  29. 'type' => 'textfield',
  30. 'heading' => esc_html__( 'Label value', 'js_composer' ),
  31. 'param_name' => 'label_value',
  32. 'description' => esc_html__( 'Enter label for pie chart (Note: leaving empty will set value from "Value" field).', 'js_composer' ),
  33. 'value' => '',
  34. ),
  35. array(
  36. 'type' => 'textfield',
  37. 'heading' => esc_html__( 'Units', 'js_composer' ),
  38. 'param_name' => 'units',
  39. 'description' => esc_html__( 'Enter measurement units (Example: %, px, points, etc. Note: graph value and units will be appended to graph title).', 'js_composer' ),
  40. ),
  41. array(
  42. 'type' => 'dropdown',
  43. 'heading' => esc_html__( 'Color', 'js_composer' ),
  44. 'param_name' => 'color',
  45. 'value' => vc_get_shared( 'colors-dashed' ) + array( esc_html__( 'Custom', 'js_composer' ) => 'custom' ),
  46. 'description' => esc_html__( 'Select pie chart color.', 'js_composer' ),
  47. 'admin_label' => true,
  48. 'param_holder_class' => 'vc_colored-dropdown',
  49. 'std' => 'grey',
  50. ),
  51. array(
  52. 'type' => 'colorpicker',
  53. 'heading' => esc_html__( 'Custom color', 'js_composer' ),
  54. 'param_name' => 'custom_color',
  55. 'description' => esc_html__( 'Select custom color.', 'js_composer' ),
  56. 'dependency' => array(
  57. 'element' => 'color',
  58. 'value' => array( 'custom' ),
  59. ),
  60. ),
  61. vc_map_add_css_animation(),
  62. array(
  63. 'type' => 'el_id',
  64. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  65. 'param_name' => 'el_id',
  66. '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>' ),
  67. ),
  68. array(
  69. 'type' => 'textfield',
  70. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  71. 'param_name' => 'el_class',
  72. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  73. ),
  74. array(
  75. 'type' => 'css_editor',
  76. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  77. 'param_name' => 'css',
  78. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  79. ),
  80. ),
  81. );