Changeset 2168936
- Timestamp:
- 10/06/2019 06:31:55 AM (5 years ago)
- Location:
- curatewp-nested-posts/trunk
- Files:
-
- 5 added
- 11 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
curatewp-nested-posts/trunk/curatewp-nested-posts.php
r2123578 r2168936 5 5 Plugin URI: https://curatewp.com/ 6 6 Description: Display child posts within the current post, in a widget, and in your theme. 7 Version: 1. 0.17 Version: 1. 8 8 Author: JR Tashjian 9 9 Author URI: https://jrtashjian.com -
curatewp-nested-posts/trunk/includes/Core.php
r2066204 r2168936 108 108 wp_enqueue_style( 109 109 'cwpnp-layouts', 110 CWPNP_PLUGIN_URL . ' assets/dist/layouts.build.css',110 CWPNP_PLUGIN_URL . '.css', 111 111 array(), 112 112 CWPNP_VERSION … … 127 127 } 128 128 129 wp_register_style( 130 'cwpnp-block', 131 CWPNP_PLUGIN_URL . 'assets/dist/block.build.css', 132 array(), 133 CWPNP_VERSION 134 ); 129 $asset_file = include CWPNP_PLUGIN_DIR . '/build/index.asset.php'; 135 130 136 131 wp_register_script( 137 132 'cwpnp-block', 138 CWPNP_PLUGIN_URL . ' assets/dist/block.build.js',139 array( 'wp-blocks', 'wp-i18n', 'wp-components', 'wp-data', 'wp-editor', 'wp-element' ),140 CWPNP_VERSION,133 CWPNP_PLUGIN_URL . '.js', 134 , 135 , 141 136 true // Enqueue script in the footer. 142 137 ); … … 146 141 array( 147 142 'editor_script' => 'cwpnp-block', 148 'editor_style' => 'cwpnp-block',149 143 'attributes' => array( 150 144 'className' => array( 'type' => 'string' ), 151 145 'title' => array( 'type' => 'string' ), 152 146 'description' => array( 'type' => 'string' ), 153 'number' => array( 'type' => 'integer' ), 154 'orderby' => array( 'type' => 'string' ), 155 'order' => array( 'type' => 'string' ), 147 'number' => array( 148 'type' => 'integer', 149 'default' => 5, 150 ), 151 'orderby' => array( 152 'type' => 'string', 153 'default' => 'menu_order', 154 ), 155 'order' => array( 156 'type' => 'string', 157 'default' => '', 158 ), 156 159 ), 157 160 'render_callback' => array( get_called_class(), 'render_block_nested_posts' ), -
curatewp-nested-posts/trunk/includes/template-functions.php
r2123578 r2168936 101 101 102 102 <div class="<?php echo esc_attr( join( ' ', array_filter( $classes ) ) ); ?>"> 103 < div class="curatewp-section-header">104 < ?php if ( ! empty( $args['title'] ) ) : ?>103 <> 104 <> 105 105 <h3 class="curatewp-section-header__title"><?php echo esc_html( $args['title'] ); ?></h3> 106 <?php endif; ?>107 106 108 <?php if ( ! empty( $args['description'] ) ) : ?> 109 <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p> 110 <?php endif; ?> 111 </div> 112 113 <?php if ( ! empty( $nested_posts ) ) : ?> 114 <div class="curatewp-section-collection curatewp-section-collection--default"> 115 116 <?php foreach ( $nested_posts as $nested_post_id ) : ?> 117 <div <?php post_class( 'curatewp-card curatewp-card--wide curatewp-grid--whole', $nested_post_id ); ?>> 118 119 <?php 120 if ( has_post_thumbnail( $nested_post_id ) ) : 121 $curatewp_post_thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( $nested_post_id ) ); 122 ?> 123 <div class="curatewp-card__image" style="background-image:url(<?php echo esc_url( $curatewp_post_thumbnail_url ); ?>);"></div> 124 <?php endif; ?> 125 126 <div class="curatewp-card__content"> 127 <h4 class="curatewp-card__title"> 128 <a href="<?php the_permalink( $nested_post_id ); ?>"> 129 <?php echo esc_html( get_the_title( $nested_post_id ) ); ?> 130 </a> 131 </h4> 132 <div class="curatewp-card__date"> 133 <?php echo esc_html( get_the_date( '', $nested_post_id ) ); ?> 134 </div> 135 </div> 136 137 </div> 138 <?php endforeach; ?> 139 107 <?php if ( ! empty( $args['description'] ) ) : ?> 108 <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p> 109 <?php endif; ?> 140 110 </div> 141 111 <?php endif; ?> 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 142 140 </div> 143 141 -
curatewp-nested-posts/trunk/readme.txt
r2123578 r2168936 3 3 Tags: curatewp, curation, nested posts, child posts, navigation, engagement, gutenberg, block, shortcode 4 4 Requires at least: 4.9.8 5 Tested up to: 5.2. 25 Tested up to: 5.2. 6 6 Requires PHP: 5.6 7 Stable tag: 1. 0.17 Stable tag: 1. 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 35 35 == Changelog == 36 36 37 = 1.0.1 = 38 * Block no longer hangs on loading when no child posts are present. 39 * Disabled click events on links while editing a post. 40 * Added support for WP 5.2.2 41 42 = 1.0.0 = 43 * Initial release. 37 * The section title and description is deprecated within the block 38 * Added support for WP 5.2.3 39 * Added support for Gutenberg 6.6.0 -
curatewp-nested-posts/trunk/vendor/autoload.php
r2066204 r2168936 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 19f249042c97108a8ec495ee39923462::getLoader();7 return ComposerAutoloaderInit::getLoader(); -
curatewp-nested-posts/trunk/vendor/composer/autoload_real.php
r2066204 r2168936 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 19f249042c97108a8ec495ee399234625 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 19f249042c97108a8ec495ee39923462', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 19f249042c97108a8ec495ee39923462', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 19f249042c97108a8ec495ee39923462::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; -
curatewp-nested-posts/trunk/vendor/composer/autoload_static.php
r2066204 r2168936 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 19f249042c97108a8ec495ee399234627 class ComposerStaticInit 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 24 24 { 25 25 return \Closure::bind(function () use ($loader) { 26 $loader->prefixLengthsPsr4 = ComposerStaticInit 19f249042c97108a8ec495ee39923462::$prefixLengthsPsr4;27 $loader->prefixDirsPsr4 = ComposerStaticInit 19f249042c97108a8ec495ee39923462::$prefixDirsPsr4;26 $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4; 27 $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4; 28 28 29 29 }, null, ClassLoader::class);
Note: See TracChangeset
for help on using the changeset viewer.