shortcode-vc-video.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Video Player', 'js_composer' ),
  7. 'base' => 'vc_video',
  8. 'icon' => 'icon-wpb-film-youtube',
  9. 'category' => esc_html__( 'Content', 'js_composer' ),
  10. 'description' => esc_html__( 'Embed YouTube/Vimeo player', 'js_composer' ),
  11. 'params' => array(
  12. array(
  13. 'type' => 'textfield',
  14. 'heading' => esc_html__( 'Widget title', 'js_composer' ),
  15. 'param_name' => 'title',
  16. 'description' => esc_html__( 'Enter text used as widget title (Note: located above content element).', 'js_composer' ),
  17. ),
  18. array(
  19. 'type' => 'textfield',
  20. 'heading' => esc_html__( 'Video link', 'js_composer' ),
  21. 'param_name' => 'link',
  22. 'value' => 'https://vimeo.com/51589652',
  23. 'admin_label' => true,
  24. 'description' => sprintf( esc_html__( 'Enter link to video (Note: read more about available formats at WordPress %scodex page%s).', 'js_composer' ), '<a href="https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">', '</a>' ),
  25. ),
  26. array(
  27. 'type' => 'dropdown',
  28. 'heading' => esc_html__( 'Video width', 'js_composer' ),
  29. 'param_name' => 'el_width',
  30. 'value' => array(
  31. '100%' => '100',
  32. '90%' => '90',
  33. '80%' => '80',
  34. '70%' => '70',
  35. '60%' => '60',
  36. '50%' => '50',
  37. '40%' => '40',
  38. '30%' => '30',
  39. '20%' => '20',
  40. '10%' => '10',
  41. ),
  42. 'description' => esc_html__( 'Select video width (percentage).', 'js_composer' ),
  43. ),
  44. array(
  45. 'type' => 'dropdown',
  46. 'heading' => esc_html__( 'Video aspect ration', 'js_composer' ),
  47. 'param_name' => 'el_aspect',
  48. 'value' => array(
  49. '16:9' => '169',
  50. '4:3' => '43',
  51. '2.35:1' => '235',
  52. ),
  53. 'description' => esc_html__( 'Select video aspect ratio.', 'js_composer' ),
  54. ),
  55. array(
  56. 'type' => 'dropdown',
  57. 'heading' => esc_html__( 'Alignment', 'js_composer' ),
  58. 'param_name' => 'align',
  59. 'description' => esc_html__( 'Select video alignment.', 'js_composer' ),
  60. 'value' => array(
  61. esc_html__( 'Left', 'js_composer' ) => 'left',
  62. esc_html__( 'Right', 'js_composer' ) => 'right',
  63. esc_html__( 'Center', 'js_composer' ) => 'center',
  64. ),
  65. ),
  66. vc_map_add_css_animation(),
  67. array(
  68. 'type' => 'el_id',
  69. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  70. 'param_name' => 'el_id',
  71. '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>' ),
  72. ),
  73. array(
  74. 'type' => 'textfield',
  75. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  76. 'param_name' => 'el_class',
  77. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  78. ),
  79. array(
  80. 'type' => 'css_editor',
  81. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  82. 'param_name' => 'css',
  83. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  84. ),
  85. ),
  86. );