Home
Softono
w

wpengine

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
5

Software by wpengine

faustjs
Open Source

faustjs

![Faust.js](.github/assets/faust-banner.jpg) <p align="center"> <a aria-label="@faustwp/core Downloads" href="https://www.npmjs.com/package/@faustwp/core"> <img alt="" src="https://img.shields.io/npm/dw/@faustwp/core?color=7e5cef&style=for-the-badge&label=@faustwp/core"> </a> <!-- --> <a aria-label="@faustwp/cli Downloads" href="https://www.npmjs.com/package/@faustwp/cli"> <img alt="" src="https://img.shields.io/npm/dw/@faustwp/cli?color=7e5cef&style=for-the-badge&label=@faustwp/cli"> </a> <!-- --> <a aria-label="License" href="https://github.com/wpengine/faustjs/blob/canary/LICENSE"> <img alt="" src="https://img.shields.io/npm/l/@faustjs/core?color=7e5cef&style=for-the-badge"> </a> </p> ## Introduction Faust.js is a toolkit for building Next.js applications for headless WordPress sites. Faust.js provides tooling to reduce the pains of building a headless WordPress site (namely around data fetching, authentication, previews, and SSR/SSG) while offering a pleasant experience for both developers and publishers. - [Getting started with Next.js](https://faustjs.org/docs/getting-started) ## System Requirements - Node.js v18 or newer. npm v8 or newer. - MacOS, Windows (including WSL), and Linux are supported. ## Documentation Visit [https://faustjs.org/docs/](https://faustjs.org/docs/getting-started) to view the full documentation. ### Editing Docs Docs are MD in [`docs`](docs/). Here are a couple things you should know! 1. Our Docs support [Github Flavored Markdown](https://github.github.com/gfm/) (GFM). 2. Images should be stored along side the doc that uses them in an `images/` folder. 3. Shared Images can be stored in a shared folder @ `docs/images` 4. [Callouts](https://github.com/lin-stephanie/rehype-callouts?tab=readme-ov-file#rehype-callouts): These are similar to block quotes or an aside but for various warnings, info, pro times, etc. 5. Code Blocks: - Required 1. Specify a language: ` ```js ` or `` `const inlineCode = [1,2,3];{:js}` `` - Commands for a users terminal = `bash` - env files = `ini` - JavaScript = `js` - TypeScript = `ts` - GraphQL = `gql` - JSON = `json` - For a full list see: https://shiki.style/languages 2. Add [line numbers](https://rehype-pretty.pages.dev/#line-numbers) to any complex code. `ini` and `bash` don't need to show line numbers generally. ` ```js showLineNumbers` 3. Complete files should have a [file names](https://rehype-pretty.pages.dev/#titles) ` ```js title="pages/_app.js` - Optional 1. Lines can be [highlighted](https://rehype-pretty.pages.dev/#highlight-lines) in code blocks ` ```js {1,3-5}`. There are a variety of advanced highlighting methods, see: https://rehype-pretty.pages.dev/#highlight-lines 2. Lines may be [diffed](https://shiki.style/packages/transformers#transformernotationdiff) in a code block: ```js console.log('hewwo') // [!code --] console.log('hello') // [!code ++] console.log('goodbye') ``` ## WordPress Plugin (FaustWP) There are two key parts to Faust.js: the NPM packages and the WordPress plugin. To take full advantage of headless, you will need to install the plugin in addition to the npm packages. You can download and install FaustWP from the [WordPress Plugin Directory](https://wordpress.org/plugins/faustwp/), or by using the zip linked below. [📥 Download Latest Version](https://wordpress.org/plugins/faustwp/) ## Community To chat with other Faust.js users and the headless community as a whole, you can join the [WP Engine Developers Discord](https://discord.gg/J2khkF9XYK). Additionally, if you have questions or ideas, please share them on [GitHub Discussions](https://github.com/wpengine/faustjs/discussions). ## Contributing There are many ways to [contribute](/CONTRIBUTING.md) to this project. - [Discuss open issues](https://github.com/wpengine/faustjs/issues) to help define the future of the project. - [Submit bugs](https://github.com/wpengine/faustjs/issues) and help us verify fixes as they are checked in. - Review and discuss the [source code changes](https://github.com/wpengine/faustjs/pulls). - [Contribute bug fixes](/CONTRIBUTING.md) ### Contributor License Agreement All external contributors to WP Engine products must have a signed Contributor License Agreement (CLA) in place before the contribution may be accepted into any WP Engine codebase. 1. [Submit your name and email](https://wpeng.in/cla/) 2. 📝 Sign the CLA emailed to you 3. 📥 Receive copy of signed CLA ❤️ Thank you for helping us fulfill our legal obligations in order to continue empowering builders through headless WordPress.

WordPress Themes & Plugins Headless CMS
1.6K Github Stars
frost
Open Source

frost

=== Frost === Contributors: wpengine, bgardner Requires at least: 6.9 Tested up to: 6.9 Requires PHP: 7.2 Stable tag: 1.1 License: GNU General Public License v3 License URI: https://www.gnu.org/licenses/gpl-3.0.html == Description == With its clean, minimal design and powerful feature set, Frost enables agencies to build stylish and sophisticated WordPress websites. Frost is a masterpiece of design and functionality. It features a range of valuable patterns, including hero and portfolio sections, prominent call-to-action buttons, and customer testimonials. Whether you’re building a website for your business, personal brand, or creative project, Frost is perfect for anyone looking to launch quickly and efficiently. == Changelog == = 1.1 - 2025-12-15 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.1) = 1.0.10 - 2025-3-10 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.10) = 1.0.9 - 2024-4-19 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.9) = 1.0.8 - 2024-1-19 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.8) = 1.0.7 - 2023-12-11 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.7) = 1.0.6 - 2023-10-16 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.6) = 1.0.5 - 2023-07-28 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.5) = 1.0.4 - 2023-06-16 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.4) = 1.0.3 - 2023-05-19 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.3) = 1.0.2 - 2023-05-01 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.2) = 1.0.1 - 2023-04-25 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.1) = 1.0.0 - 2023-03-31 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v1.0.0) = 0.9.10 - 2022-12-09 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.10) = 0.9.9 - 2022-10-25 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.9) = 0.9.8 - 2022-07-08 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.8) = 0.9.7 - 2022-05-31 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.7) = 0.9.6 - 2022-05-13 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.6) = 0.9.5 - 2022-04-25 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.5) = 0.9.4 - 2022-04-18 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.4) = 0.9.3 - 2022-04-11 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.3) = 0.9.2 - 2022-04-04 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.2) = 0.9.1 - 2022-03-21 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.1) = 0.9.0 - 2022-03-14 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.9.0) = 0.8.9 - 2022-03-07 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.8.9) = 0.8.8 - 2022-02-28 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.8.8) = 0.8.7 - 2022-02-21 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.8.7) = 0.8.6 - 2022-02-14 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.8.6) = 0.8.5 - 2022-02-07 = [Release Notes](https://github.com/wpengine/frost/releases/tag/v0.8.5) = 0.8.4 - 2022-01-31 = [Release Notes](https://github.com/wpengine/frost/releases/tag/2022.01.31) = 0.8.3 - 2022-01-24 = [Release Notes](https://github.com/wpengine/frost/releases/tag/2022.01.24) = 0.8.2 - 2022-01-17 = [Release Notes](https://github.com/wpengine/frost/releases/tag/2022.01.17) = 0.8.1 - 2022-01-10 = [Release Notes](https://github.com/wpengine/frost/releases/tag/2022.01.10) = 0.8.0 - 2022-01-03 = Initial public release. == Copyright == Frost WordPress Theme, (C) 2022-2023 WP Engine. Frost is distributed under the terms of the GNU GPL. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

WordPress Themes & Plugins
626 Github Stars
wp-graphql-content-blocks
Open Source

wp-graphql-content-blocks

# WPGraphQL Content Blocks [![Test Plugin](https://github.com/wpengine/wp-graphql-content-blocks/actions/workflows/test-plugin.yml/badge.svg)](https://github.com/wpengine/wp-graphql-content-blocks/actions/workflows/test-plugin.yml) [![Download Latest Version](https://img.shields.io/github/package-json/version/wpengine/wp-graphql-content-blocks?label=Download%20Latest%20Version)](https://github.com/wpengine/wp-graphql-content-blocks/releases/latest/download/wp-graphql-content-blocks.zip) WordPress plugin that extends WPGraphQL to support querying (Gutenberg) Blocks as data. ## How to Install This plugin is an extension of [`wp-graphql`](https://www.wpgraphql.com/), so make sure you have it installed first. 1. Download the [latest .zip version of the plugin](https://github.com/wpengine/wp-graphql-content-blocks/releases/latest/download/wp-graphql-content-blocks.zip) 2. Upload the plugin .zip to your WordPress site 3. Activate the plugin within WordPress plugins page. There is no other configuration needed once you install the plugin. ## Getting started Once the plugin is installed, head over to the GraphiQL IDE and you should be able to perform queries for the block data (This plugin is an extension of [wp-graphql](https://www.wpgraphql.com/), so make sure you have it installed first.). There is a new field added in the Post and Page models called `editorBlocks`. This represents a list of available blocks for that content type: ```graphql { posts { nodes { # editorBlocks field represents array of Block data editorBlocks(flat: false) { # fields from the interface renderedHtml __typename # expand the Paragraph block attributes ... on CoreParagraph { attributes { content } } # expand a Custom block attributes ... on CreateBlockMyFirstBlock { attributes { title } } } } } } ``` ## How do I query block data? To query specific block data you need to define that data in the `editorBlocks` as the appropriate type. For example, to use `CoreParagraph` attributes you need to use the following query: ```graphql { posts { nodes { editorBlocks(flat: false) { __typename name ... on CoreParagraph { attributes { content className } } } } } } ``` If the resolved block has values for those fields, it will return them, otherwise it will return `null`. ```json { "__typename": "CoreParagraph", "name": "core/paragraph", "attributes": { "content": "Hello world", "className": null } } ``` ## What about innerBlocks? In order to facilitate querying `innerBlocks` fields more efficiently you want to use `editorBlocks(flat: true)` instead of `editorBlocks`. By passing this argument, all the blocks available (both blocks and innerBlocks) will be returned all flattened in the same list. For example, given the following HTML Content: ```html <columns> <column> <p>Example paragraph in Column</p> <p></p ></column> <column></column ></columns> ``` It will return the following blocks: ```json [ { "__typename": "CoreColumns", "name": "core/columns", "id": "63dbec9abcf9d", "parentClientId": null }, { "__typename": "CoreColumn", "name": "core/column", "id": "63dbec9abcfa6", "parentClientId": "63dbec9abcf9d" }, { "__typename": "CoreParagraph", "name": "core/paragraph", "id": "63dbec9abcfa9", "parentClientId": "63dbec9abcfa6", "attributes": { "content": "Example paragraph in Column 1", "className": null } } ] ``` The `CoreColumns` contains one or more `CoreColumn` block, and each `CoreColumn` contains a `CoreParagraph`. Given the flattened list of blocks though, how can you put it back? Well that's where you use the \`\` and `parentId` fields to assign temporary unique ids for each block. The `clientId` field assigns a temporary unique id for a specific block and the `parentClientId` will be assigned only if the current block has a parent. If the current block does have a parent, it will get the parent's `clientId` value. So in order to put everything back in the Headless site, you want to use the `flatListToHierarchical` function as mentioned in the [WPGraphQL docs](https://www.wpgraphql.com/docs/menus#hierarchical-data). ### Note > Currently the `clientId` field is only unique per request and is not persisted anywhere. If you perform another request each block will be assigned a new `clientId` each time. --- ## Querying Object-Type Block Attributes in WPGraphQL ### Overview With this update, you can now query object-type block attributes with each property individually, provided that the **typed structure** is defined in the class `typed_object_attributes` property or through a **WordPress filter**. ### How It Works The `typed_object_attributes` is a **filterable** array that defines the expected **typed structure** for object-type block attributes. - The **keys** in `typed_object_attributes` correspond to **object attribute names** in the block. - Each value is an **associative array**, where: - The key represents the **property name** inside the object. - The value defines the **WPGraphQL type** (e.g., `string`, `integer`, `object`, etc.). - If a block attribute has a specified **typed structure**, only the properties listed within it will be processed. ### Defining Typed Object Attributes Typed object attributes can be **defined in two ways**: #### 1. In a Child Class (`typed_object_attributes` property) Developers can extend the `Block` class and specify **typed properties** directly: ```php class CustomMovieBlock extends Block { /** * {@inheritDoc} * * @var array<string, array<string, "array"|"boolean"|"number"|"integer"|"object"|"rich-text"|"string">> */ protected array $typed_object_attributes = [ 'film' => [ 'id' => 'integer', 'title' => 'string', 'director' => 'string', 'soundtrack' => 'object', ], 'soundtrack' => [ 'title' => 'string', 'artist' => 'string' ], ]; } ``` #### 2. Via WordPress Filter You can also define **typed structures dynamically** using a WordPress filter. ```php add_filter( 'wpgraphql_content_blocks_object_typing_my-custom-plugin_movie-block', function () { return [ 'film' => [ 'id' => 'integer', 'title' => 'string', 'director' => 'string', 'soundtrack' => 'object', ], 'soundtrack' => [ 'title' => 'string', 'artist' => 'string' ], ]; } ); ``` ### Filter Naming Convention To apply custom typing via a filter, use the following format: ``` wpgraphql_content_blocks_object_typing_{block-name} ``` - Replace `/` in the block name with `-`. - Example: - **Block name**: `my-custom-plugin/movie-block` - **Filter name**: `wpgraphql_content_blocks_object_typing_my-custom-plugin_movie-block` ### Example: #### Example `block.json` Definition If the block has attributes defined as **objects**, like this: ```json "attributes": { "film": { "type": "object", "default": { "id": 1, "title": "The Matrix", "director": "Director Name" } }, "soundtrack": { "type": "object", "default": { "title": "The Matrix Revolutions...", "artist": "Artist Name" } } } ``` This means: - The `film` attribute contains `id`, `title`, `director`. - The `soundtrack` attribute contains `title` and `artist`. ### WPGraphQL Query Example Once the typed object attributes are **defined**, you can query them **individually** in WPGraphQL. ```graphql fragment Movie on MyCustomPluginMovieBlock { attributes { film { id title director soundtrack { title } } soundtrack { title artist } } } query GetAllPostsWhichSupportBlockEditor { posts { edges { node { editorBlocks { __typename name ...Movie } } } } } ``` --- ### Contributor License Agreement All external contributors to WP Engine products must have a signed Contributor License Agreement (CLA) in place before the contribution may be accepted into any WP Engine codebase. 1. [Submit your name and email](https://wpeng.in/cla/) 2. 📝 Sign the CLA emailed to you 3. 📥 Receive copy of signed CLA ❤️ Thank you for helping us fulfill our legal obligations in order to continue empowering builders through headless WordPress.

WordPress Themes & Plugins API Tools
143 Github Stars
phpcompat
Open Source

phpcompat

# PHP Compatibility Checker An easy way to check your site for PHP Compatibility. ## Setup Development Environment Before starting your workstation will need the following: * [Docker](https://www.docker.com/) * [Node.js](https://nodejs.org/) v20 LTS (recommended via [nvm](https://github.com/nvm-sh/nvm)) If using nvm, run `nvm use` in the project root to switch to the correct Node version. 1. Clone the repository `[email protected]:wpengine/phpcompat.git` 2. Setup WP-Env ```bash make setup && make start ``` When finished, a local WordPress will be configured at http://localhost:8888/wp-admin. WordPress Credentials: __URL:__ _http://localhost:8888/wp-admin_ __Admin User:__ _admin_ __Admin Password:__ _password_ If anything goes wrong and you suspect your local is frozen, you can always `make choose-violence` to rebuild the local environment and containers. Hopefully you never have to choose violence. :) ## Build and Testing ```bash make build ``` Note, assets will also build during the install phase. You can run all testing (all lints and unit tests) together with the following: ```bash make test ``` The project uses the [Brain Monkey](https://brain-wp.github.io/BrainMonkey/) library for unit testing. Once setup run the following for unit tests: ```bash make test-unit ``` The project uses the WordPress e2e tests. Run the following for e2e tests: ```bash make test-e2e ``` We also use [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) with [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards) and [JSHint](http://jshint.com/) with [WordPress' JS Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#installing-and-running-jshint). Linting will automagically be setup for you if you use [Visual Studio Code](https://code.visualstudio.com/). If you want to run it manually use the following: ```bash make test-lint ``` or, to run an individual lint (php or javascript), use one of the following: ```bash make test-lint-php ``` ```bash make test-lint-javascript ``` Screw something up? You can reset your environment with the following. It will stop the environment and cleanup and the build files as well as anything downloaded. ```bash make reset ``` ## Preparing for release To generate a .zip that can be uploaded through any normal WordPress plugin installation workflow, simply run the following: ```bash make release ```

WordPress Themes & Plugins Code Quality & Linting
123 Github Stars
geoip
Open Source

geoip

# WP Engine GeoTarget [![Build Status](https://travis-ci.org/wpengine/geoip.svg?branch=master)](https://travis-ci.org/wpengine/geoip) [![codecov](https://codecov.io/gh/wpengine/geoip/branch/master/graph/badge.svg)](https://codecov.io/gh/wpengine/geoip) WP Engine GeoTarget integrates with the variables on your WP Engine site to display content catered to the visitor’s location. With the ability to access variables from as broad as country to as specific as latitude and longitude, your website can now display geographically relevant content. ## Use cases ### Geo-Marketing * Create marketing campaigns targeted only at certain locations. ### Localization * Redirect incoming traffic to content in the local language or currency. * Businesses with local branches can direct customers to a relevant physical location or local microsite. ### Ecommerce * Filter out merchandise or services that are not available in a certain locale. * Display country-specific shipping, tax, or sales information. ### Legal Requirements * Filter required legal notices from countries for whom those notices may not be relevant. ### * Please Note * If you are signed into a Premium or Enterprise plan, you can use this plugin at no additional cost. If you are on another plan type and would like to use GeoTarget on one of your sites, you can add it to your plan [here](http://wpengine.com/plans/?utm_source=wpengine-geoip). This will not function outside of the WP Engine environment. ## Installation 1. Upload `wpengine-geoip` to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress ## How to use ### Location Variable Shortcodes You can use any of the following location variable shortcodes to return the various geographic location the user is visiting your site from: 1. Continent: `[geoip-continent]` 2. Country: `[geoip-country]` 3. Region: `[geoip-region]` * In the US region will return States * In Canada region will return Provinces * Outside the US/CA this will return a Region number. Please note region numbers are not unique between countries 4. City: `[geoip-city]` 5. Postal Code: `[geoip-postalcode]` * This variable is only available in the US due to limitations with the location data GeoTarget uses 6. Latitude: `[geoip-latitude]` 7. Longitude: `[geoip-longitude]` 8. Location: `[geoip-location]` #### Example **In your post editor:** > Hi, and welcome to [geoip-city]! The place to be in [geoip-region],[geoip-country]. **A visitor from Austin, Texas would see:** > Hi, and welcome to Austin! The place to be in TX, US. ### Localized Content The content shortcode allows you to hide or show specific content based on visitor geographies: > [geoip-content country="US"]Your US specific content goes here[/geoip-content] Below are all the supported geography options, this allows to you SHOW content for only specific locations: * continent * country * areacode * region * city * postalcode Below are all the supported negative geography options, this allows to you HIDE content for only specific locations: * not_continent * not_country * not_areacode * not_region * not_city * not_postalcode #### Examples of the Content Shortcode This will display “Content just for US visitors” strictly for visitors viewing from the United States. > [geoip-content country="US"] Content just for US visitors [/geoip-content] This will display “Content just for everyone in Texas and California” strictly for visitors from Texas and California. > [geoip-content region="TX, CA."] Content just for everyone in Texas and California [/geoip-content] You can mix and match geography and negative geography options to create verbose logic in a single shortcode: > [geoip-content country="US" not_city="Austin"]Content for US visitors but not for visitors in Austin[/geoip-content] #### Limitation There is a limitation in the logic that lets you filter content for multiple geographic areas. You can progressively limit the area that content is shown in. But once your content is hidden from an area, a subset of that area can't be added back in. For example, If I localize content so that it shows to all of Europe, then prevent my content from showing in Great Britain, I can't go back and show it to London. #### Creative Work Arounds Limit content to some regions of a country (or some cities of a state) ##### Example 1 You want to show an offer for free shipping to every state in the US *but* Alaska and Hawaii. You may be inclined to write something like *Instead of:* > [geoip-content country="US" not_state="AK, HI"]Lorem ipsum dolor sit amet[/geoip-content] *Show it to all 48 states:* > [geoip-content state="AL, AZ, AR, CA, CO, CT, DE, FL, GA, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY"]Free shipping on all orders over $50![/geoip-content] ##### Example 2 You want to show discount airfare on a flight to Paris, France. The content should show to all of the US and France, but not Paris itself. *Instead of:* > [geoip-content country="US, FR" not_city="Paris"]Fly to Paris for only $199![/geoip-content] The problem here is that Paris, Texas will be hidden. The solution? *Just have two geoip-content shortcodes:* > [geoip-content country="FR" not_city="Paris"]Fly to Paris for only $199![/geoip-content] > [geoip-content country="US"]Fly to Paris for only $199![/geoip-content] ##### Example 3 You want to show an ad written in Spanish to all of South America except for Brazil. Brasilia, however, has enough Spanish speakers that you want to include Brasilia. *Instead of:* > [geoip-content continent="SA" not_country="BR" city="Brasilia"]Lorem ipsum dolor sit amet[/geoip-content] *Just have two geoip-content shortcodes:* > [geoip-content continent="SA" not_country="BR"]Venta de la Navidad en los adaptadores USB[/geoip-content] > [geoip-content city="Brasilia"]Venta de la Navidad en los adaptadores USB[/geoip-content] ## Additional features ### Calculate distance between points You have a utility function that will calculate the distance from your provided lat/long coordinate to the visitor's location in either miles or kilometers. This can be useful for determining approximate distances, as results may be cached at the state or country level, depending on your configuration. #### Example ```php $latitude = 30.268246; $longitude = -97.745992; $geo = WPEngine\GeoIp::instance(); if ( false !== $geo->distance_to( $latitude, $longitude ) ) { $miles_to_wp_engine = $geo->distance_to( $latitude, $longitude ); } ``` ### Test pages from other locations You can use the following URL parameters to test how your localized content will appear to visitors from various geographic locations. You can add any of the parameters below to any URL of a page using the GeoTarget shortcodes or API calls: #### Examples Spoof visitor from the state of Texas: ```http https://yourdomain.com/?geoip&region=TX ``` Spoof visitor from the United States: ```http yourdomain.com/?geoip&country=US ``` Spoof visitor from Austin, Texas ```http yourdomain.com/?geoip&city=Austin ``` Spoof visitor from the U.S. zip code 78701: ```http yourdomain.com/?geoip&zip=78701 ``` ## Frequently Asked Questions 1. Will this work outside of the WP Engine hosting account? > No, this will only work within the WP Engine environment. This will not work for sites hosted on other web hosts. 2. Are there any other restrictions to using this plugin? > Yes. If you are signed into a Premium or Enterprise plan, you can use this plugin at no additional cost. If you are on another plan type and would like to use GeoTarget on one of your sites, you can add it to your plan [here](http://wpengine.com/plans/?utm_source=wpengine-geoip). For all plan types, just reach out to the [Support Team](https://my.wpengine.com/support) to enable GeoTarget for your site. > You can read our full GeoTarget activation guide [here](https://wpengine.com/support/geoip-personalizing-content-based-geography/). 3. What variables do I have access to? > Continent, country, state, city, zip, latitude, longitude. 4. How do I sign up for a WP Engine Account?: > That’s easy! [Signup here](http://wpengine.com/plans/?utm_source=wpengine-geoip). 5. I installed the plugin and used a shortcode or API call and it isn’t working. > Please contact the WP Engine [Support Team](https://my.wpengine.com/support). ## Contributing Running `make` from the repository root will download dependencies, lint, and test the plugin. `make build` will package the plugin as a zip and place it in the `/build` directory.

WordPress Themes & Plugins SEO Tools
52 Github Stars