-
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@7eefe58 from refs/heads/release/5.0
- Loading branch information
1 parent
bc0dd64
commit f437180
Showing
55 changed files
with
19,130 additions
and
136 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
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,47 @@ | ||
# Interactive Island Trigger | ||
Contributors: Seth Rubenstein | ||
Tags: block | ||
Tested up to: 6.4 | ||
Stable tag: 0.1.0 | ||
License: GPL-2.0-or-later | ||
License URI: https://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Trigger an island's active status by click or by in viewport. | ||
|
||
## Description | ||
|
||
This is the long description. No limit, and you can use Markdown (as well as in the following sections). | ||
|
||
For backwards compatibility, if this section is missing, the full length of the short description will be used, and | ||
Markdown parsed. | ||
|
||
## Instructions | ||
|
||
This section describes how to use the block. | ||
|
||
## Frequently Asked Questions | ||
|
||
= A question that someone might have = | ||
|
||
An answer to that question. | ||
|
||
### What about foo bar? | ||
|
||
Answer to foo bar dilemma. | ||
|
||
## Screenshots | ||
|
||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). | ||
2. This is the second screen shot | ||
3. You can store screenshots in a .docs folder in this block directory... | ||
|
||
## Changelog | ||
|
||
= 0.1.0 = | ||
* Release | ||
|
||
## Developer Notes | ||
|
||
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated | ||
blocks where more information needs to be conveyed that doesn't fit into the categories of "description" or | ||
"installation." Arbitrary sections will be shown below the built-in sections outlined above. |
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
2 changes: 1 addition & 1 deletion
2
...social-native-share/build/index.asset.php → ...tive-island-trigger/build/index.asset.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 |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '5aa34ad7dfdcf6f7d977'); | ||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'd0c43635b099b048360a'); |
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 @@ | ||
.wp-block-prc-block-interactive-island-trigger.wp-block{background:inherit;color:inherit} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.wp-block-prc-block-interactive-island-trigger{background:inherit;color:inherit} |
48 changes: 48 additions & 0 deletions
48
blocks/interactive-island-trigger/interactive-island-trigger.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,48 @@ | ||
<?php | ||
namespace PRC\Platform\Blocks; | ||
|
||
/** | ||
* Block Name: Interactive Island Trigger | ||
* Description: Trigger an island's active status by click or by in viewport. | ||
* Requires at least: 6.4 | ||
* Requires PHP: 8.1 | ||
* Author: Seth Rubenstein | ||
* | ||
* @package prc-block | ||
*/ | ||
|
||
class interactive_island_trigger { | ||
public static $block_json = null; | ||
public static $version; | ||
public static $block_name; | ||
public static $dir = __DIR__; | ||
|
||
public function __construct($loader) { | ||
$block_json_file = PRC_BLOCK_LIBRARY_DIR . '/blocks/interactive-island-trigger/build/block.json'; | ||
self::$block_json = \wp_json_file_decode( $block_json_file, array( 'associative' => true ) ); | ||
self::$block_json['file'] = wp_normalize_path( realpath( $block_json_file ) ); | ||
self::$version = self::$block_json['version']; | ||
self::$block_name = self::$block_json['name']; | ||
$this->init($loader); | ||
} | ||
|
||
public function init($loader = null) { | ||
if ( null !== $loader ) { | ||
$loader->add_action('init', $this, 'block_init'); | ||
} | ||
} | ||
|
||
|
||
/** | ||
* Registers the block using the metadata loaded from the `block.json` file. | ||
* Behind the scenes, it registers also all assets so they can be enqueued | ||
* through the block editor in the corresponding context. | ||
* @hook init | ||
* | ||
* @see https://developer.wordpress.org/reference/functions/register_block_type/ | ||
*/ | ||
public function block_init() { | ||
register_block_type( self::$dir . '/build' ); | ||
} | ||
|
||
} |
Oops, something went wrong.