shortcode-vc-tweetmeme.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. return array(
  6. 'name' => esc_html__( 'Tweetmeme Button', 'js_composer' ),
  7. 'base' => 'vc_tweetmeme',
  8. 'icon' => 'icon-wpb-tweetme',
  9. 'category' => esc_html__( 'Social', 'js_composer' ),
  10. 'description' => esc_html__( 'Tweet button', 'js_composer' ),
  11. 'params' => array(
  12. array(
  13. 'type' => 'dropdown',
  14. 'param_name' => 'type',
  15. 'heading' => esc_html__( 'Choose a button', 'js_composer' ),
  16. 'value' => array(
  17. esc_html__( 'Share a link', 'js_composer' ) => 'share',
  18. esc_html__( 'Follow', 'js_composer' ) => 'follow',
  19. esc_html__( 'Hashtag', 'js_composer' ) => 'hashtag',
  20. esc_html__( 'Mention', 'js_composer' ) => 'mention',
  21. ),
  22. 'description' => esc_html__( 'Select type of Twitter button.', 'js_composer' ),
  23. ),
  24. // share type
  25. array(
  26. 'type' => 'checkbox',
  27. 'heading' => esc_html__( 'Share url: page URL', 'js_composer' ),
  28. 'param_name' => 'share_use_page_url',
  29. 'value' => array(
  30. esc_html__( 'Yes', 'js_composer' ) => 'page_url',
  31. ),
  32. 'std' => 'page_url',
  33. 'dependency' => array(
  34. 'element' => 'type',
  35. 'value' => 'share',
  36. ),
  37. 'description' => esc_html__( 'Use the current page url to share?', 'js_composer' ),
  38. ),
  39. array(
  40. 'type' => 'textfield',
  41. 'heading' => esc_html__( 'Share url: custom URL', 'js_composer' ),
  42. 'param_name' => 'share_use_custom_url',
  43. 'value' => '',
  44. 'dependency' => array(
  45. 'element' => 'share_use_page_url',
  46. 'value_not_equal_to' => 'page_url',
  47. ),
  48. 'description' => esc_html__( 'Enter custom page url which you like to share on twitter?', 'js_composer' ),
  49. ),
  50. array(
  51. 'type' => 'checkbox',
  52. 'heading' => esc_html__( 'Tweet text: page title', 'js_composer' ),
  53. 'param_name' => 'share_text_page_title',
  54. 'value' => array(
  55. esc_html__( 'Yes', 'js_composer' ) => 'page_title',
  56. ),
  57. 'std' => 'page_title',
  58. 'dependency' => array(
  59. 'element' => 'type',
  60. 'value' => 'share',
  61. ),
  62. 'description' => esc_html__( 'Use the current page title as tweet text?', 'js_composer' ),
  63. ),
  64. array(
  65. 'type' => 'textfield',
  66. 'heading' => esc_html__( 'Tweet text: custom text', 'js_composer' ),
  67. 'param_name' => 'share_text_custom_text',
  68. 'value' => '',
  69. 'dependency' => array(
  70. 'element' => 'share_text_page_title',
  71. 'value_not_equal_to' => 'page_title',
  72. ),
  73. 'description' => esc_html__( 'Enter the text to be used as a tweet?', 'js_composer' ),
  74. ),
  75. array(
  76. 'type' => 'textfield',
  77. 'heading' => esc_html__( 'Via @', 'js_composer' ),
  78. 'param_name' => 'share_via',
  79. 'value' => '',
  80. 'dependency' => array(
  81. 'element' => 'type',
  82. 'value' => 'share',
  83. ),
  84. 'description' => esc_html__( 'Enter your Twitter username.', 'js_composer' ),
  85. ),
  86. array(
  87. 'type' => 'textfield',
  88. 'heading' => esc_html__( 'Recommend @', 'js_composer' ),
  89. 'param_name' => 'share_recommend',
  90. 'value' => '',
  91. 'dependency' => array(
  92. 'element' => 'type',
  93. 'value' => 'share',
  94. ),
  95. 'description' => esc_html__( 'Enter the Twitter username to be recommended.', 'js_composer' ),
  96. ),
  97. array(
  98. 'type' => 'textfield',
  99. 'heading' => esc_html__( 'Hashtag #', 'js_composer' ),
  100. 'param_name' => 'share_hashtag',
  101. 'value' => '',
  102. 'dependency' => array(
  103. 'element' => 'type',
  104. 'value' => 'share',
  105. ),
  106. 'description' => esc_html__( 'Add a comma-separated list of hashtags to a Tweet using the hashtags parameter.', 'js_composer' ),
  107. ),
  108. // follow type
  109. array(
  110. 'type' => 'textfield',
  111. 'heading' => esc_html__( 'User @', 'js_composer' ),
  112. 'param_name' => 'follow_user',
  113. 'value' => '',
  114. 'dependency' => array(
  115. 'element' => 'type',
  116. 'value' => 'follow',
  117. ),
  118. 'description' => esc_html__( 'Enter username to follow.', 'js_composer' ),
  119. ),
  120. array(
  121. 'type' => 'checkbox',
  122. 'heading' => esc_html__( 'Show username', 'js_composer' ),
  123. 'param_name' => 'follow_show_username',
  124. 'value' => array(
  125. esc_html__( 'Yes', 'js_composer' ) => 'yes',
  126. ),
  127. 'std' => 'yes',
  128. 'dependency' => array(
  129. 'element' => 'type',
  130. 'value' => 'follow',
  131. ),
  132. 'description' => esc_html__( 'Do you want to show username in button?', 'js_composer' ),
  133. ),
  134. array(
  135. 'type' => 'checkbox',
  136. 'heading' => esc_html__( 'Show followers count', 'js_composer' ),
  137. 'param_name' => 'show_followers_count',
  138. 'value' => '',
  139. 'dependency' => array(
  140. 'element' => 'type',
  141. 'value' => 'follow',
  142. ),
  143. 'description' => esc_html__( 'Do you want to displat the follower count in button?', 'js_composer' ),
  144. ),
  145. // hashtag type
  146. array(
  147. 'type' => 'textfield',
  148. 'heading' => esc_html__( 'Hashtag #', 'js_composer' ),
  149. 'param_name' => 'hashtag_hash',
  150. 'value' => '',
  151. 'dependency' => array(
  152. 'element' => 'type',
  153. 'value' => 'hashtag',
  154. ),
  155. 'description' => esc_html__( 'Add hashtag to a Tweet using the hashtags parameter', 'js_composer' ),
  156. ),
  157. array(
  158. 'type' => 'checkbox',
  159. 'heading' => esc_html__( 'Tweet text: No default text', 'js_composer' ),
  160. 'param_name' => 'hashtag_no_default',
  161. 'value' => array(
  162. esc_html__( 'Yes', 'js_composer' ) => 'yes',
  163. ),
  164. 'std' => 'yes',
  165. 'dependency' => array(
  166. 'element' => 'type',
  167. 'value' => 'hashtag',
  168. ),
  169. 'description' => esc_html__( 'Set no default text for tweet?', 'js_composer' ),
  170. ),
  171. array(
  172. 'type' => 'textfield',
  173. 'heading' => esc_html__( 'Tweet text: custom', 'js_composer' ),
  174. 'param_name' => 'hashtag_custom_tweet_text',
  175. 'value' => '',
  176. 'dependency' => array(
  177. 'element' => 'hashtag_no_default',
  178. 'value_not_equal_to' => 'yes',
  179. ),
  180. 'description' => esc_html__( 'Set custom text for tweet.', 'js_composer' ),
  181. ),
  182. array(
  183. 'type' => 'textfield',
  184. 'heading' => esc_html__( 'Recommend @', 'js_composer' ),
  185. 'param_name' => 'hashtag_recommend_1',
  186. 'value' => '',
  187. 'dependency' => array(
  188. 'element' => 'type',
  189. 'value' => 'hashtag',
  190. ),
  191. 'description' => esc_html__( 'Enter username to be recommended.', 'js_composer' ),
  192. ),
  193. array(
  194. 'type' => 'textfield',
  195. 'heading' => esc_html__( 'Recommend @', 'js_composer' ),
  196. 'param_name' => 'hashtag_recommend_2',
  197. 'value' => '',
  198. 'dependency' => array(
  199. 'element' => 'type',
  200. 'value' => 'hashtag',
  201. ),
  202. 'description' => esc_html__( 'Enter username to be recommended.', 'js_composer' ),
  203. ),
  204. array(
  205. 'type' => 'checkbox',
  206. 'heading' => esc_html__( 'Tweet url: No URL', 'js_composer' ),
  207. 'param_name' => 'hashtag_no_url',
  208. 'value' => array(
  209. esc_html__( 'Yes', 'js_composer' ) => 'yes',
  210. ),
  211. 'std' => 'yes',
  212. 'dependency' => array(
  213. 'element' => 'type',
  214. 'value' => 'hashtag',
  215. ),
  216. 'description' => esc_html__( 'Do you want to set no url to be tweeted?', 'js_composer' ),
  217. ),
  218. array(
  219. 'type' => 'textfield',
  220. 'heading' => esc_html__( 'Tweet url: custom', 'js_composer' ),
  221. 'param_name' => 'hashtag_custom_tweet_url',
  222. 'value' => '',
  223. 'dependency' => array(
  224. 'element' => 'hashtag_no_url',
  225. 'value_not_equal_to' => 'yes',
  226. ),
  227. 'description' => esc_html__( 'Enter custom url to be used in the tweet.', 'js_composer' ),
  228. ),
  229. // mention type
  230. array(
  231. 'type' => 'textfield',
  232. 'heading' => esc_html__( 'Tweet to @', 'js_composer' ),
  233. 'param_name' => 'mention_tweet_to',
  234. 'value' => '',
  235. 'dependency' => array(
  236. 'element' => 'type',
  237. 'value' => 'mention',
  238. ),
  239. 'description' => esc_html__( 'Enter username where you want to send your tweet.', 'js_composer' ),
  240. ),
  241. array(
  242. 'type' => 'checkbox',
  243. 'heading' => esc_html__( 'Tweet text: No default text', 'js_composer' ),
  244. 'param_name' => 'mention_no_default',
  245. 'value' => array(
  246. esc_html__( 'Yes', 'js_composer' ) => 'yes',
  247. ),
  248. 'std' => 'yes',
  249. 'dependency' => array(
  250. 'element' => 'type',
  251. 'value' => 'mention',
  252. ),
  253. 'description' => esc_html__( 'Set no default text of the tweet?', 'js_composer' ),
  254. ),
  255. array(
  256. 'type' => 'textfield',
  257. 'heading' => esc_html__( 'Tweet text: custom', 'js_composer' ),
  258. 'param_name' => 'mention_custom_tweet_text',
  259. 'value' => '',
  260. 'dependency' => array(
  261. 'element' => 'mention_no_default',
  262. 'value_not_equal_to' => 'yes',
  263. ),
  264. 'description' => esc_html__( 'Enter custom text for the tweet.', 'js_composer' ),
  265. ),
  266. array(
  267. 'type' => 'textfield',
  268. 'heading' => esc_html__( 'Recommend @', 'js_composer' ),
  269. 'param_name' => 'mention_recommend_1',
  270. 'value' => '',
  271. 'dependency' => array(
  272. 'element' => 'type',
  273. 'value' => 'mention',
  274. ),
  275. 'description' => esc_html__( 'Enter username to recommend.', 'js_composer' ),
  276. ),
  277. array(
  278. 'type' => 'textfield',
  279. 'heading' => esc_html__( 'Recommend @', 'js_composer' ),
  280. 'param_name' => 'mention_recommend_2',
  281. 'value' => '',
  282. 'dependency' => array(
  283. 'element' => 'type',
  284. 'value' => 'mention',
  285. ),
  286. 'description' => esc_html__( 'Enter username to recommend.', 'js_composer' ),
  287. ),
  288. // general
  289. array(
  290. 'type' => 'checkbox',
  291. 'heading' => esc_html__( 'Use large button', 'js_composer' ),
  292. 'param_name' => 'large_button',
  293. 'value' => '',
  294. 'description' => esc_html__( 'Do you like to display a larger Tweet button?', 'js_composer' ),
  295. ),
  296. array(
  297. 'type' => 'checkbox',
  298. 'heading' => esc_html__( 'Opt-out of tailoring Twitter', 'js_composer' ),
  299. 'param_name' => 'disable_tailoring',
  300. 'value' => '',
  301. 'description' => esc_html__( 'Tailored suggestions make building a great timeline. Would you like to disable this feature?', 'js_composer' ),
  302. ),
  303. array(
  304. 'type' => 'dropdown',
  305. 'heading' => esc_html__( 'Language', 'js_composer' ),
  306. 'param_name' => 'lang',
  307. 'value' => array(
  308. 'Automatic' => '',
  309. 'French - français' => 'fr',
  310. 'English' => 'en',
  311. 'Arabic - العربية' => 'ar',
  312. 'Japanese - 日本語' => 'ja',
  313. 'Spanish - Español' => 'es',
  314. 'German - Deutsch' => 'de',
  315. 'Italian - Italiano' => 'it',
  316. 'Indonesian - Bahasa Indonesia' => 'id',
  317. 'Portuguese - Português' => 'pt',
  318. 'Korean - 한국어' => 'ko',
  319. 'Turkish - Türkçe' => 'tr',
  320. 'Russian - Русский' => 'ru',
  321. 'Dutch - Nederlands' => 'nl',
  322. 'Filipino - Filipino' => 'fil',
  323. 'Malay - Bahasa Melayu' => 'msa',
  324. 'Traditional Chinese - 繁體中文' => 'zh-tw',
  325. 'Simplified Chinese - 简体中文' => 'zh-cn',
  326. 'Hindi - हिन्दी' => 'hi',
  327. 'Norwegian - Norsk' => 'no',
  328. 'Swedish - Svenska' => 'sv',
  329. 'Finnish - Suomi' => 'fi',
  330. 'Danish - Dansk' => 'da',
  331. 'Polish - Polski' => 'pl',
  332. 'Hungarian - Magyar' => 'hu',
  333. 'Farsi - فارسی' => 'fa',
  334. 'Hebrew - עִבְרִית' => 'he',
  335. 'Urdu - اردو' => 'ur',
  336. 'Thai - ภาษาไทย' => 'th',
  337. ),
  338. 'description' => esc_html__( 'Select button display language or allow it to be automatically defined by user preferences.', 'js_composer' ),
  339. ),
  340. vc_map_add_css_animation(),
  341. array(
  342. 'type' => 'el_id',
  343. 'heading' => esc_html__( 'Element ID', 'js_composer' ),
  344. 'param_name' => 'el_id',
  345. '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>' ),
  346. ),
  347. array(
  348. 'type' => 'textfield',
  349. 'heading' => esc_html__( 'Extra class name', 'js_composer' ),
  350. 'param_name' => 'el_class',
  351. 'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ),
  352. ),
  353. array(
  354. 'type' => 'css_editor',
  355. 'heading' => esc_html__( 'CSS box', 'js_composer' ),
  356. 'param_name' => 'css',
  357. 'group' => esc_html__( 'Design Options', 'js_composer' ),
  358. ),
  359. ),
  360. );