-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See pewresearch/pewresearch-org@067fc6d from refs/heads/main
- Loading branch information
1 parent
3f6634b
commit 0d7695b
Showing
2,371 changed files
with
1,010,377 additions
and
1,296 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"opts": { | ||
"template": "node_modules/wp-hookdoc/template", | ||
"destination": ".docs-built", | ||
"readme": "./README.md", | ||
"recurse": true, | ||
"tutorials": "./.docs/tutorials" | ||
}, | ||
"source": { | ||
"includePattern": ".+\\.(php|inc)?$" | ||
}, | ||
"plugins": [ | ||
"node_modules/wp-hookdoc/plugin", | ||
"plugins/markdown" | ||
], | ||
"markdown": { | ||
"idInHeadings": true | ||
}, | ||
"templates": { | ||
"default": { | ||
"layoutFile": ".docs/layout.tmpl" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title><?js= title ?> - PRC Platform Core Docs</title> | ||
|
||
<script src="scripts/prettify/prettify.js"> </script> | ||
<script src="scripts/prettify/lang-css.js"> </script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> | ||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> | ||
<link type="text/css" rel="stylesheet" href="style.css"> | ||
</head> | ||
|
||
<body<?js if (title === 'Home') { ?> class="home"<?js } ?>> | ||
|
||
<div id="main"> | ||
|
||
<?js if (title !== 'Home') { ?> | ||
<h1 class="page-title"><?js= title ?></h1> | ||
<?js } ?> | ||
|
||
<?js= content ?> | ||
|
||
<footer> | ||
<a href="https://platform.pewresearch.org/">platform.pewresearch.org</a> • | ||
<a href="https://github.com/pewresearch/">Pew Research Center on GitHub</a> | ||
</footer> | ||
|
||
|
||
</div> | ||
|
||
<nav> | ||
<?js= this.nav ?> | ||
</nav> | ||
|
||
<br class="clear"> | ||
|
||
<script> prettyPrint(); </script> | ||
<script src="scripts/linenumber.js"> </script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const sourceDir = path.join(__dirname, '../includes'); | ||
const targetDir = path.join(__dirname, '/tutorials'); | ||
|
||
fs.readdirSync(sourceDir).forEach(dir => { | ||
const sourceFile = path.join(sourceDir, dir, 'README.md'); | ||
const targetFile = path.join(targetDir, `${dir}.md`); | ||
|
||
if (fs.existsSync(sourceFile)) { | ||
fs.copyFileSync(sourceFile, targetFile); | ||
console.log(`Copied ${sourceFile} to ${targetFile}`); | ||
} | ||
}); | ||
|
||
console.log("Done! These files have been copied into .docs/tutorials for inclusion in the docs build."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
nav { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
nav h3:first-of-type, nav ul:first-of-type { | ||
order: 2; | ||
} | ||
|
||
nav h3:nth-of-type(2), nav ul:nth-of-type(2) { | ||
order: 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Block Area Modules | ||
|
||
This system is comprimised of two parts, the `Block Area` and the `Block Module`. Block Modules go into Block Areas, Block Areas are placed in the theme. Additionally a `Block Area Context Provider` is available to provide context of the Story Item ID's inside a Block Area to the primary `core/query` block on page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## PRC Platform Block Utils | ||
|
||
These should be primitive low level utilities, pass in some data get something different out the other end, quickly and effeciently. | ||
For every PHP util you create you MUST create an analogous JS util, for every JS util you create you MUST create an analogous PHP util. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# PRC Facets | ||
|
||
This plugin interfaces with FacetWP setting options, facet types, and handling rendering of facets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# PRC Multisite Migration "Collapse" | ||
|
||
This plugin handles the migration schema and mapping for the 2023 Pew Research Center multisite migration. We will be migratin 11 of 13 networks sites into one new network site. This new network site will be the canonical "pewresearch.org". | ||
|
||
Going forward these are the expected site ids and slug at launch: | ||
ID: `20` | ||
slug: `pewresearch-org` | ||
|
||
This class uses prc-distributor for handling its integration into 10up/distributor. | ||
10up/distributor is used for the network push infrastructure and relies heavily on the hooks and filters afforded to us. That class also establishes a post migration auto-push functionality that we will continue to use post migration for `decoded (18)`. | ||
|
||
## Version 2.0 | ||
This is now being re-tooled to update migrated content and to pull updates from the sources site into the migration site instead of push from the source sites onto the migration site. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Post Report Package | ||
|
||
Handles "Reports" packaging. Child posts "multi section" and "report materials" along with passing all this information down to child posts correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Staff Bylines System | ||
|
||
"Staff Bylines" provides a novel system for handling staff listing pages, staff/author pages, and byline and or acknowledgement attribution on posts; with hooks into Yoast and Parse.ly. Bylines are stored as a custom taxonomy, and staff are stored as a custom post type. This allows for a great deal of flexibility in how the data is used and displayed. | ||
|
||
See PRC-Block-Library for Gutenberg blocks that can be used to display staff bylines and provide staff listing pages via the `prc-block/staff-query` block. | ||
|
||
To access the data provided by the interfaces here in your theme, you can use the following functions: | ||
|
||
```php | ||
// Get the staff byline for a post | ||
$bylines = new Bylines($post_id); | ||
$bylines->format('string'); // Returns a simple string: "By Jane Doe, John Smith, and Jill Doe" | ||
$bylines->format('html'); // Returns a string of HTML: "By <a href="/staff/jane-doe/">Jane Doe</a>, <a href="/staff/john-smith/">John Smith</a>, and <a href="/staff/jill-doe/">Jill Doe</a>" | ||
$bylines->format('array'); // Returns an array of staff objects: [ { key: "jane-doe", termId: 123 }, { key: "john-smith", termId: 456 }, { key: "jill-doe", termId: 789 } ] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Term Data Store | ||
Create a one-to-one relationships between posts and terms and keep them in sync. | ||
Forked from 10up. | ||
This version includes stricter binding between post type and taxonomy utilizing term id and post id binding. | ||
|
||
## How to Use | ||
|
||
### 1. Register a custom post type: | ||
|
||
```php | ||
$post_type_name = 'show_pt'; | ||
$post_type_options = array(); | ||
|
||
register_post_type( | ||
$post_type_name, $post_type_options | ||
); | ||
``` | ||
|
||
### 2. Register a taxonomy: | ||
|
||
```php | ||
$taxonomy_name = 'show_tax'; | ||
$taxonomy_options = array(); | ||
$post_types = array( 'post' ); | ||
|
||
register_taxonomy( | ||
$taxonomy_name, $post_types, $taxonomy_options | ||
); | ||
``` | ||
|
||
### 3. Create the relationship between the post type and taxonomy: | ||
|
||
```php | ||
\TDS\add_relationship( $post_type_name, $taxonomy_name ); | ||
``` | ||
|
||
### 4. Create a post or term: | ||
|
||
Creating a post named "The Tick" in the post type will create a corresponding term named "The Tick" in the taxonomy. The reverse will happen if you create a term in the taxonomy. | ||
|
||
## Unit Tests | ||
|
||
TDS has a full suite of unit tests to verify expected behavior. To run them, you'll first need to install the composer dependencies: | ||
|
||
```sh | ||
composer update | ||
``` | ||
|
||
Once you have those installed, run phpunit: | ||
|
||
```sh | ||
vendor/bin/phpunit | ||
``` |
2 changes: 1 addition & 1 deletion
2
...hub/workflows/deploy-docs-to-gh-pages.yml → .github/workflows/on-deploy__build-docs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Hidden System Files | ||
[Tt]humbs.db | ||
[Dd]esktop.ini | ||
.DS_Store | ||
*.DS_store | ||
.DS_store? | ||
node_modules | ||
node_modules/ | ||
.sass-cache | ||
.npmrc | ||
|
||
# VS Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/launch.json | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Yarn v2 | ||
.pnp.* | ||
.yarn/* | ||
*.yarn/ | ||
*/*/.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# Testing | ||
artifacts/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# prc-platform-core | ||
Core data models, post types, taxonomies, and functionality for the Pew Research Center DXP. Streamline development and ensure consistency across projects with custom post types for research data, taxonomies for categorizing content, and utility functions. Use as a foundation for custom WordPress sites. | ||
# PRC Platform Core | ||
|
||
This plugin is intended to be installed in `/mu-plugins` or on WordPress VIP environments `/client-mu-plugins`. | ||
See docs... |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.