summaryrefslogtreecommitdiff
path: root/inc/core/deprecated/deprecated-functions.php
blob: 779d474685d548a39b7f64c66bb23587eee9da45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/**
 * Deprecated Functions of Astra Theme.
 *
 * @package     Astra
 * @author      Astra
 * @copyright   Copyright (c) 2020, Astra
 * @link        https://wpastra.com/
 * @since       Astra 1.0.23
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! function_exists( 'astra_blog_post_thumbnai_and_title_order' ) ) :

	/**
	 * Blog post thumbnail & title order
	 *
	 * @since 1.4.9
	 * @deprecated 1.4.9 Use astra_blog_post_thumbnail_and_title_order()
	 * @see astra_blog_post_thumbnail_and_title_order()
	 *
	 * @return void
	 */
	function astra_blog_post_thumbnai_and_title_order() {
		_deprecated_function( __FUNCTION__, '1.4.9', 'astra_blog_post_thumbnail_and_title_order()' );

		astra_blog_post_thumbnail_and_title_order();
	}

endif;

if ( ! function_exists( 'get_astra_secondary_class' ) ) :

	/**
	 * Retrieve the classes for the secondary element as an array.
	 *
	 * @since 1.5.2
	 * @deprecated 1.5.2 Use astra_get_secondary_class()
	 * @param string|array $class One or more classes to add to the class list.
	 * @see astra_get_secondary_class()
	 *
	 * @return array
	 */
	function get_astra_secondary_class( $class = '' ) {
		_deprecated_function( __FUNCTION__, '1.5.2', 'astra_get_secondary_class()' );

		return astra_get_secondary_class( $class );
	}

endif;

if ( ! function_exists( 'deprecated_astra_color_palette' ) ) :

	/**
	 * Depreciating astra_color_palletes filter.
	 *
	 * @since 1.5.2
	 * @deprecated 1.5.2 Use astra_deprecated_color_palette()
	 * @param array $color_palette  customizer color palettes.
	 * @see astra_deprecated_color_palette()
	 *
	 * @return array
	 */
	function deprecated_astra_color_palette( $color_palette ) {
		_deprecated_function( __FUNCTION__, '1.5.2', 'astra_deprecated_color_palette()' );

		return astra_deprecated_color_palette( $color_palette );
	}

endif;

if ( ! function_exists( 'deprecated_astra_sigle_post_navigation_enabled' ) ) :

	/**
	 * Deprecating astra_sigle_post_navigation_enabled filter.
	 *
	 * @since 1.5.2
	 * @deprecated 1.5.2 Use astra_deprecated_sigle_post_navigation_enabled()
	 * @param boolean $post_nav true | false.
	 * @see astra_deprecated_sigle_post_navigation_enabled()
	 *
	 * @return array
	 */
	function deprecated_astra_sigle_post_navigation_enabled( $post_nav ) {
		_deprecated_function( __FUNCTION__, '1.5.2', 'astra_deprecated_sigle_post_navigation_enabled()' );

		return astra_deprecated_sigle_post_navigation_enabled( $post_nav );
	}

endif;

if ( ! function_exists( 'deprecated_astra_primary_header_main_rt_section' ) ) :

	/**
	 * Deprecating astra_primary_header_main_rt_section filter.
	 *
	 * @since 1.5.2
	 * @deprecated 1.5.2 Use astra_deprecated_primary_header_main_rt_section()
	 * @param array  $elements List of elements.
	 * @param string $header Header section type.
	 * @see astra_deprecated_primary_header_main_rt_section()
	 *
	 * @return array
	 */
	function deprecated_astra_primary_header_main_rt_section( $elements, $header ) {
		_deprecated_function( __FUNCTION__, '1.5.2', 'astra_deprecated_primary_header_main_rt_section()' );

		return astra_deprecated_primary_header_main_rt_section( $elements, $header );
	}

endif;

if ( ! function_exists( 'astar' ) ) :

	/**
	 * Get a specific property of an array without needing to check if that property exists.
	 *
	 * @since 1.5.2
	 * @deprecated 1.5.2 Use astra_get_prop()
	 * @param array  $array   Array from which the property's value should be retrieved.
	 * @param string $prop    Name of the property to be retrieved.
	 * @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null.
	 * @see astra_get_prop()
	 *
	 * @return null|string|mixed The value
	 */
	function astar( $array, $prop, $default = null ) {
		return astra_get_prop( $array, $prop, $default );
	}

endif;

/**
 * Check if we're being delivered AMP.
 *
 * @return bool
 */
function astra_is_emp_endpoint() {
	_deprecated_function( __FUNCTION__, '2.0.1', 'astra_is_amp_endpoint()' );

	return astra_is_amp_endpoint();
}