Changeset 2168926
- Timestamp:
- 10/06/2019 06:16:38 AM (5 years ago)
- Location:
- curatewp-related-posts/trunk
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
curatewp-related-posts/trunk/curatewp-related-posts.php
r2123583 r2168926 5 5 Plugin URI: https://curatewp.com/ 6 6 Description: Display related 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-related-posts/trunk/includes/Core.php
r2063444 r2168926 108 108 wp_enqueue_style( 109 109 'cwprp-layouts', 110 CWPRP_PLUGIN_URL . ' assets/dist/layouts.build.css',110 CWPRP_PLUGIN_URL . '.css', 111 111 array(), 112 112 CWPRP_VERSION … … 127 127 } 128 128 129 wp_register_style( 130 'cwprp-block', 131 CWPRP_PLUGIN_URL . 'assets/dist/block.build.css', 132 array(), 133 CWPRP_VERSION 134 ); 129 $asset_file = include CWPRP_PLUGIN_DIR . '/build/index.asset.php'; 135 130 136 131 wp_register_script( 137 132 'cwprp-block', 138 CWPRP_PLUGIN_URL . ' assets/dist/block.build.js',139 array( 'wp-blocks', 'wp-i18n', 'wp-components', 'wp-data', 'wp-editor', 'wp-element' ),140 CWPRP_VERSION,133 CWPRP_PLUGIN_URL . '.js', 134 , 135 , 141 136 true // Enqueue script in the footer. 142 137 ); … … 151 146 'title' => array( 'type' => 'string' ), 152 147 'description' => array( 'type' => 'string' ), 153 'in_category' => array( 'type' => 'boolean' ), 154 'in_tag' => array( 'type' => 'boolean' ), 155 'number' => array( 'type' => 'integer' ), 156 'orderby' => array( 'type' => 'string' ), 157 'order' => array( 'type' => 'string' ), 148 'in_category' => array( 149 'type' => 'boolean', 150 'default' => true, 151 ), 152 'in_tag' => array( 153 'type' => 'boolean', 154 'default' => false, 155 ), 156 'number' => array( 157 'type' => 'integer', 158 'default' => 5, 159 ), 160 'orderby' => array( 161 'type' => 'string', 162 'default' => 'rand', 163 ), 164 'order' => array( 165 'type' => 'string', 166 'default' => '', 167 ), 158 168 ), 159 169 'render_callback' => array( get_called_class(), 'render_block_related_posts' ), -
curatewp-related-posts/trunk/includes/template-functions.php
r2123583 r2168926 110 110 111 111 <div class="<?php echo esc_attr( join( ' ', array_filter( $classes ) ) ); ?>"> 112 < div class="curatewp-section-header">113 < ?php if ( ! empty( $args['title'] ) ) : ?>112 <> 113 <> 114 114 <h3 class="curatewp-section-header__title"><?php echo esc_html( $args['title'] ); ?></h3> 115 <?php endif; ?>116 115 117 <?php if ( ! empty( $args['description'] ) ) : ?> 118 <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p> 119 <?php endif; ?> 120 </div> 121 122 <?php if ( ! empty( $related_posts ) ) : ?> 123 <div class="curatewp-section-collection curatewp-section-collection--default"> 124 125 <?php foreach ( $related_posts as $related_post_id ) : ?> 126 <div <?php post_class( 'curatewp-card curatewp-card--wide curatewp-grid--whole', $related_post_id ); ?>> 127 128 <?php 129 if ( has_post_thumbnail( $related_post_id ) ) : 130 $curatewp_post_thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( $related_post_id ) ); 131 ?> 132 <div class="curatewp-card__image" style="background-image:url(<?php echo esc_url( $curatewp_post_thumbnail_url ); ?>);"></div> 133 <?php endif; ?> 134 135 <div class="curatewp-card__content"> 136 <h4 class="curatewp-card__title"> 137 <a href="<?php the_permalink( $related_post_id ); ?>"> 138 <?php echo esc_html( get_the_title( $related_post_id ) ); ?> 139 </a> 140 </h4> 141 <div class="curatewp-card__date"> 142 <?php echo esc_html( get_the_date( '', $related_post_id ) ); ?> 143 </div> 144 </div> 145 146 </div> 147 <?php endforeach; ?> 148 116 <?php if ( ! empty( $args['description'] ) ) : ?> 117 <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p> 118 <?php endif; ?> 149 119 </div> 150 120 <?php endif; ?> 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 151 149 </div> 152 150 -
curatewp-related-posts/trunk/readme.txt
r2123583 r2168926 3 3 Tags: curatewp, curation, related, related posts, related content, recommended, engagement, similar, similar posts, 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 related posts are found. 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-related-posts/trunk/vendor/autoload.php
r2063444 r2168926 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 40f7e0e5fbc93216b93f32e637f29cf8::getLoader();7 return ComposerAutoloaderInit::getLoader(); -
curatewp-related-posts/trunk/vendor/composer/autoload_real.php
r2063444 r2168926 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 40f7e0e5fbc93216b93f32e637f29cf85 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 40f7e0e5fbc93216b93f32e637f29cf8', '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 40f7e0e5fbc93216b93f32e637f29cf8', '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 40f7e0e5fbc93216b93f32e637f29cf8::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; -
curatewp-related-posts/trunk/vendor/composer/autoload_static.php
r2063444 r2168926 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 40f7e0e5fbc93216b93f32e637f29cf87 class ComposerStaticInit 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 24 24 { 25 25 return \Closure::bind(function () use ($loader) { 26 $loader->prefixLengthsPsr4 = ComposerStaticInit 40f7e0e5fbc93216b93f32e637f29cf8::$prefixLengthsPsr4;27 $loader->prefixDirsPsr4 = ComposerStaticInit 40f7e0e5fbc93216b93f32e637f29cf8::$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.