Custom Options -- %s]]> menu; AWP_admin::admin_panel($menu); } function awp_get_options($i){ $i['selects'][] = 'allow_custom'; return $i; } function get_custom($awpall){ global $id, $aWP; if(!is_array($aWP[custom_options][$id])){ $cable_ops = array('link_show_text','link_hide_text','link_embed_show_text','link_embed_hide_text','strip_html','strip_excerpt','hide_excerpt','paginate_mode','split_mode','max_words_para','afterpages','page_sep','afterpage','pagelinks','beforepage','beforepages','go_to_post','read_more'); $aWP_custom = get_post_meta($id, 'awpcustom',true); if($aWP[disabled_posts][$id] != 1 && $awpall['allow_custom'] == 'Enabled' && $aWP_custom['use_custom'] == 1 && isset($aWP_custom)){ foreach($cable_ops as $op){ $options[$op] = $aWP_custom[$op]; } $aWP[custom_options][$id] = $options; return array_merge($awpall, $aWP['custom_options'][$id]); }else{ return $awpall; } }else{ return array_merge($awpall, $aWP[custom_options][$id]); } } function update_custom(){ global $awpall, $id,$post,$aWP; if (!isset($id)) $id = $_REQUEST['post_ID']; if (isset($_REQUEST['awpcustom'])) { $awp_custom =$_REQUEST['awpcustom']; if($aWP[disabled_posts][$id] != $awp_custom['disable_awp']){ $aWP[disabled_posts][$id] = $awp_custom['disable_awp']; update_option('awp_disabled_posts',$aWP[disabled_posts]); } if($awpall['allow_custom'] == 'Enabled'){ $stored_custom = get_post_meta($id, 'awpcustom'); $checkboxes = array('strip_excerpt','strip_html','hide_excerpt'); foreach($checkboxes as $name){ if(!$awp_custom[$name]){ $awp_custom[$name] = 0; } } if($aWP[use_custom][$id] != $awp_custom['use_custom']){ $aWP[use_custom][$id] = $awp_custom['use_custom']; update_option('awp_use_custom',$aWP[use_custom]); } if(isset($stored_custom)){ update_post_meta($id, 'awpcustom', $awp_custom); }else{ add_post_meta($id, 'awpcustom', $awp_custom); } } } } function customUI(){ global $aWP, $awpall, $id,$post; require_once(ABSPATH . PLUGINDIR . '/'. AWP_BASE . '/xmlparser.php'); $marray = AWP::XML($menu); if(is_array($marray[menus])){ AWP_admin::admin_panel_menu($marray[menus][menu]); }elseif(is_array($marray[menu])){ AWP_admin::admin_panel_menu($marray[menu]); }elseif(is_array($marray[submenu])){ AWP_admin::admin_panel_sub($marray[submenu]); }elseif(is_array($marray[item])){ AWP_admin::admin_panel_item($marray[item]); } global $awpall; $id = $post->ID; $awp_custom = get_post_meta($id, 'awpcustom',true); if( $awp_custom['use_custom'] == 1){ $uc = 'checked="checked"'; }else{$awp_custom = $awpall;} ?>

Custom AWP options for this post