Comments (13)
@flowdee So sorry for not getting on this. We unhooked Subtitles from Slack and I'm playing cleanup right now. Let me roll out a fix for this and push a new version of the plugin tomorrow!
from subtitles.
@flowdee Perfect, thank you. Working on adjustments today and tomorrow. This is top of the list.
from subtitles.
Thanks so much. I'll let you know when the fix is live. Should be any day now, definitely this week.
from subtitles.
@flowdee Sorry for the late follow-up. Do you happen to have the specific PHP notice you're receiving and does it happen only when breadcrumbs in Yoast are turned on?
from subtitles.
Yes it only happens with enabled breadcrumbs.
[01-Apr-2018 08:56:51 UTC] PHP Notice: wp_seo_get_bc_title is <strong>deprecated</strong> since version WPSEO 5.8! Use wpseo_breadcrumb_single_link_info instead. in /wp-includes/functions.php on line 4090
from subtitles.
Happy to hear 👍
Right now I'm using a hook in all of my projects to prevent deprecated notices from showing up but of course this is only a temporary solution 😄
from subtitles.
Would you mind sharing your hook? I don't want to ruin your adjustments by pushing a wrong update to the plugin.
from subtitles.
add_filter( 'deprecated_hook_trigger_error', '__return_false' );
But it's hiding all deprecated notices, not only from your plugin. That's why I don't want to use it forever but right now it's better than a bloated log file 😄
from subtitles.
https://gist.github.com/robneu/7743769#gistcomment-2280213
from subtitles.
https://yoast.com/yoast-seo-5-8/
from subtitles.
https://wordpress.org/plugins/wordpress-seo/advanced/
from subtitles.
Working undocumented pseudocode. Will tidy this up tomorrow.
add_filter( 'wpseo_breadcrumb_single_link_info', array( &$this, 'plugin_compat_wordpress_seo_new' ) );
public function plugin_compat_wordpress_seo_new( $breadcrumb_text ) {
// check if in loop
$in_the_loop = (bool) in_the_loop();
if ( ! $in_the_loop ) {
return $breadcrumb_text;
}
// subtitle
$post_subtitle = get_the_subtitle(); // get subtitle
$post_subtitle_length = (int) strlen( $post_subtitle ); // get subtitle length
$post_subtitle_length_neg = -1 * $post_subtitle_length;
// title
$post_title = $breadcrumb_text['text']; // get post title
$post_title_length = (int) strlen( $post_title ); // get post title length
// remove subtitle from breadcrumb title
if ( ( $post_title == $post_subtitle ) || ( '' == $post_title ) ) {
return $breadcrumb_text;
}
$post_title = substr( $post_title, 0, $post_subtitle_length_neg );
$post_title = apply_filters( 'compat_wordpress_seo', $post_title );
$reconstructed_title = $post_title . $post_subtitle;
if ( $reconstructed_title == $breadcrumb_text['text'] ) {
$breadcrumb_text['text'] = $post_title;
return $breadcrumb_text;
}
return $breadcrumb_text;
}
from subtitles.
Noting that this will require a plugin version bump to 4.0.0.
from subtitles.
Related Issues (20)
- the_subtitle logic check HOT 2
- Subtitles on Portfolio HOT 4
- multiple subtitles HOT 1
- Feature Request: above OR below HOT 5
- Changing Font Size HOT 3
- Subtitle not shared on Facebook and co. HOT 3
- Maybe don't load CSS when 'subtitle_view_supported' filter is set to false HOT 1
- Gutenberg Support HOT 7
- Confirm bbPress Compatibility
- USER question re MarsEdit HOT 2
- Astra theme and comment title HOT 1
- Subtitles in custom page not showing HOT 6
- Not Showing Any More HOT 3
- Can't see subtitle box in Gutenberg HOT 1
- the_title echos both title and subtitle
- Option to keep HTML tags in subtitle fields
- Subtitle field not displaying on Page/Post add/edit form.
- Show subtitles in post loops HOT 2
- Examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subtitles.