wpseo_title

Filter: 'wpseo_title' - Allow changing the Yoast SEO output.</p> </section> <section id="description"><h2>Description</h2><pre><div>apply_filters( <span class="tag">'wpseo_title'</span>, <span class="param">(unknown)</span> <a href="#" class="param" data-type="(unknown) " data-desc="The title." data-depr="" data-opt="" title="The title.">$title</a> ); </div></pre></section> <section id="params"><h2>Parameters <span class="count">(1)</span></h2><dl><dt> <span class="index">0.</span> <span class="param"> $title </span> <span class="type">(unknown)</span></dt><dd> The title.</dd></dl> </section><hr /> <section id="usage"><h2>Usage</h2><dl><dt>To run the hook, copy the example below.</dt><dd><pre><ol><li><div><span class="param">$title</span> = apply_filters( <span class="tag">'wpseo_title'</span>, <span class="param">$title</span> ); </div></li><li><div>  </div></li><li><div>if ( !empty( <span class="param">$title</span> ) ) { </div></li><li><div>  </div></li><li><div> <span class="comment">// everything has led up to this point...</span> </div></li><li><div>  </div></li><li><div>} </div></li><li><div>  </div></li></ol></pre></dd><dt>The following example is for adding a hook callback.</dt><dd><pre><ol><li><div><span class="comment">// define the wpseo_title callback</span> </div></li><li><div>function <span class="func">filter_wpseo_title</span>( <span class="param">$title</span> ) { </div></li><li><div> <span class="comment">// make filter magic happen here...</span> </div></li><li><div> return <span class="param">$title</span>; </div></li><li><div>}; </div></li><li><div>  </div></li><li><div><span class="comment">// add the filter</span> </div></li><li><div>add_filter( <span class="param">'wpseo_title'</span>, <span class="func">'filter_wpseo_title'</span>, <span class="priority">10</span>, <span class="params">1</span> ); </div></li></ol></pre></dd><dt>To remove a hook callback, use the example below.</dt><dd><pre><ol><li><div><span class="comment">// remove the filter</span> </div></li><li><div>remove_filter( <span class="param">'wpseo_title'</span>, <span class="func">'filter_wpseo_title'</span>, <span class="priority">10</span>, <span class="params">1</span> ); </div></li></ol></pre></dd></dl> </section><hr /> <section id="defined" class="source"><h2>Defined <span class="count">(4)</span></h2><p>The filter is defined in the following location(s).</p><dl><dt><strong><a href="http://hookr.io/plugins/yoast-seo/4.7.1/files/frontend-class-frontend/" class="file">/frontend/class-frontend.php <span> </span></a></strong></dt><dd><pre><ol data-line="576" class="liner" start="576"><li><div>return esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) ); </div></li></ol></pre></dd><dt><strong><a href="http://hookr.io/plugins/yoast-seo/4.7.1/files/admin-recalculate-class-recalculate-terms/" class="file">/admin/recalculate/class-recalculate-terms.php <span> </span></a></strong></dt><dd><pre><ol data-line="84" class="liner" start="84"><li><div>'pageTitle' => apply_filters( 'wpseo_title', wpseo_replace_vars( $title, $item, array( 'page' ) ) ), </div></li></ol></pre></dd><dt><strong><a href="http://hookr.io/plugins/yoast-seo/4.7.1/files/admin-recalculate-class-recalculate-posts/" class="file">/admin/recalculate/class-recalculate-posts.php <span> </span></a></strong></dt><dd><pre><ol data-line="83" class="liner" start="83"><li><div>'pageTitle' => apply_filters( 'wpseo_title', wpseo_replace_vars( $this->get_title( $item->ID, $item->post_type ), $item ) ), </div></li></ol></pre></dd><dt><strong><a href="http://hookr.io/plugins/yoast-seo/4.7.1/files/admin-class-meta-columns/" class="file">/admin/class-meta-columns.php <span> </span></a></strong></dt><dd><pre><ol data-line="95" class="liner" start="95"><li><div>echo esc_html( apply_filters( 'wpseo_title', wpseo_replace_vars( $this->page_title( $post_id ), get_post( $post_id, ARRAY_A ) ) ) ); </div></li></ol></pre></dd></dl> </section> </article></div><div id="sidebar"><ul class="widgets"><li> <a href="http://hookr.io/plugin/"><img src="http://hookr.io/wp-content/themes/hookr/assets/images/plugin-download.jpg" /></a></li><li id="versions"><dl><dt>Version(s)</dt><dd><dl><dt>Since</dt><dd> 4.4</dd><dt>Others</dt><dd><ul><li><a href="http://hookr.io/plugins/yoast-seo/4.7.1/filters/wpseo_title/" class="active">4.7.1</a></li><li><a href="http://hookr.io/plugins/yoast-seo/4.7/filters/wpseo_title/" class="">4.7</a></li><li><a href="http://hookr.io/plugins/yoast-seo/4.6/filters/wpseo_title/" class="">4.6</a></li><li><a href="http://hookr.io/plugins/yoast-seo/4.5/filters/wpseo_title/" class="">4.5</a></li><li><a href="http://hookr.io/plugins/yoast-seo/4.4/filters/wpseo_title/" class="">4.4</a></li></ul></dd></dl></dd></dl></li><li id="tags"><dl><dt>Tags</dt><dd><ul><li><span></span>plugin</li><li><span></span>filter</li><li><span></span>apply_filters</li><li><span></span>hook</li><li><span></span>Yoast SEO</li><li><span></span>4.7.1</li></ul></dd></dl></li></ul></div></div></div><script>Hookr.View.init();Hookr.Single.init();</script><footer><div><ul id="nav-social" class="pivot" role="navigation"><li id="twitter"><a href="http://twitter.com/hookr_io" title="Follow me!"></a></li></ul><div> © 2018 hookr.io <strong>(beta)</strong> | <a href="http://hookr.io/privacy/" title="Privacy">Privacy</a> | Proudly Powered by WordPress</div></div> </footer><script type="text/javascript" src="http://hookr.io/wp-content/cache/minify/000000/M9EvL9BNzU1KTdHLzcwDAA.js"></script><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','UA-49583310-1','hookr.io');ga('send','pageview');</script></body></html>