PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-content/themes/news/library/functions/deprecated.php

https://bitbucket.org/lgorence/quickpress
PHP | 575 lines | 287 code | 86 blank | 202 comment | 3 complexity | a7a57c25c2c0dcb6c49abc3c15ffd87e MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /**
  3. * Deprecated functions that should be avoided in favor of newer functions. Also handles removed
  4. * functions to avoid errors. Developers should not use these functions in their parent themes and users
  5. * should not use these functions in their child themes. The functions below will all be removed at some
  6. * point in a future release. If your theme is using one of these, you should use the listed alternative or
  7. * remove it from your theme if necessary.
  8. *
  9. * @package HybridCore
  10. * @subpackage Functions
  11. * @author Justin Tadlock <justin@justintadlock.com>
  12. * @copyright Copyright (c) 2008 - 2012, Justin Tadlock
  13. * @link http://themehybrid.com/hybrid-core
  14. * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  15. */
  16. /**
  17. * @since 0.2.0
  18. * @deprecated 0.7.0
  19. */
  20. function hybrid_after_single() {
  21. _deprecated_function( __FUNCTION__, '0.7', "do_atomic( 'after_singular' )" );
  22. hybrid_after_singular();
  23. }
  24. /**
  25. * @since 0.2.0
  26. * @deprecated 0.7.0
  27. */
  28. function hybrid_after_page() {
  29. _deprecated_function( __FUNCTION__, '0.7', "do_atomic( 'after_singular' )" );
  30. hybrid_after_singular();
  31. }
  32. /**
  33. * @since 0.2.2
  34. * @deprecated 0.8.0
  35. */
  36. function hybrid_comment_author() {
  37. _deprecated_function( __FUNCTION__, '0.8', 'hybrid_comment_author_shortcode()' );
  38. return hybrid_comment_author_shortcode();
  39. }
  40. /**
  41. * @since 0.4.0
  42. * @deprecated 1.0.0
  43. */
  44. function hybrid_theme_settings() {
  45. _deprecated_function( __FUNCTION__, '1.0.0', 'hybrid_get_default_theme_settings()' );
  46. return apply_filters( hybrid_get_prefix() . '_settings_args', hybrid_get_default_theme_settings() );
  47. }
  48. /**
  49. * @since 0.4.0
  50. * @deprecated 1.0.0
  51. */
  52. function hybrid_doctype() {
  53. _deprecated_function( __FUNCTION__, '1.0.0', '' );
  54. if ( !preg_match( "/MSIE 6.0/", esc_attr( $_SERVER['HTTP_USER_AGENT'] ) ) )
  55. $doctype = '<' . '?xml version="1.0" encoding="' . get_bloginfo( 'charset' ) . '"?>' . "\n";
  56. $doctype .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
  57. echo apply_atomic( 'doctype', $doctype );
  58. }
  59. /**
  60. * @since 0.4.0
  61. * @deprecated 1.0.0
  62. */
  63. function hybrid_meta_content_type() {
  64. _deprecated_function( __FUNCTION__, '1.0.0', '' );
  65. $content_type = '<meta http-equiv="Content-Type" content="' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) . '" />' . "\n";
  66. echo apply_atomic( 'meta_content_type', $content_type );
  67. }
  68. /**
  69. * @since 0.4.0
  70. * @deprecated 1.0.0
  71. */
  72. function hybrid_head_pingback() {
  73. _deprecated_function( __FUNCTION__, '1.0.0', '' );
  74. $pingback = '<link rel="pingback" href="' . get_bloginfo( 'pingback_url' ) . '" />' . "\n";
  75. echo apply_atomic( 'head_pingback', $pingback );
  76. }
  77. /**
  78. * @since 0.6.0
  79. * @deprecated 1.0.0
  80. */
  81. function hybrid_profile_uri() {
  82. _deprecated_function( __FUNCTION__, '1.0.0', '' );
  83. echo apply_atomic( 'profile_uri', 'http://gmpg.org/xfn/11' );
  84. }
  85. /**
  86. * @since 0.3.2
  87. * @deprecated 1.0.0
  88. */
  89. function hybrid_before_html() {
  90. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_html' )" );
  91. do_atomic( 'before_html' );
  92. }
  93. /**
  94. * @since 0.3.2
  95. * @deprecated 1.0.0
  96. */
  97. function hybrid_after_html() {
  98. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_html' )" );
  99. do_atomic( 'after_html' );
  100. }
  101. /**
  102. * @since 0.1.0
  103. * @deprecated 1.0.0
  104. */
  105. function hybrid_head() {
  106. _deprecated_function( __FUNCTION__, '1.0.0', 'wp_head' );
  107. do_atomic( 'head' );
  108. }
  109. /**
  110. * @since 0.1.0
  111. * @deprecated 1.0.0
  112. */
  113. function hybrid_before_header() {
  114. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_header' )" );
  115. do_atomic( 'before_header' );
  116. }
  117. /**
  118. * @since 0.1.0
  119. * @deprecated 1.0.0
  120. */
  121. function hybrid_header() {
  122. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'header' )" );
  123. do_atomic( 'header' );
  124. }
  125. /**
  126. * @since 0.1.0
  127. * @deprecated 1.0.0
  128. */
  129. function hybrid_after_header() {
  130. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_header' )" );
  131. do_atomic( 'after_header' );
  132. }
  133. /**
  134. * @since 0.8.0
  135. * @deprecated 1.0.0
  136. */
  137. function hybrid_before_primary_menu() {
  138. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_primary_menu' )" );
  139. do_atomic( 'before_primary_menu' );
  140. }
  141. /**
  142. * @since 0.8.0
  143. * @deprecated 1.0.0
  144. */
  145. function hybrid_after_primary_menu() {
  146. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_primary_menu' )" );
  147. do_atomic( 'after_primary_menu' );
  148. }
  149. /**
  150. * @since 0.1.0
  151. * @deprecated 1.0.0
  152. */
  153. function hybrid_before_container() {
  154. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_container' )" );
  155. do_atomic( 'before_container' );
  156. }
  157. /**
  158. * @since 0.1.0
  159. * @deprecated 1.0.0
  160. */
  161. function hybrid_before_content() {
  162. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_content' )" );
  163. do_atomic( 'before_content' );
  164. }
  165. /**
  166. * @since 0.1.0
  167. * @deprecated 1.0.0
  168. */
  169. function hybrid_after_content() {
  170. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_content' )" );
  171. do_atomic( 'after_content' );
  172. }
  173. /**
  174. * @since 0.5.0
  175. * @deprecated 1.0.0
  176. */
  177. function hybrid_before_entry() {
  178. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_entry' )" );
  179. do_atomic( 'before_entry' );
  180. }
  181. /**
  182. * @since 0.5.0
  183. * @deprecated 1.0.0
  184. */
  185. function hybrid_after_entry() {
  186. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_entry' )" );
  187. do_atomic( 'after_entry' );
  188. }
  189. /**
  190. * @since 0.7.0
  191. * @deprecated 1.0.0
  192. */
  193. function hybrid_after_singular() {
  194. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_singular' )" );
  195. do_atomic( 'after_singular' );
  196. }
  197. /**
  198. * @since 0.1.0
  199. * @deprecated 1.0.0
  200. */
  201. function hybrid_before_primary() {
  202. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_primary' )" );
  203. do_atomic( 'before_primary' );
  204. }
  205. /**
  206. * @since 0.1.0
  207. * @deprecated 1.0.0
  208. */
  209. function hybrid_after_primary() {
  210. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_primary' )" );
  211. do_atomic( 'after_primary' );
  212. }
  213. /**
  214. * @since 0.2.0
  215. * @deprecated 1.0.0
  216. */
  217. function hybrid_before_secondary() {
  218. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_secondary' )" );
  219. do_atomic( 'before_secondary' );
  220. }
  221. /**
  222. * @since 0.2.0
  223. * @deprecated 1.0.0
  224. */
  225. function hybrid_after_secondary() {
  226. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_secondary' )" );
  227. do_atomic( 'after_secondary' );
  228. }
  229. /**
  230. * @since 0.3.1
  231. * @deprecated 1.0.0
  232. */
  233. function hybrid_before_subsidiary() {
  234. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_subsidiary' )" );
  235. do_atomic( 'before_subsidiary' );
  236. }
  237. /**
  238. * @since 0.3.1
  239. * @deprecated 1.0.0
  240. */
  241. function hybrid_after_subsidiary() {
  242. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_subsidiary' )" );
  243. do_atomic( 'after_subsidiary' );
  244. }
  245. /**
  246. * @since 0.1.0
  247. * @deprecated 1.0.0
  248. */
  249. function hybrid_after_container() {
  250. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_container' )" );
  251. do_atomic( 'after_container' );
  252. }
  253. /**
  254. * @since 0.1.0
  255. * @deprecated 1.0.0
  256. */
  257. function hybrid_before_footer() {
  258. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_footer' )" );
  259. do_atomic( 'before_footer' );
  260. }
  261. /**
  262. * @since 0.1.0
  263. * @deprecated 1.0.0
  264. */
  265. function hybrid_footer() {
  266. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'footer' )" );
  267. do_atomic( 'footer' );
  268. }
  269. /**
  270. * @since 0.1.0
  271. * @deprecated 1.0.0
  272. */
  273. function hybrid_after_footer() {
  274. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_footer' )" );
  275. do_atomic( 'after_footer' );
  276. }
  277. /**
  278. * @since 0.5.0
  279. * @deprecated 1.0.0
  280. */
  281. function hybrid_before_comment() {
  282. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_comment' )" );
  283. do_atomic( 'before_comment' );
  284. }
  285. /**
  286. * @since 0.5.0
  287. * @deprecated 1.0.0
  288. */
  289. function hybrid_after_comment() {
  290. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_comment' )" );
  291. do_atomic( 'after_comment' );
  292. }
  293. /**
  294. * @since 0.6.0
  295. * @deprecated 1.0.0
  296. */
  297. function hybrid_before_comment_list() {
  298. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'before_comment_list' )" );
  299. do_atomic( 'before_comment_list' );
  300. }
  301. /**
  302. * @since 0.6.0
  303. * @deprecated 1.0.0
  304. */
  305. function hybrid_after_comment_list() {
  306. _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_comment_list' )" );
  307. do_atomic( 'after_comment_list' );
  308. }
  309. /* @deprecated 1.0.0. Backwards compatibility with old theme settings. */
  310. add_action( 'check_admin_referer', 'hybrid_back_compat_update_settings' );
  311. /**
  312. * Backwards compatibility function for updating child theme settings. Do not use this function or the
  313. * available hook in development.
  314. *
  315. * @since 1.0.0
  316. * @deprecated 1.0.0
  317. */
  318. function hybrid_back_compat_update_settings( $action ) {
  319. //_deprecated_function( __FUNCTION__, '1.0.0' );
  320. $prefix = hybrid_get_prefix();
  321. if ( "{$prefix}_theme_settings-options" == $action )
  322. do_action( "{$prefix}_update_settings_page" );
  323. }
  324. /**
  325. * @since 0.1.0
  326. * @deprecated 1.2.0
  327. */
  328. function hybrid_enqueue_script() {
  329. _deprecated_function( __FUNCTION__, '1.2.0', 'hybrid_enqueue_scripts' );
  330. return;
  331. }
  332. /**
  333. * @since 1.0.0
  334. * @deprecated 1.2.0
  335. */
  336. function hybrid_admin_enqueue_style() {
  337. _deprecated_function( __FUNCTION__, '1.2.0', 'hybrid_admin_enqueue_styles' );
  338. return;
  339. }
  340. /**
  341. * @since 0.7.0
  342. * @deprecated 1.2.0
  343. */
  344. function hybrid_settings_page_enqueue_style() {
  345. _deprecated_function( __FUNCTION__, '1.2.0', 'hybrid_settings_page_enqueue_styles' );
  346. return;
  347. }
  348. /**
  349. * @since 0.7.0
  350. * @deprecated 1.2.0
  351. */
  352. function hybrid_settings_page_enqueue_script() {
  353. _deprecated_function( __FUNCTION__, '1.2.0', 'hybrid_settings_page_enqueue_scripts' );
  354. return;
  355. }
  356. /**
  357. * @since 0.7.0
  358. * @deprecated 1.3.0
  359. */
  360. function hybrid_admin_init() {
  361. _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_admin_setup' );
  362. return;
  363. }
  364. /**
  365. * @since 1.2.0
  366. * @deprecated 1.3.0
  367. */
  368. function hybrid_settings_page_contextual_help() {
  369. _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_settings_page_help' );
  370. return;
  371. }
  372. /**
  373. * @since 0.9.0
  374. * @deprecated 1.3.0
  375. */
  376. function hybrid_load_textdomain( $mofile, $domain ) {
  377. _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_load_textdomain_mofile' );
  378. return hybrid_load_textdomain_mofile( $mofile, $domain );
  379. }
  380. /* === Removed Functions === */
  381. /* Functions removed in the 0.8 branch. */
  382. function hybrid_content_wrapper() {
  383. hybrid_function_removed( __FUNCTION__ );
  384. }
  385. function hybrid_handle_attachment() {
  386. hybrid_function_removed( __FUNCTION__ );
  387. }
  388. function hybrid_widget_class() {
  389. hybrid_function_removed( __FUNCTION__ );
  390. }
  391. function hybrid_before_ping_list() {
  392. hybrid_function_removed( __FUNCTION__ );
  393. }
  394. function hybrid_after_ping_list() {
  395. hybrid_function_removed( __FUNCTION__ );
  396. }
  397. function hybrid_pings_callback() {
  398. hybrid_function_removed( __FUNCTION__ );
  399. }
  400. function hybrid_pings_end_callback() {
  401. hybrid_function_removed( __FUNCTION__ );
  402. }
  403. /* Functions removed in the 1.2 branch. */
  404. function hybrid_get_comment_form() {
  405. hybrid_function_removed( __FUNCTION__ );
  406. }
  407. function hybrid_before_comment_form() {
  408. hybrid_function_removed( __FUNCTION__ );
  409. }
  410. function hybrid_after_comment_form() {
  411. hybrid_function_removed( __FUNCTION__ );
  412. }
  413. function hybrid_get_utility_after_single() {
  414. hybrid_function_removed( __FUNCTION__ );
  415. }
  416. function hybrid_get_utility_after_page() {
  417. hybrid_function_removed( __FUNCTION__ );
  418. }
  419. function hybrid_create_post_meta_box() {
  420. hybrid_function_removed( __FUNCTION__ );
  421. }
  422. function hybrid_post_meta_box_args() {
  423. hybrid_function_removed( __FUNCTION__ );
  424. }
  425. function hybrid_post_meta_box() {
  426. hybrid_function_removed( __FUNCTION__ );
  427. }
  428. function hybrid_post_meta_box_text() {
  429. hybrid_function_removed( __FUNCTION__ );
  430. }
  431. function hybrid_post_meta_box_select() {
  432. hybrid_function_removed( __FUNCTION__ );
  433. }
  434. function hybrid_post_meta_box_textarea() {
  435. hybrid_function_removed( __FUNCTION__ );
  436. }
  437. function hybrid_post_meta_box_radio() {
  438. hybrid_function_removed( __FUNCTION__ );
  439. }
  440. function hybrid_save_post_meta_box() {
  441. hybrid_function_removed( __FUNCTION__ );
  442. }
  443. function hybrid_create_settings_meta_boxes() {
  444. hybrid_function_removed( __FUNCTION__ );
  445. }
  446. function hybrid_footer_settings_meta_box() {
  447. hybrid_function_removed( __FUNCTION__ );
  448. }
  449. function hybrid_about_theme_meta_box() {
  450. hybrid_function_removed( __FUNCTION__ );
  451. }
  452. function hybrid_load_settings_page() {
  453. hybrid_function_removed( __FUNCTION__ );
  454. }
  455. function hybrid_page_nav() {
  456. hybrid_function_removed( __FUNCTION__ );
  457. }
  458. function hybrid_cat_nav() {
  459. hybrid_function_removed( __FUNCTION__ );
  460. }
  461. function hybrid_category_menu() {
  462. hybrid_function_removed( __FUNCTION__ );
  463. }
  464. function hybrid_search_form() {
  465. hybrid_function_removed( __FUNCTION__ );
  466. }
  467. function hybrid_post_class() {
  468. hybrid_function_removed( __FUNCTION__ );
  469. }
  470. function is_sidebar_active() {
  471. hybrid_function_removed( __FUNCTION__ );
  472. }
  473. function hybrid_enqueue_style() {
  474. hybrid_function_removed( __FUNCTION__ );
  475. }
  476. function hybrid_add_theme_support() {
  477. hybrid_function_removed( __FUNCTION__ );
  478. }
  479. function hybrid_post_stylesheets() {
  480. hybrid_function_removed( __FUNCTION__ );
  481. }
  482. /**
  483. * Message to display for removed functions.
  484. * @since 0.5.0
  485. */
  486. function hybrid_function_removed( $func = '' ) {
  487. die( sprintf( __( '<code>%1$s</code> &mdash; This function has been removed or replaced by another function.', 'hybrid-core' ), $func ) );
  488. }
  489. ?>