-
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@8d27402 from refs/heads/release/5.0
- Loading branch information
1 parent
9dce46f
commit 3a7af2c
Showing
1,510 changed files
with
83,346 additions
and
1,752 deletions.
There are no files selected for viewing
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,11 @@ | ||
{ | ||
"name": "@pewresearch/prc-platform-XX", | ||
"description": "XX functionality for PRC Platform", | ||
"license": "GPL-2.0-or-later", | ||
"devDependencies": { | ||
"@wordpress/scripts": "^26.1.0" | ||
}, | ||
"scripts": { | ||
"build": "wp-scripts build src/index.js" | ||
} | ||
} |
117 changes: 117 additions & 0 deletions
117
includes/content-bootstrapper/class-content-bootstrapper.php
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,117 @@ | ||
<?php | ||
namespace PRC\Platform; | ||
use WP_Error; | ||
|
||
/** | ||
* Bootstraps content for PRC Platform development, if no data is present. | ||
*/ | ||
class Content_Bootstrapper { | ||
/** | ||
* The version of this plugin. | ||
* | ||
* @since 1.0.0 | ||
* @access private | ||
* @var string $version The current version of this plugin. | ||
*/ | ||
private $version; | ||
|
||
public static $handle = 'prc-platform-content-boostrapper'; | ||
|
||
/** | ||
* Initialize the class and set its properties. | ||
* | ||
* @since 1.0.0 | ||
* @param string $plugin_name The name of this plugin. | ||
* @param string $version The version of this plugin. | ||
*/ | ||
public function __construct( $version, $loader ) { | ||
$this->version = $version; | ||
$this->init($loader); | ||
} | ||
|
||
public function init( $loader = null ) { | ||
if ( !PRC_PLATFORM_TESTING_MODE ) { | ||
return; | ||
} | ||
if ( null !== $loader ) { | ||
// $loader->add_action('', $this, 'my_func'); | ||
// $loader->add_filter('', $this, 'my_func'); | ||
} | ||
} | ||
|
||
// Get the id of the first post of a given post type. | ||
// if the ID is 1, then we know that the post type is empty so update_option( 'prc_platform_content_bootstrapped', true ); and return true, otherwise return false. check for the option first, if it's true, then return true. | ||
public function detect_lack_of_content() { | ||
$option = get_option( 'prc_platform_content_bootstrapped' ); | ||
if ( true === $option ) { | ||
return true; | ||
} | ||
$posts = get_posts( array( | ||
'post_type' => 'post', | ||
'posts_per_page' => 1, | ||
) ); | ||
if ( empty( $posts ) ) { | ||
return true; | ||
} | ||
if ( 1 === $posts[0]->ID ) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
public function boostrap_content() { | ||
|
||
} | ||
|
||
public function create_sample_topics() { | ||
|
||
} | ||
|
||
public function create_sample_report() { | ||
|
||
} | ||
|
||
public function create_sample_fact_sheet() { | ||
|
||
} | ||
|
||
public function create_sample_short_read() { | ||
|
||
} | ||
|
||
public function create_sample_interactive() { | ||
|
||
} | ||
|
||
public function create_sample_quiz() { | ||
|
||
} | ||
|
||
public function create_sample_chart() { | ||
|
||
} | ||
|
||
public function create_sample_page() { | ||
|
||
} | ||
|
||
public function create_sample_staff() { | ||
|
||
} | ||
|
||
public function create_sample_homepage() { | ||
|
||
} | ||
|
||
public function create_sample_dataset() { | ||
|
||
} | ||
|
||
public function create_sample_block_module() { | ||
|
||
} | ||
|
||
public function configure_sample_options() { | ||
|
||
} | ||
} |
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
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
334 changes: 0 additions & 334 deletions
334
includes/interactives/legacy-containment-system/assets/style.css
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.