I just had to disable this plugin. Here’s the error:
[18-Jan-2024 21:13:32 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: WP_Post - int in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php:400
Stack trace:
#0 /home/gh78lgt5yoiy/public_html/wp-includes/class-wp-hook.php(324): WP_Syntax::afterFilterContent()
#1 /home/gh78lgt5yoiy/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 /home/gh78lgt5yoiy/public_html/wp-content/themes/inventory-presser-theme/page-28.php(100): apply_filters()
#3 /home/gh78lgt5yoiy/public_html/wp-includes/template-loader.php(106): include('/home/gh78lgt5yoiy/p...')
#4 /home/gh78lgt5yoiy/public_html/wp-blog-header.php(19): require_once('/home/gh78lgt5yoiy/p...')
#5 /home/gh78lgt5yoiy/public_html/index.php(17): require('/home/gh78lgt5yoiy/p...')
#6 {main}
thrown in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 400
[18-Jan-2024 21:13:41 UTC] PHP Warning: Attempt to read property "ID" on null in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 395
Line 100 of page-28.php looks like this:
echo apply_filters( 'the_content', get_the_content( null, false, $page_id ) );
This is including the content of one page inside another. Not the best way to do things, I think this theme was written in 2015.
]]>The plugin does not style <pre> tags when using the 2024 theme with the latest WordPress version. I have it enabled, but nothing is styled at all.
]]>Hello everyone, I faced the problem of translating the side mini cart and buttons to another language, I use the polylang plugin and the shopimizer theme, I contacted the developers of this theme, they redirected me to the polylang support, I wrote to them but they do not give me an answer, so I read that the polylang plugin is developed, managed and supported by WP SYNTEX, I decided to write to you, maybe you can help me, I will attach screenshots where I can’t translate, thanks for the answer
https://drive.google.com/file/d/1vAZ3QIzl7F8EHo5J5nu_r2SCfmTuSkEQ/view?usp=sharing
https://drive.google.com/file/d/1uiwF_2fA9_CHBUPMMPXUKAiDqzcBXnSJ/view?usp=sharing
https://drive.google.com/file/d/1ozre-XZm2l2LdpinHRD674TKBagiEYJn/view?usp=sharing
https://drive.google.com/file/d/1DaNcGUmXPzGkXNrN2F0zaCEp1nimCg20/view?usp=sharing
Moving from PHP 7.4 to PHP 8.1 trigger this warning message
( ! ) Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in \wp-content\plugins\wp-syntax\wp-syntax.php on line 383
Solution:
Remove the ampersand before $match at the line 241
New 241 line:
public static function substituteToken( $match ) {
I’m planning to migrate my Drupal site to WordPress but wondering how can this plugin support a Drupal style of geshi highlighting.
In most example, to highlight a code, we need to use something like this:
<pre lang="php">
to highlight the code after that.
But in Drupal, I use this syntax (e.g. PHP code):
<php>
for Java I use:
<java>
So, is it possible to use this kind of initialization in WordPress using this plugin?
]]>Hi,
Are there any details of the closure and whatever potential vulnerabilities that may be contained inside? Are there exploits and where should affected users check for them?
]]>Hello! Please update the plugin for compatibility with WordPress 5.0 and add the ability to insert code using a Gutenberg block.
]]>Hi,
are you aware of https://sourceforge.net/p/geshi/bugs/247/?
/wp-content/plugins/wp-syntax/geshi/geshi.php on line 4751
Or have you already a fix for geshi.php?
Thank you!
Best regards,
]]>GeSHi 1.0.9.0
This release includes only bugfixes for proper support of PHP 7.
GeSHi 1.0.8.13
This release includes two minor bugfixes. It is also the last version to be compatible with PHP 4 and support for PHP 5.
I propose to use in the plugin GeSHi version 1.0.9.0 because WordPress recommend PHP version 7.2 or greater.
]]>When using WP syntax on a page that is split in multiple pages using nextpage
and WP syntax is used on every page then the code of WP syntax is loading the contents of the first page only.
For example consider having the following page:
Content
….
code using wp-syntax #1
….
code using wp-syntax #2
…
nextpage
….
code using wp-syntax #3
….
code using wp-syntax #4
…
code using wp-syntax #5
…
When the above is rendered, page #2 is showing
code using wp-syntax #1
code using wp-syntax #2
code using wp-syntax #5
Is this a bug?
]]>I don’t know if it just started with WP 4.8 but the syntax no longer appears in the RSS feed. Blog: https://blog.markheadrick.com/
The RSS Feed just has this now for the first post:
<pre lang="css">.mce-content-body p, p {
line-height: 1.714285714 !important;
}</pre>
The blog itself has all the inline CSS to color code it.
]]>The problem can be seen here https://wp-syntax.com/quickstart/ but it is more evident when there are more lines of code like in this example https://protostack.com.au/2009/08/atmega8-breadboard-circuit-part-3-of-3-the-firmware/
]]>i havent checked windows yet, but the larger fonts seem cramped & harder to read, not to mention more horizontal scrolling
of course, anyone can use their own css to adjust, the issue stems from what the OS loads as ‘monospace’
also, was not expecting an update 4 years later
]]>Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor
]]>Using HTML syntax highlighting and my <div>
tags have links to https://december.com/html/4/element/div.html
Why is this happening? Please remove this.
]]>Hello! Thanks for the great plugin, I use it for many years. Will you update the plugin?
In the WordPress repository displayed:
]]>This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress
I am trying to clean up PHP errors on our site, and I noticed that there are a lot of them being generated from your plugin.
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3429
PHP Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3481
PHP Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3626
PHP Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 2039
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 2411
PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Argument must be an array in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3365
PHP Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/wp-syntax/geshi/geshi.php on line 3388
PHP is of course very forgiving, so the plugin seems to be working okay. However all of these errors being generated are filling up my error logs, and php runs much slower when dealing with errors such as these.
I would love your attention in getting these issues patched up.
Thanks,
Matt
]]>hi,
I want to implement the following feature:
each post has an attachment (e.g. .txt). Tts content is displayed below each post and highlighted through WP-Syntax.
Pulling the file’s contents, reading it into a string and displaying it is no problem.
But I’m afraid I can’t run it through the WP-Syntax plugin if it’s outside the post or comments.
In the plugin’s code, there’s this filter-section which could have to do with my issue
// We want to run before other filters; hence, a priority of 0 was chosen.
// The lower the number, the higher the priority. 10 is the default and
// several formatting filters run at or around 6.
add_filter( 'the_content', array( __CLASS__, 'beforeFilter' ), 0);
add_filter( 'the_excerpt', array( __CLASS__, 'beforeFilter' ), 0);
add_filter( 'comment_text', array( __CLASS__, 'beforeFilter' ), 0);
add_filter( 'comment_text', array( __CLASS__, 'beforeFilter' ), 0);
My code for reading the files contents is in a template-file.
Can you add an additional filter so WP-Syntax also recognizes if theres
<pre lang="php"> [...] </pre>
written somewhere in the template’s code?
I’ve tried registering my own shortcodes but that also doesn’t run it through WP-Syntax.
I’ve also tried highlighting the code just by calling the included geshi.php, which worked.
But I would like to have it all parsed through the WP-Syntax plugin (all highlighted code looking the same)
I’m really thankful for any advice!
]]>hey , I am a wordpress developer and i am using the plugin wp-syntax but after activation of this plugin i am unable to upload the media files like featured images and other media content on the web site kindly check the plugin there are a lot of errors in this plugin conflicting plugin
]]>How to remove numbering and display toolbar on highlighted box
]]>Is there a way to get WP-Syntax to highlight code snippets entered with Markdown Extra style bracketing? E.g.
`python
import re
`
I’m using Jetpack for the markdown.
(I know it’s possible using <pre>
tags but I want to use the backticks for comptability with other scripts which render markdown).
Thanks!
https://en.support.wordpress.com/markdown/#markdown-extra-and-markdown-on-wordpress-com
]]>hi,
I’m using this and my java code are …. my xml code also ugly.
See this page:
https://geek-alpha.com/java/understand-dependency-injection/
why?
Hi,
if I put in a code some angle brackets ex.
./make 2>&1 | tee logname.log
it comes in the article replaced by HTML entities:
./make 2> ; &1 | tee nomeLog.log
]]>Hi,
I wanted to use the plugin with users who have the ROLE Author. But the plugin does not seem to work. When updating a post every <pre lang="php">somecode</pre>
will be transformed to <pre>somecode</pre>
.
When I give the user the ROLE Editor everything works fine.
If I use the following code:
pre lang=”xml” escaped=”true”><Biml xmlns="https://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="Hello World" ConstraintMode="Linear">
</Package>
</Packages>
</Biml>
Everything is left justified and the tabs are ignored. How do I preserve the spacing? I’ve tried using the code: to no avail.
]]>Hi,
Using the following WP-Syntax in a post I get different fonts on the iPhone Safari:
Things to do at the beginning: password change and Raspbian update:
<pre lang="text">$ passwd
$ sudo apt-get update</pre>
Type the following command to see your Raspbian version info:
<pre lang="text">$ uname -a
Linux raspberrypi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux</pre>
screenshot:
Theme: Responsive, Version 1.9.3.6
]]>Hi,
it would be cool if with this plugins also a TinyMce button would be provided.
Thanks…
]]>Hi,
Thanks for the great plugin. The one issue I’ve had is that the line highlighting of alternating lines of code goes out of sync with the actual text of the lines of code.
I’ve checked this with Chromium version 18.0.1025.151~r130497-0ubuntu1 and with a recent version of Firefox (I don’t have that version to hand but is likely version 11.0).
I’m using the twentyeleven theme in case that’s the issue.
I managed to fix the issue by changing the wp-syntax.css for “.wp-syntax td.code” from:
background-size : 1px 32px;
to:
background-size : 1px 31px;
So obviously my lines of text are one pixel short for some reason.
]]>Upon every plugin update I edit wp-config.php to make the plugin always display line numbers out of the box without me specifying any inline parameters.
I’m not sure what other options are available but for one I can think about the default language.
I think it’d be useful to provide a way to set global defaults. It could be as simple as enabling the user to create a config.php file in a directory so that the user could write some defines like define(‘ENABLE_LINE_NUMBERS’, true) to override default options.
Please consider the above. I think most people alway use a specific setting all the time and for those who don’t like the default option this would be a very neat feature.
Thanks,
Laci
I think that the recently introduced alternating background lines feature is the worst misfeature ever. It’s supposed to ease reading by leading the eyes across rows.
I totally get the concept but I really believe that it hurts the design very badly to the point that the disadvantage outweights the advantage. It’s not a coincidence that such feature is not implemented by most (popular) IDEs and by GitHub. Based on the forum posts I’m not the only one who doesn’t like it.
I’d like to suggest to:
Preferably yank this feature altogether. I’d be surprised to see anyone objecting but maybe I’m not right.
Not-so-preferably at least provide a way to easily disable this feature. It could be something as simple as providing an alternative stylesheet out of the box that could be copied as $theme_directory/wp-config.php which would override the default stylesheet. This would be useful for people like me who are not CSS wizards.
I’d love to hear user opinions about this issue.
Thanks,
Laci