Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ Thumbs.db
web/wp-content/plugins/speakers-block/node_modules
!web/wp-content/plugins/speakers-block-2
web/wp-content/plugins/speakers-block-2/node_modules
!web/wp-content/plugins/sponsor-directory-block
web/wp-content/plugins/sponsor-directory-block/node_modules
!web/wp-content/plugins/sponsors-dynamic-block
web/wp-content/plugins/sponsors-dynamic-block/node_modules
!web/wp-content/plugins/text-on-image-block
Expand Down
1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<file>./web/wp-content/plugins/pricing-block/</file>
<file>./web/wp-content/plugins/speakers-block/</file>
<file>./web/wp-content/plugins/speakers-block-2/</file>
<file>./web/wp-content/plugins/sponsor-directory-block/</file>
<file>./web/wp-content/plugins/sponsors-dynamic-block/</file>
<file>./web/wp-content/plugins/tab-container-block/</file>
<file>./web/wp-content/plugins/text-on-image-block/</file>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ public function speaker_custom_column( $columns ) {
*/
public function sponsor_custom_column_data( $column, $post_id ) {
switch ( $column ) {
case 'sponsor_id':
echo esc_html( $post_id );
break;
case 'sponsor_logo':
echo has_post_thumbnail( $post_id ) ? '<span class="dashicons dashicons-yes-alt" style="color:green"></span>' : '<span class="dashicons dashicons-no-alt" style="color:red"></span>';
break;
Expand All @@ -471,6 +474,7 @@ public function sponsor_custom_column( $columns ) {
unset( $columns['date'] );
unset( $columns['author'] );
// add new columns.
$columns['sponsor_id'] = 'Post ID';
$columns['sponsor_logo'] = 'Sponsor Logo';
$columns['forwarding_url'] = 'Forwarding URL';
$columns['alt_text'] = 'Alternative Display Name';
Expand Down
51 changes: 51 additions & 0 deletions web/wp-content/plugins/sponsor-directory-block/build/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "lf/sponsor-directory",
"version": "0.1.0",
"title": "Sponsor Directory",
"category": "common",
"icon": "groups",
"description": "Import and display a filterable sponsor directory from a published Google Sheet.",
"keywords": [
"sponsors",
"directory",
"google sheets"
],
"supports": {
"anchor": true,
"html": false,
"align": [
"wide",
"full"
]
},
"attributes": {
"csvUrl": {
"type": "string",
"default": ""
},
"sponsors": {
"type": "array",
"default": []
},
"importedAt": {
"type": "string",
"default": ""
},
"importReport": {
"type": "object",
"default": {
"matchedCount": 0,
"skippedCount": 0,
"skipped": [],
"warnings": []
}
}
},
"textdomain": "sponsor-directory-block",
"editorScript": "file:./index.js",
"viewScript": "file:./view.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'f032c622b87dbe352d8e');

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions web/wp-content/plugins/sponsor-directory-block/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'ebd6531e3a4e30d5494b');

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading