Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'slt_cf_check_scope', 'my_scope_check', 10, 7 );
- function my_scope_check( $scope_match, $request_type, $scope, $object_id, $scope_key, $scope_value, $field ) {
- $scope_match = false;
- if ( $scope_key == 'pageFeatureImg' && is_page_template('pageFeatureImg.php') ) {
- $scope_match = true;
- } elseif ( $scope_key == 'pageHalfImage' && is_page_template('pageHalfImage.php') ) {
- $scope_match = true;
- } elseif ( $scope_key == 'pageDefault' && !is_page_template() ) {
- $scope_match = true;
- } else {
- $scope_match = false;
- }
- return $scope_match;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement