0

I am currently using "Wordpress Code Snippet" to add functionality to my code i insert into my posts.

The way this plugin works is that you add the code into the plugins library in the settings and then do something like [code: 1] (cant quite remember the exact syntax off the top of my head)

I'm not really too keen on its styling, so i'm hoping to use Google's Prettify. What implications would deactivating this plugin have? Would i lose all my code snippets? Would i have to go through every post and edit all the code snippets (ie. the [code: 1])?

1
  • have you looked through your database? Your code lives in there, I would of thought. It's likely this plugin has a nice, neat table you can just extract your code from.
    – Mild Fuzz
    Commented Feb 28, 2011 at 13:28

2 Answers 2

1

It looks like it is using shortcodes (square brackets with text in them), so if you deactivate the plugin you would end up with just the shortcode in your posts, they would no longer be converted into the snippet.

If you're worried about whether you'll lose your actual data that the plugin has saved, that is a question for the plugin author on the support forums.

0

Att first see in the code of the plugin for deactivation-hook or function delete_option() or ask the author of the plugin.

The function delete_option is a hint for a solution to delete the data; but i think, it is not so normaly, that the plugin delete the shortcode inside the content. If you deactivate the plugin, than is the shortcode only text inside your content and you must search/replace this shortcode with an new string or empty. You can do this with a Plugin Search & Replace or via the database tool, like phpMyAdmin or Adminer. Also you can write custom function for replace the shortcode with your own requirements or a empty string for dont see the shortcode in frontend.

For your requirement to use custom code inside content i use the plugin Snippet, this use Custom Post Type and it is easier to change data. But you habe the same problem, when you will replace the shortcode.

4
  • Suggestion: Improve readability by using some linebreaks, i stopped reading after the second line simply because there's no spacing.
    – t31os
    Commented Jul 29, 2011 at 13:15
  • Yes, you have right; but you stop after the second line- how do you read long posts or books?
    – bueltge
    Commented Aug 1, 2011 at 17:15
  • I didn't need to read the answer to know there was no spacing and in seeing no space, it put me off reading further. Adding that space has made all the difference imo, perhaps i'm just a picky old fool though... ;)
    – t31os
    Commented Aug 2, 2011 at 9:46
  • not a picky old guy - you have right ;) the form is also necessary for read content
    – bueltge
    Commented Aug 2, 2011 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.