Skip to content

Commit

Permalink
YOLO
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwelcher committed Feb 16, 2024
1 parent fc890ee commit 65d1f9f
Show file tree
Hide file tree
Showing 90 changed files with 76,256 additions and 15,266 deletions.
7 changes: 5 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@


function mytheme_enqueue_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style(
'parent-style',
get_template_directory_uri() . '/style.css'
);
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
array( 'parent-style' )
);
}
11 changes: 4 additions & 7 deletions plugins/bring-me-your-issues/src/post-picker/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Button,
SelectControl,
TextControl,
ComboboxControl,
} from '@wordpress/components';
import { createBlock } from '@wordpress/blocks';
import { useDispatch, useSelect } from '@wordpress/data';
Expand Down Expand Up @@ -44,19 +43,17 @@ export default function Edit( { clientId } ) {

// Get the available post types
const postTypes = useSelect( ( select ) =>
select( coreStore ) //'core'
.getPostTypes()
?.filter( ( { viewable } ) => viewable )
.map( ( { slug } ) => {
return { label: slug, value: slug };
} )
select( 'core' ).getPostTypes()
);

// Query the posts
const { records } = useEntityRecords( 'postType', postType, {
per_page: 30,
search: searchTerm,
} );

console.log( records );

return (
<div { ...useBlockProps() }>
<InnerBlocks
Expand Down
1 change: 0 additions & 1 deletion plugins/bring-me-your-issues/src/post-placeholder/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { useEntityRecord } from '@wordpress/core-data';
import './editor.scss';

export default function Edit( { attributes: { id, postType } } ) {
console.log( id, postType );
const { record, isResolving } = useEntityRecord( 'postType', postType, id );

return (
Expand Down
7 changes: 3 additions & 4 deletions plugins/bring-me-your-issues/src/post-placeholder/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
/**
* Front end
*/

?>
<div <?php echo wp_kses_data( get_block_wrapper_attributes() ); ?>>
<h2>
<?php
echo wp_kses_post( get_the_title( $attributes['id'] ) );
?>
<a href="<?php echo esc_attr( get_the_permalink( $attributes['id'] ) ); ?>">
<?php echo wp_kses_post( get_the_title( $attributes['id'] ) ); ?>
</a>
</h2>
</div>
18 changes: 18 additions & 0 deletions plugins/deprecations/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2
30 changes: 30 additions & 0 deletions plugins/deprecations/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory used by tools like istanbul
coverage

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of `npm pack`
*.tgz

# Output of `wp-scripts plugin-zip`
*.zip

# dotenv environment variables file
.env
30 changes: 30 additions & 0 deletions plugins/deprecations/deprecations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Plugin Name: Deprecations
* Description: Example block scaffolded with Create Block tool.
* Requires at least: 6.1
* Requires PHP: 7.0
* Version: 0.1.0
* Author: The WordPress Contributors
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: deprecations
*
* @package create-block
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* 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.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
function deprecations_deprecations_block_init() {
register_block_type( __DIR__ . '/build' );
}
add_action( 'init', 'deprecations_deprecations_block_init' );
Loading

0 comments on commit 65d1f9f

Please sign in to comment.