Skip to content

Commit

Permalink
Merge branch 'release-v4.0.0' into release-4.0.0-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
olatechpro authored Dec 20, 2023
2 parents c1649a9 + 78a4b7f commit 62f3722
Show file tree
Hide file tree
Showing 26 changed files with 700 additions and 1,512 deletions.
679 changes: 388 additions & 291 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if (! defined('PP_LOADED')) {
if (! defined('PUBLISHPRESS_VERSION')) {
// Define constants
define('PUBLISHPRESS_VERSION', '4.0.0-rc');
define('PUBLISHPRESS_VERSION', '4.0.0');
define('PUBLISHPRESS_BASE_PATH', __DIR__);
define('PUBLISHPRESS_VIEWS_PATH', __DIR__ . '/views');
define('PUBLISHPRESS_FILE_PATH', PUBLISHPRESS_BASE_PATH . '/publishpress.php');
Expand Down
12 changes: 11 additions & 1 deletion lib/Notifications/Shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ protected function get_actor()
* - login
* - url
* - display_name
* - first_name
* - last_name
* - email
* - separator
*
Expand Down Expand Up @@ -185,6 +187,14 @@ private function get_user_field($user, $field, $attrs)
$result = $user->display_name;
break;

case 'first_name':
$result = $user->first_name;
break;

case 'last_name':
$result = $user->last_name;
break;

case 'email':
$result = $user->user_email;
break;
Expand Down Expand Up @@ -495,7 +505,7 @@ private function get_post_field($post, $field, $attrs)
if (!empty($rel_post) && !is_wp_error($rel_post)) {
$result = $this->get_post_field($rel_post, $meta_sub_field, $attrs);
}
} elseif ('meta-user' == $arr[0]) {
} elseif ('meta-user' == $arr[0] || strpos($meta_name, '_pp_editorial_meta_user') === 0) {
$rel_user = get_user_by('ID', (int)$meta);

if (!empty($rel_user) && !is_wp_error($rel_user)) {
Expand Down
27 changes: 13 additions & 14 deletions lib/composer.lock

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

18 changes: 0 additions & 18 deletions lib/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitPublishPressPlanner::getLoader();
Loading

0 comments on commit 62f3722

Please sign in to comment.