From bff7bce1f19d285e9f551371f6c01e607bc6951b Mon Sep 17 00:00:00 2001 From: Pascal Martineau Date: Fri, 30 Jan 2026 08:48:00 -0500 Subject: [PATCH] feat: Media Focus Point plugin integration --- composer.json | 3 ++- composer.lock | 20 ++++++++++++++++++- wp-content/themes/moonshine/functions.php | 1 + .../includes/wpgraphql/media-focus-point.php | 17 ++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 wp-content/themes/moonshine/includes/wpgraphql/media-focus-point.php diff --git a/composer.json b/composer.json index cce7f0e..e106d26 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,7 @@ "wpackagist-plugin/acf-extended": "*", "wpackagist-plugin/clean-image-filenames": "*", "wpackagist-plugin/disable-comments": "*", + "wpackagist-plugin/media-focus-point": "*", "wpackagist-plugin/seo-by-rank-math": "*", "wpackagist-plugin/wp-graphql": "*", "wpackagist-plugin/wpgraphql-acf": "*" @@ -47,4 +48,4 @@ "lewebsimple/wp-phpcs-ruleset": "*", "squizlabs/php_codesniffer": "*" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 8303d5a..fa408e6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9673ea7f3e3f21866ae50f70e1d6a16b", + "content-hash": "f563233465b6f95dac3c6b33962f6aed", "packages": [ { "name": "axepress/wp-graphql-plugin-boilerplate", @@ -418,6 +418,24 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/disable-comments/" }, + { + "name": "wpackagist-plugin/media-focus-point", + "version": "2.0.4", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/media-focus-point/", + "reference": "tags/2.0.4" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/media-focus-point.2.0.4.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/media-focus-point/" + }, { "name": "wpackagist-plugin/seo-by-rank-math", "version": "1.0.263", diff --git a/wp-content/themes/moonshine/functions.php b/wp-content/themes/moonshine/functions.php index 80f6dca..083a2c8 100644 --- a/wp-content/themes/moonshine/functions.php +++ b/wp-content/themes/moonshine/functions.php @@ -10,4 +10,5 @@ require_once __DIR__ . '/includes/vendors/tinymce.php'; require_once __DIR__ . '/includes/vendors/wpgraphql.php'; // WPGraphQL +require_once __DIR__ . '/includes/wpgraphql/media-focus-point.php'; require_once __DIR__ . '/includes/wpgraphql/term-connection.php'; diff --git a/wp-content/themes/moonshine/includes/wpgraphql/media-focus-point.php b/wp-content/themes/moonshine/includes/wpgraphql/media-focus-point.php new file mode 100644 index 0000000..df3c748 --- /dev/null +++ b/wp-content/themes/moonshine/includes/wpgraphql/media-focus-point.php @@ -0,0 +1,17 @@ + 'String', + 'description' => 'CSS object-position value from Media Focus Point plugin', + 'resolve' => static function ( $media_item ) { + return get_post_meta( $media_item->databaseId, 'bg_pos_desktop', true ); + }, + ) + ); +}