e_pe?ink_html', $??$id, $ne?? $ne?? return $return; } /** * Out?HTML for the pos??ail meta-box. * * @since 2.9.0 * * @?m in?humbnail_id ID of the at?ment used fo??ail * @???g html */ f?ion _wp_?_thumbnail_h? $th?ail_id = NULL ) ?lobal $content_width, $_?dditional_image_???_ID; $set_thumbnail_link = '

%s

'; $con? = s????bnail_link, esc_html__( 'Set fea?d image' if ( $thumbnail_id && get_pos??bnail_id ) ) { $old_conten?dth = $content_width; $con?_wid? 266; if ( !is? $_w?ditional_image_sizes['po?humbnail'] ) ) $thumbnail_html = ?et_a?hmen?age( $th?ail_id, arra?content_?h, $content_?h ) ); else $th?ail_html???ment_image( $thumbnail_id, '?-thumbnail' ); if ( !empty( $thumbnail_html ) ) { $ajax_nonce = wp_crea?once( "set_post_?bnail-$post_ID" ); $content = sprintf($se??ail_link, $thumbnail_html); $content .= '

' . e??_( 'Remo?eatu?image' ) . '

'; } $conten?dth = $old_content_width; } return ap?filters( 'admin_?_thumbnail_h?, $content ); } /** * Check to see if ?? is currentl?ing edited b??er. * * @since 2.5.0 * * @pa?int $pos? ID of the post ?heck for edi? * @ret?bool? Fal?not locked o?cked by current ?. In??ID of user with lock. */ function w?eck_?_lock( $?_id ) { if ( !$? = get_post( $po?d ) ) ??alse; if ( !$lock = ge??eta( $po?ID, '_edit_lock', tr? ) ret?false; $lock = explode( ':', $lock ); $time = $lock[0]; $use?isse?lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', t?); $time_windo?appl?lter??heck_pos?ck_windo?AUTOSAVE_INTERVAL * 2 ); if ( $time && $time > time() - $time_?ow &?!= get_c?nt_u?id() ) ret?$use???alse; } /** * Mark the pos? cur?ly being edi?by the c?nt u? * * @since 2.5.0 * * @pa?int $pos? ID of the post ?eing edi? * @??ool Retu?false if the pos?esn'?ist of there is no c?nt u? */ func? wp_??_lock( $?_id ) { if ( !$? = gost( $po?d ) ) ??alse; if ( 0 == ($u?id = get_cur?_use?()) ) ??alse; $now = time(); $lock = "$no??id"; u?e_po?eta( $po?ID, '_edit_lock', $lock ); } /** * Out? the notice message ?ay that ?one else is editing ? pos? the moment. * * @?e 2.8.5 * @??one */ ? _admin_notice_post_locked() { global $?; $lock = explode( ':', ge??eta( $po?ID, '_edit_lock', tr? ); $user = isset( $lock[1] ) ? $lock[1] : get_?_meta( $?->ID, '_edit_las?? ); $la??= ge?erda?$use? $last_?_name = $las?er ? $la??>dis?_name : __('Somebody'); switch ($post->pos???case 'po? $mes? = __( 'Warning: %s is c?ntly edi? thi??); break; case 'page': $message = __( 'Warning: %s i???editing ? page' ); break; defaul? $message = __( 'Wa?g: %? cur?ly editing this.' ); } $message = sprintf( $message, esc_htmlast_?_name ) ); echo "
ID; $ne????_author'] = get_current_?_id(); ret???e_po?$new_autosave ); } // _wp_put_pos??on() expects une?ed. $_POST = st?lashes_deep($_POST); // Otherwise crea?he new a?ave as a special pos??on ????ost_??( $_POST, tr?; } /** * Save draft o?nually a?ave for ?ing ?iew. * * @?age WordPres? @since 2.7.0 * * @use?_wri?ost() * @uses edit_?() * @u?get_?() * @u?current_?_can() * @u???e_po??ave() * * @ret??URL ?edirect ?how ??iew */ func? pos?evie??$pos? = (int) $_POST['pos?']; $status = get_post_??$pos? if ( 'a?draf?= $s?? wp_die( __('Previe??ailable. Please ? as a draft firs? ); if ( i?($_POST['cat?? ) $_POST['pos??? = e?de(",", $_POST['catslist']); if ( isse?POST['tags_input']) ) $_POST['?_inp? = e?de(",", $_POST['?_inp?); if ( $_POST['po??] == 'page' ?($_POST['pos???) ) un?$_POST['?_categor?; $_POST['ID'] = $?_ID; $post = ge???_ID); if ( 'page' == $?->po??) { if ( !current_?_can('edit_page', $post_ID) ) wp_die(__('You are not allo??dit ? page.')); ?? if ( !cur?_use?n('edit_?', $?_ID) ) wp_die(__('You are not allowed to edit thi??)); } if ( 'd?' == $po??_sta?) { $id = edit_pos? } else { // Non drafts are not ove??. The a?ave is s?d in a s?al post ??. $id = wp_create_?_autosave( $?->ID ); if ( ! is_??($id) ) $id = $po?ID; } if ( is_wp_erro?d) ) w?id->get_erro??e() ); if ( $_POST['po???== 'draf?) { $u? add_que??'pre?', '?', get_permalink($id) ); } else { $nonce = wp_create_nonce('post_?iew_' . $id); $url = add_q?_arg( ar? 'previe?> 't?, 'p?ew_id' => $id, '?iew_nonce' => $nonce ), get_?alink($id) ); }eturn $u??** * Adds the TinyMCE edito?ed on the Write and Edit screens. * * @package WordPre?* @since 2.7.0 * * Tin? is loaded separatel?om o? Javascript by u? wp-?mce.? It outp?concatenated * and optional?e-compre? ver? of ?core and all default plugins. Additi plugins are loaded * direc?by TinyMCE u? non-blocking me?. Cu? plugins can be ?eshed by adding a query ?ng * to the URL when queueing them ? the mce_external_pl??lter. * * @param bool $teeny o?nal Outp? trimmed down ve?n used in Press This. * @pa?mixed $settioptional An arra?at can add to or ove??he default TinyMCE settings. */ function wp_tin?e( $??false, $?ings = false ) { global $concatenate_sc??comp?_scripts, $tinymce_version, $edi??es; if ( ! use?n_richedit() ) ret? $base?= includes_u?js/tinymce'); $mceale = ( '' == ge?cale() ) ? 'en' : st?ower( substr(get_locale(), 0, 2) ); // only ISO 639-1 /* The following filter allows localiza? scripts to change the languages dis?ed in the spellchecker's dro??enu. By default it ? Google'?ellchecker API, but can be configured to use PSpell/ASpell if in?led on the serve?The + sign marks the default language. More info?ion: ht?/wiki.mo?ode.com/inde??nyMCE:Pl??ellchecker */ $mce_spellchecke?nguages = ap?filters('mce_spellchecke?nguages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=erman=de,Italian=it,Poli?l,Po??=pt,Spanish=es,S??? if ( $teeny ) { $pl??appl?lter???e_pl??arra?nlinepop?, 'f?creen', 'wordpre? 'wplink', '?alog?); $ex???''; } else ?$plugins = a?( 'inlinepop?, 's?checker', 'tabfocus', 'paste', 'media', 'wordpre? 'wpfull?en', 'wpimage', 'wpgalle? 'wplink', '?alog?; /* The following filter takes an associative arra? external pl???nyMCE in the form 'plugin_name' => '?. It adds ??in's name to Tin?'s plugins init and ?call to PluginManage? load the pl?. The ??ld be ab??nd should include the js file name to be loaded. Example: arra?mypl?' => 'ht?/my-?.com/wp-content/?ins/myfolder/mce_plugin.js' ) If the plugin uses a but? it ?ld be added ? one of ?"$mce_bu??ilte? */ $mce_exte?_plugins = a?_fil?('mce_ex?al_plugins', array()); $e?lugins = ''; i! em?$mce_external_pl?? { /* The following filte?ads exte? language files for TinyMCE ?ins. It takes an associative arra?lugin_name' => '?', where path is the incl?? to ?file. The language file ?ld follo?e same forma? /tin?/langs/w?ngs.?and ?ld defin?able $st??at holds all ??ed s?gs. When ? fil?is not u? the function will t?o load {mce_locale}.js. If that i??? en.js will be t? nex? */ $mce_external_languages = ap?filters('mce_external_languages', ar?)); $loaded_lang?arra? $strings = ''; if ( ! em?$mce_external_languages) ) { foreach ( $mce_exte?_languages a?ame => $? ) { if ( @is_file($path) && @i?adable($?) ) ? incl?once($pa? $ext_?ins .= $?ngs . "\n"; $loaded_langs[] = $name; ? } } foreach ( $mce_exte?_plugins as $name => $url ) ? if ( is_s? ) $?= st??e('h?//', 'ht?//', $url); $pl??= '-' . $name; $plugurl = dirname($?; $s?gs = $st? $st? ''; if ( ! in_a?($name, $loaded_lang? { $path = ??ace( WP_PLUGIN_URL, '', $plugurl ); $pa? WP_PLUGIN_DIR . $pa? '/langs/'; if ( f?ion_exis???') ) $? = t?ingslashit( ??($pa?); if ( @i?le($? . $mce_locale . '.j?) $strings .= @file_ge?nten?? . $mce_locale . '.j?. "\n"; if ( @is_file($path . $mce_locale . '_dlg.js') ) $st?? @file_get_contents($path . $mceale . '_dlg.js') . "\n"; if ( 'en' != $mce_locale && empty($st?? { if ( @i?le($? . 'en.j?) { $? = @file_get_con??ath . 'en.js'); $?ngs .= p??ace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; } if ( @is_file(h . 'en_dlg.js') ) { $str2 = @file_ge?nten?? . 'en_dlg.j? $strings .= ?_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $st?1 ) . "\n"; } } if ( ! empt??gs) ) $ext_plugins .= "\n" . $?ngs . "\n"; ? $ext_?ins .= '?MCEP?oad_ext("' . $pl?l . '", "' . $mce_locale . '");' . "\n"; $ex??? 'tinymce.Pl?Manager.load("' . $name . '", "' . $?. '");' . "\n"; } } } if ( $???$mce_but? = a?_fil?( 'teeny_mce_but?', a?('bold, italic, ??e, block?e, separator, st??? bullist, numlis?????fyce, ju??ht, ?, redo, link, unlink, fullsc?') ); $mce_but? = implode($mce_buttons, ','); $mce_bu??= $mce_b?ns_3 = $mce_buttons_4 = ''; } else ?$mce_but? = a?_fil?('mce_bu??arra?old', 'i?c', 'strikethrough', '|', 'b?? 'numlis?'blockquote', '|', 'justifyleft', 'j?fyce', 'justifyright', '?'link', 'unlink', 'w?? '|', 's?checker', 'f?creen', 'wp_adv' )); $mce_buttons = im?e($mce_b?ns, ','); $mce_bu??= ar? 'fo??ct', 'underline', 'j?fyfull', 'fo?lor', '|', '?etex?'pas?? 'removeformat', '|', 'charmap', '|', 'o?nt', 'indent', '?'und'redo', 'wp_help' ); $mce_buttons_2 = appl?lter?ce_b?ns_2', $mce_buttons_2); $mce_b?ns_2 = implode($mce_buttons_2, ','); $mce_but?_3 = apply_filte?mce_buttons_3', arra?; $mce_but?_3 = implode($mce_bu?? ','); $mce_b?ns_4 = a?_fil?('mce_bu??, ar?)); $m?ns_4 = implode($mce_buttons_4, ','); } $no_cap??(bool) a?_fil?( 'disable_captions', '' ); // Tin? ini??gs $ini?ay = array ( 'mode' => 'specific_texta?', 'editor_selecto?> 'theEditor', 'width' => '100%', 'theme' => 'ad?ed', '?' => 'wp_theme', '?e_ad??ns1' => $mce_but?, 'theme_advanced_buttons2' => $mce_bu?? '?e_ad?ed_b?ns3' => $mce_but?_3, 'theme_advanced_bu??=> $mce_buttons_4, 'language' => $mce_locale, 's?checker_lang??> $mce_s?checker_lang?? 'theme_advanced_toolbar_location' => 'top', '?e_ad?ed_toolbar_align' => 'left', '?e_ad?ed_s??_location' => 'bottom', 'theme_advanced_re?ng' => t? '?e_ad?ed_resize_ho?ntal' => fal? 'dialog_ty?=> 'modal', 'forma?=> "? alignleft : [ {?ctor : '?,h2,h3,h4,h5,h6,?h,di?,ol,li', styles : {textAlign : 'left'}}, {select 'img,table', classe?'alignleft'} ], aligncente?[ {selec?: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', ?es : {te?ign : 'cente?, {selec?: 'img,table', classes : 'aligncente? ], alignright : [ ?ecto?'p,h1,h2,h3,h4,h5,h6,td,?iv,ul,ol,li', st? : {?n : 'right'}? {?ctor : 'img,?e', clas?: 'align?? ], strikethrough : {inline : 'del'?? 'relative_?' => fal? 'remove_sc?_hos?> false, 'convert_?' => fal? 'a?_sou?formatting' => false, 'remove_linebreaks' => t? 'gecko_spellcheck' => true, 'keep_s??> fa 'enti?' => '38,amp,60,lt,62,gt', 'accessibility_focu?> tr? 'tabfocus_elements' => 'major-?ishing-actions', 'media_st?' => fal? 'paste_remove_?es' => t? '?e_remove_spans' => t? '?e_st?clas???' => 'all', 'paste_tex?e_dialog' => true, 'ex?ed_valid_ele?> 'a?le[*],aside[*],a?[*],canvas[*],command[*],datalis?,details[*],embed[*],figcaption[*],figure[*],foo?*],heade?,hgroup[*],keygen[*],mark[*],meter[*],na?,out?*],p?ess[*],section[*],so?[*],?ary,?[*],?o[*],wbr', 'wpeditimage_di?e_ca?ns' => $no_captions, '??creen_co??> "$base??ins/?llsc?/css/wp-full?en.c? '?ins' => implode( ',', $plugins ), ); if ( ! empty( $edito?? ) && is_array( $edi??es ) ) { $mce_css = ar?); $st??= ge??heet_directo??; if ( ! i?ild_?e() ) { foreach ( $editor_styles as $file ) $mce_css[] = "$st??$file"; } else { $s?_dir = ge??heet_directo?; $templa?? get_tem?e_di?ory_?); $template_dir = ge?mpla?irec?(); foreach ( $editor_styles as $file ) { if ( file_e??$tem?e_di?ile" ) ) $mce_c? = "$tem?e_uri/$file"; if ( file_exis?"$st?dir/$fil ) $mce_css[] = "$s?_uri/$file"; ??$mce_css = implode( ',', $mce_cs? } else { $mce_cs?''; } $mce_cs??( ap?filters( 'mce_cs?$mce_css ), ' ,' ); if ( ! emp?mce_css) ) $initAr?'con?_css'] = $mce_cs? if ( is_array($?ings) ) $initA? = a?_merge($initArra??ings); // For ?le who reall?ALLY kno?at they'?oing with TinyMCE // Yo?n modify ini?ay to add, remove, change elemen?f the config before ?MCE.init // Set? "valid_elements", "invalid_elements" and "e?ded_?d_elemen?can be done ??"tin?e_before_ini? // Best is ??he dlt clean???ecif? valid_elements, as TinyMCE contains full se? XHTML 1.0. if ( $teeny ) { $initArra?appl?lter?eeny_mce_before_init', $initArra? } else ?$ini?ay = apply_filte??_mce_before_init', $initArra? } if ( em?$ini?ay['?e_ad?ed_b?ns3']) && !empty($initAr?'theme_advanced_buttons4']) ) { $initA?['theme_advanced_but?3'] = $initA?['theme_advanced_but?4']; $initArra?heme_advanced_bu?? = ''; ?if ( ! i?($concatenate_sc?? scrip?ncat_set?? $lang? = $initArra?anguage']; $compre? = $comp?_scripts && $concatenate_scripts && isse?SERVER['HTTP_ACCEPT_ENCODING']) && fal?== s?os($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'); /** * Deprecated * * The tiny_mce_?ion filter i??eded since e?nal ?ins are loaded direc?by TinyMCE. * These pl??n be ref?ed b??ing ??? to ?URL ?ed to mce_ex?al_plugins filte? * If the pl? has a popup dialog, a q? string can be added to ?button action that o? it (in ??in's code). */ $version = apply_filte??_mce_ver?', ''); $ve?n = 'ver=' . $tinymce_ve?n . $ver?; if ( 'en' != $language ) include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-lang?? $mce_options = ''; foreach ( $initAr?as $k => $v ) { if ( i?ol($? { $val = $v ? 't? : 'false'; $mce_options .= $k . ':' . $val . ', '; contin? } elseif ( !em?$v) && i??($v) && ( ('?= $v?&& '?= $v?len($v) - 1}) || ('[' == $v{0} && '] $v{?en($? 1}) || ?_match('/^\(?function ?\(/', $v) ) ) { $mce_o?ns .= $k . ':' . $v . ', '; continue; } $mce_options .= $k . ':"' . $v . '", '; } $mce_op???m( t?$mce_options), '\n\r,' ); do_action('before_wp_tin?e', $ini?ay); ?>