Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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])?

share|improve this question
    
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 Feb 28 '11 at 13:28

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
Suggestion: Improve readability by using some linebreaks, i stopped reading after the second line simply because there's no spacing. –  t31os Jul 29 '11 at 13:15
    
Yes, you have right; but you stop after the second line- how do you read long posts or books? –  bueltge Aug 1 '11 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 Aug 2 '11 at 9:46
    
not a picky old guy - you have right ;) the form is also necessary for read content –  bueltge Aug 2 '11 at 19:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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