array( '80x60' => '80x60', '100x75' => '100x75', '120x90' => '120x90', '160x120' => '160x120', '180x135' => '180x135', '240x180' => '240x180', '320x240' => '320x240', '560x420' => '560x420', '640x480' => '640x480', '800x600' => '800x600' ), '16:10' => array( '80x50' => '80x50', '120x75' => '120x75', '160x100' => '160x100', '200x125' => '200x125', '240x150' => '240x250', '320x200' => '320x200', '560x350' => '560x350', '640x400' => '640x400', '800x500' => '800x500' ) ); add_action('admin_menu', 'apercite_menu'); add_action('admin_menu', 'apercite_meta_box_add'); add_action('save_post', 'apercite_update'); add_action('wp', 'apercite_js'); add_action('wp_head', 'apercite_head_js'); add_action('wp_footer', 'apercite_footer'); if(!function_exists('apercite_js')) { function apercite_js() { $apercite_script_url = WP_PLUGIN_URL.'/apercite/js/apercite.js'; $apercite_script_file = WP_PLUGIN_DIR.'/apercite/js/apercite.js'; $apercite_style_url = WP_PLUGIN_URL.'/apercite/css/style.css'; $apercite_style_file = WP_PLUGIN_DIR.'/apercite/css/style.css'; if(file_exists($apercite_script_file)) { wp_enqueue_script('apercite', $apercite_script_url, array('jquery') ); } if(file_exists($apercite_style_file)) { wp_register_style('aperciteSteelsheets', $apercite_style_url); wp_enqueue_style( 'aperciteSteelsheets'); } } } if(!function_exists('apercite_head_js')) { function apercite_head_js() { $apercite_arr = get_option('apercite_params'); echo ''; } } if(!function_exists('apercite_footer')) { function apercite_footer() { global $apercite_uri; echo '
Générateur de miniatures
'; } } if(!function_exists('apercite_update')) { function apercite_update() { global $post_ID, $apercite_uri_update; if(!defined('APERCITE_UPDATE')) { define('APERCITE_UPDATE', true); if(empty($_POST['apercite_update'])) { return; } $apercite_arr = get_option('apercite_params'); if(empty($apercite_arr['apercite_login']) OR empty($apercite_arr['apercite_api_key'])) { return; } $javascript = $apercite_arr['apercite_javascript'] ? 'yes' : 'no'; $java = $apercite_arr['apercite_java'] ? 'yes' : 'no'; $post = get_post($post_ID); $post = $post->post_excerpt.$post->post_content; if(preg_match_all('#$v) { if(!empty($v)) { $update = true; if(!$apercite_arr['apercite_local_link']) { if(preg_match('#^'.$blog_url.'#', $v)) { $update = false; } } if($update && !in_array($v, $tab_uri)) { $tab_uri[] = $v; } } } foreach($tab_uri as $k=>$uri) { file_get_contents( sprintf( $apercite_uri_update, $apercite_arr['apercite_login'], $apercite_arr['apercite_api_key'], $javascript, $java, $uri ) ); } return true; } } } } if(!function_exists('apercite_meta_box_add')) { function apercite_meta_box_add() { // Check whether the 2.5 function add_meta_box exists before adding the meta box if(function_exists('add_meta_box')) { add_meta_box('apercite_post','Apercite','apercite_post','post','side','high'); add_meta_box('apercite_post','Apercite','apercite_post','page', 'side', 'high'); } } } if(!function_exists('apercite_post')) { function apercite_post() { ?>

$v) { $v = trim($v); if(!empty($v)) { $workers[] = stripslashes($v); } } } else { $workers = array(); } $apercite_arr['apercite_workers'] = serialize($workers); $apercite_arr['apercite_login'] = stripslashes(trim($_POST['apercite_login'])); $apercite_arr['apercite_api_key'] = stripslashes(trim($_POST['apercite_api_key'])); update_option('apercite_params', $apercite_arr); return $apercite_arr; } } if(!function_exists('apercite_options')) { function apercite_options() { global $apercite_sizes; if(isset($_POST['update_apercite_options']) && $_POST['update_apercite_options']) { $apercite_arr = apercite_update_options(); echo "
\n" . "

" . "" . 'Settings saved.' . "" . "

\n" . "
\n"; } else { $apercite_arr = get_option('apercite_params'); } echo '
'; echo '

' . __('Apercite Settings') . '

'; echo 'This page lets you configure the plugin Apercite.'.nl2br("\n\n"); echo '
'; if(function_exists('wp_nonce_field')) { wp_nonce_field('apercite_check'); } echo ''; ?>
General Settings


$v) { ?>

If you are member and that you have a subscription near the Apercite service,
you have the possibility of updating the miniatures since the interface of creation of article.

If you do not have yet subscription go to the following address : Subscriptions Apercite.

' . '' . '

'; } } if(!function_exists('combo_form')) { function combo_form($name, $options, $selected) { $rtn = ''; } } if(!function_exists('options_form')) { function options_form($options, $default) { $rtn = ''; foreach($options as $k=>$option) { $rtn .= '