PluginProbe
Code Embed / 2.1.2
Code Embed v2.1.2
2.6.4 2.6.3 2.6.2 2.6.1 trunk 1.0 1.1 1.2 1.3 1.4.1 1.5.1 1.6.1 2.0.2 2.1.2 2.2.2 2.3.9 2.4 2.5.1 2.5.2 2.6
← All changes | simple-code-embed.php +44 -20 1.32.1.2 View file →
@@ -1,21 +1,45 @@
1 -<?php
2 -/*
3 -Plugin Name: Simple Code Embed
4 -Plugin URI: http://www.artiss.co.uk/simple-code-embed
5 -Description: Allows you to embed code into your posts & pages
6 -Version: 1.3
7 -Author: David Artiss
8 -Author URI: http://www.artiss.co.uk
9 -*/
10 -add_filter('the_content','simple_code_embed');
11 -function simple_code_embed($content) {
12 - global $post;
13 - $loop=1;
14 - while ($loop<21) {
15 - $html=get_post_meta($post->ID,"CODE".$loop,false);
16 - $content=str_replace("%CODE".$loop."%",$html[0],$content);
17 - $loop++;
18 - }
19 - return $content;
20 -}
1 +<?php
2 +/*
3 +Plugin Name: Code Embed
4 +Plugin URI: https://wordpress.org/plugins/simple-code-embed/
5 +Description: Allows you to embed code into your posts & pages
6 +Version: 2.1.2
7 +Author: David Artiss
8 +Author URI: http://www.artiss.co.uk
9 +Text Domain: simple-embed-code
10 +*/
11 +
12 +/**
13 +* Artiss Code Embed
14 +*
15 +* Embed code into a post
16 +*
17 +* @package Artiss-Code-Embed
18 +* @since 1.6
19 +*/
20 +
21 +define( 'artiss_code_embed_version', '2.1.2' );
22 +
23 +function ace_load_plugin_textdomain() {
24 + load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );
25 +}
26 +add_action( 'init', 'ace_load_plugin_textdomain' );
27 +
28 +$functions_dir = WP_PLUGIN_DIR . '/simple-embed-code/includes/';
29 +
30 +// Include all the various functions
31 +
32 +include_once( $functions_dir . 'ace-get-options.php' ); // Get the default options
33 +
34 +if ( is_admin() ) {
35 +
36 + include_once( $functions_dir . 'ace-admin-config.php' ); // Various administration config. options
37 +
38 +} else {
39 +
40 + include_once( $functions_dir . 'ace-add-scripts.php' ); // Add scripts to the main theme
41 +
42 + include_once( $functions_dir . 'ace-filter.php' ); // Filter to apply code embeds
43 +
44 +}
21 45 ?>