PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.9.3
Secure Custom Fields v6.9.3
6.9.5 6.9.4 6.9.3 6.9.2 6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / locations / abstract-acf-legacy-location.php
secure-custom-fields / includes / locations Last commit date
abstract-acf-legacy-location.php 1 year ago abstract-acf-location.php 4 weeks ago class-acf-location-attachment.php 4 weeks ago class-acf-location-block.php 1 year ago class-acf-location-comment.php 1 year ago class-acf-location-current-user-role.php 4 weeks ago class-acf-location-current-user.php 4 weeks ago class-acf-location-nav-menu-item.php 1 year ago class-acf-location-nav-menu.php 4 weeks ago class-acf-location-options-page.php 1 year ago class-acf-location-page-parent.php 1 year ago class-acf-location-page-template.php 4 weeks ago class-acf-location-page-type.php 4 weeks ago class-acf-location-page.php 1 year ago class-acf-location-post-category.php 1 year ago class-acf-location-post-format.php 1 year ago class-acf-location-post-status.php 1 year ago class-acf-location-post-taxonomy.php 4 weeks ago class-acf-location-post-template.php 4 weeks ago class-acf-location-post-type.php 4 weeks ago class-acf-location-post.php 1 year ago class-acf-location-taxonomy.php 4 weeks ago class-acf-location-user-form.php 4 weeks ago class-acf-location-user-role.php 4 weeks ago class-acf-location-widget.php 1 year ago index.php 1 year ago
abstract-acf-legacy-location.php
69 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 if ( ! class_exists( 'ACF_Legacy_Location' ) ) :
8 abstract class ACF_Legacy_Location {
9
10 /**
11 * Legacy location name.
12 *
13 * @var string $name
14 */
15 public $name = '';
16 /**
17 * Constructor.
18 *
19 * @date 5/03/2014
20 * @since ACF 5.0.0
21 *
22 * @return void
23 */
24 public function __construct() {
25
26 // Add legacy method filters.
27 if ( method_exists( $this, 'rule_match' ) ) {
28 add_filter( "acf/location/rule_match/{$this->name}", array( $this, 'rule_match' ), 5, 3 );
29 }
30 if ( method_exists( $this, 'rule_operators' ) ) {
31 add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 );
32 }
33 if ( method_exists( $this, 'rule_values' ) ) {
34 add_filter( "acf/location/rule_values/{$this->name}", array( $this, 'rule_values' ), 5, 2 );
35 }
36 }
37
38 /**
39 * Magic __call method for backwards compatibility.
40 *
41 * @date 10/4/20
42 * @since ACF 5.9.0
43 *
44 * @param string $name The method name.
45 * @param array $arguments The array of arguments.
46 * @return mixed
47 */
48 public function __call( $name, $arguments ) {
49
50 // Add backwards compatibility for legacy methods.
51 // - Combine 3x legacy filters cases together (remove first args).
52 switch ( $name ) {
53 case 'rule_match':
54 $method = isset( $method ) ? $method : 'match';
55 $arguments[3] = isset( $arguments[3] ) ? $arguments[3] : false; // Add $field_group param.
56 case 'rule_operators':
57 $method = isset( $method ) ? $method : 'get_operators';
58 case 'rule_values':
59 $method = isset( $method ) ? $method : 'get_values';
60 array_shift( $arguments );
61 return call_user_func_array( array( $this, $method ), $arguments );
62 case 'compare':
63 return call_user_func_array( array( $this, 'compare_to_rule' ), $arguments );
64 }
65 }
66 }
67
68 endif; // class_exists check
69