• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AxeWP / wp-graphql-rank-math / 14947513062

10 May 2025 05:19PM UTC coverage: 86.429% (-2.0%) from 88.44%
14947513062

Pull #121

github

web-flow
Merge f69ff5d7f into 3bd3ede8c
Pull Request #121: dev: add support for lazy-loading `description`/`deprecationReason` config values

356 of 366 new or added lines in 65 files covered. (97.27%)

60 existing lines in 60 files now uncovered.

2541 of 2940 relevant lines covered (86.43%)

11.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/src/Type/WPObject/Settings/Meta/HomepageMeta.php
1
<?php
2
/**
3
 * The HomepageMeta GraphQL object.
4
 *
5
 * @package WPGraphQL\RankMath\Type\WPObject\Settings\Meta
6
 */
7

8
declare( strict_types = 1 );
9

10
namespace WPGraphQL\RankMath\Type\WPObject\Settings\Meta;
11

12
use WPGraphQL\AppContext;
13
use WPGraphQL\RankMath\Type\WPInterface\MetaSettingWithRobots;
14
use WPGraphQL\RankMath\Vendor\AxeWP\GraphQL\Abstracts\ObjectType;
15
use WPGraphQL\RankMath\Vendor\AxeWP\GraphQL\Interfaces\TypeWithInterfaces;
16

17
/**
18
 * Class - HomepageMeta
19
 */
20
class HomepageMeta extends ObjectType implements TypeWithInterfaces {
21
        /**
22
         * {@inheritDoc}
23
         */
24
        protected static function type_name(): string {
25
                return 'HomepageMetaSettings';
19✔
26
        }
27

28
        /**
29
         * {@inheritDoc}
30
         */
31
        public static function get_description(): string {
UNCOV
32
                return __( 'The RankMath SEO Homepage settings. Only used when the Settings > Reading > Your homepage displays is set to `Your latest posts`.', 'wp-graphql-rank-math' );
×
33
        }
34

35
                /**
36
                 * {@inheritDoc}
37
                 */
38
        public static function get_interfaces(): array {
39
                return [
19✔
40
                        MetaSettingWithRobots::get_type_name(),
19✔
41
                ];
19✔
42
        }
43

44
        /**
45
         * {@inheritDoc}
46
         */
47
        public static function get_fields(): array {
48
                return [
19✔
49
                        'title'               => [
19✔
50
                                'type'        => 'String',
19✔
51
                                'description' => static fn () => __( 'Title tag.', 'wp-graphql-rank-math' ),
19✔
52
                        ],
19✔
53
                        'description'         => [
19✔
54
                                'type'        => 'String',
19✔
55
                                'description' => static fn () => __( 'Meta description.', 'wp-graphql-rank-math' ),
19✔
56
                        ],
19✔
57
                        'hasCustomRobotsMeta' => [
19✔
58
                                'type'        => 'Boolean',
19✔
59
                                'description' => static fn () => __( 'Whether custom robots meta for author page are set. Otherwise the default meta will be used, as set in the Global Meta tab.', 'wp-graphql-rank-math' ),
19✔
60
                        ],
19✔
61
                        'socialTitle'         => [
19✔
62
                                'type'        => 'String',
19✔
63
                                'description' => static fn () => __( 'Title when shared on Facebook, Twitter and other social networks.', 'wp-graphql-rank-math' ),
19✔
64
                        ],
19✔
65
                        'socialDescription'   => [
19✔
66
                                'type'        => 'String',
19✔
67
                                'description' => static fn () => __( 'Description when shared on Facebook, Twitter and other social networks.', 'wp-graphql-rank-math' ),
19✔
68
                        ],
19✔
69
                        'socialImage'         => [
19✔
70
                                'type'        => 'MediaItem',
19✔
71
                                'description' => static fn () => __( 'Image displayed when your homepage is shared on Facebook and other social networks.', 'wp-graphql-rank-math' ),
19✔
72
                                'resolve'     => static function ( $source, array $args, AppContext $context ) {
19✔
73
                                        return ! empty( $source['socialImageId'] ) ? $context->get_loader( 'post' )->load_deferred( $source['socialImageId'] ) : null;
×
74
                                },
19✔
75
                        ],
19✔
76
                ];
19✔
77
        }
78
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc