|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////
( d8 {6 `' Z( q- W// Theme Option/ j4 d* |2 P- X9 A6 B0 D$ ?7 e
////////////////////////////////////////////////////////////////////////////////# c5 H0 W. e; \/ ?* A! a5 k& i
9 S) t1 J6 G. c/ t6 V
$themename = "Zenx";
6 B3 g. J/ g0 e9 {, N$shortname = str_replace(' ', '_', strtolower($themename));* o% S) v3 V. E5 F8 @
# t) q5 Y- J3 P5 I3 K f, A/ Bfunction get_theme_option($option)
$ R$ A. ~5 L3 l0 L' A{+ J8 G6 C$ `3 V; Q' {8 C
global $shortname;" }3 A* Y/ Z+ V$ @& w: n
return stripslashes(get_option($shortname . '_' . $option));% [ j5 c: h( X- c1 J
}# w0 D4 E1 j" o0 q( V
2 ?! {" |8 y7 y* y/ }% R
function get_theme_settings($option), E1 V* _' l1 [( l& E4 }5 J
{
9 @3 h( V0 _2 |& H: R return stripslashes(get_option($option));! Z3 E- s9 |3 @+ `$ ~5 b
}
+ y& @5 m& t: {% O$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
0 u+ V$ t0 ?# Z7 L$wp_getcat = array();' N2 d" N& P6 |+ t0 [
foreach ($wp_dropdown_rd_admin as $category_list) {) i! n; X! c* X X7 _
$wp_getcat[$category_list->term_id] = $category_list->name;) F: |9 ~; j3 a+ b; d. R
}: W- w- l' p' [0 [
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");: v. I1 R6 c+ U8 I
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
3 d. e: j" Y. O: Z5 j5 C. O$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
4 T# @1 ?. W/ C+ @( W
7 c+ H. Z3 L7 @$ v6 m- b$options = array (
! R2 @9 n8 c) g j+ }- G0 n; z' G% a& q- z3 G; E
/ J3 o, r5 ?2 _6 i6 f array( "name" => "Blog Header Settings",% V; ^- f5 v4 `# M; U( {
"type" => "heading",- R j: F' B# v7 f4 s$ K
),. t' o( X/ K3 E' n7 p
3 k, T: Q* `% Q, c: D7 V( g array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
X" n; o4 r2 a1 K8 W0 s, B "id" => $shortname."_header_logo_activate",
+ a+ p& l! A r1 x5 B) O "type" => "select",# U. A2 j8 ?) F* Y
"std" => "No",
3 H, x. T9 X* p: K "options" => array("No", "Yes"))," V) @5 M. M5 X6 [, A* K0 {$ m
7 N7 g$ Y' X# r& ?8 ^. f! |3 R3 t0 @
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
1 y8 n2 S* D, T "id" => $shortname."_logo_url",
$ A9 J& M3 p3 }' W J "type" => "text",! Y. I' D2 R; K3 {6 Q- U4 j
"box" => "social",9 S; f. r K/ n6 e
"std" => "",
" K2 _# y ]. N3 t ),
, Y% L0 {: ]1 B5 [# S; [
) b0 {1 d% G& y! s array( "name" => "Insert Header Banner HTML Code (Header)! M: z% `( [# c/ e6 y3 U
<br /><em>*Recommended Size 468 x 60</em>2 i) E( g+ p1 W" p% M" S
<br /><em>*leave blank if not use</em>",8 i: z. _2 I0 r3 o' j& Q
"id" => $shortname."_header_banner",7 G$ w) ~9 D3 V* m! J& O1 l
"type" => "textarea",# t4 B* z# Q& x8 u5 |$ ?4 t: j3 }
"std" => "",( s$ h s& p% P2 f/ w9 i- F
),
) Q$ w; N! P3 x( |8 g6 G( E$ z# N; p' l$ q9 }" F4 Q7 v
array( "name" => "</div></div>",
* j* X' W! S; h* { "type" => "close",
! K6 @1 O% P6 c t. X ), q% E, C+ S6 F5 M. G
% R0 U: X( ]! h2 e
( F/ q" e9 z" P- i; x( z; v3 `+ c array( "name" => "Header Navigation Settings",7 o' ]( o& V$ b) F% R1 Y5 a* A8 K
"type" => "heading",# l; u; ~1 d8 a, d4 a4 l& h# r
),
& W0 G9 ?& H( W. x; s+ j& J/ u) G4 V7 \: z6 ]3 u; s8 l
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
: \9 a4 U6 Z( v5 D0 v6 t <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
4 o0 A" Y T1 u( E; y) M' D% ^ <em>*Enter the page post ID number only</em><br />. q' x1 e& r* Q- E1 a
<em>*separate by comma</em><br />
4 K. N1 c |7 ?% _$ E <em>*Exclude pages which you don't want to show on the header navigation</em>",( i7 j' z5 Z# d& ^& v$ K% z
"id" => $shortname."_header_page_navigation",
/ _- H- ?$ e; J+ Y3 Z "type" => "text",5 Q Q/ h, P- w4 H$ ^- X
"std" => "",* D l* U9 M. A8 U( D: z' ]
),
' B7 I& H" A9 W/ `2 e+ \% G: m8 b0 {5 `
array( "name" => "</div></div>",3 k$ C1 K: i. G2 o0 n0 {' z$ K
"type" => "close",
6 s' Q- x9 P( a, b8 A& @ ),
" \- l. E3 E, h8 o3 R
0 \% d5 l* b0 n5 n( B9 \& z( a* g6 R% L. b/ B4 N% ~ B
array( "name" => "Post Auto Thumbnails Settings",
0 p0 {% w& z' E$ M3 a3 m* a% P "type" => "heading",) `/ `1 ? H, K5 I1 ?) s! ]5 |
),% W" v- V( K8 K* Z8 j
' R8 W0 {2 c+ ]- L array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",7 A5 n$ G. I/ G4 T; ~8 ^- I
"id" => $shortname."_timthumb_activate",
' b! S2 l+ y( X7 W5 E8 p9 a4 x/ a f8 y "type" => "select",. |1 j1 q9 Y& U' x4 X
"std" => "No",
+ u; v9 S6 K; l# W) O8 M* A6 y "options" => array("No", "Yes")),
6 [! W( {: V, U7 f# k & a7 X1 s% R1 S; Q; Y* J6 f7 m( b
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
7 B( d- B4 [- o" z+ x# _( r: `3 S "id" => $shortname."_timthumb_cropping",
$ M8 C: y7 M, R3 w( z; x( o* T* O "type" => "select",! f6 g0 q3 C3 B' L% I& p: U
"std" => "",' V6 ]# j' k- N; b9 G% Y- ~' y Z
"options" => $crop_position),/ M; a" J) f& C9 J! a4 @4 M& p
0 P' M& a! F8 o3 q: q2 J1 R array( "name" => "Insert Width Of Thumbnail Image<br />
( z3 m2 A5 e# O A; S <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />/ Y) G% i9 L& g: z; p
<em>*Leave Blank To Use Default: 250</em><br />",6 }: n6 x7 R7 ]5 L( P
"id" => $shortname."_thumb_width",
* Z; q7 Q" T: ~5 | "type" => "text",
* n3 M! V% k$ j; R9 K "std" => ""," ?: x9 y, H( {6 j, r( v
),
+ j4 q* g/ V: C n0 a2 v3 v) @5 U4 `% e" B/ V& o' J6 l9 M j
array( "name" => "Insert Height Of Thumbnail Image<br />3 z6 d9 u! {% M# m8 m0 H3 a
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />" @( S a, i; t
<em>*Leave Blank To Use Default: 200</em><br />",
8 P2 [0 c& D) s "id" => $shortname."_thumb_height",
: W+ ]6 W4 |9 k "type" => "text",
9 M3 {' [! d9 `) c/ g. h% E "std" => "",: a: v0 ?, r! X: t
),
+ L! A- E& `8 J
4 M7 [5 W4 P, n( {7 j( [$ @ array( "name" => "</div></div>",
3 i# D! [4 L4 g+ [! w' { "type" => "close",
g+ l* R1 m E k( z ),
& O+ u4 K3 a8 v# l1 F; |& k4 E0 [
+ ]( d L l5 j* b3 Y! O+ [# M6 _1 _9 N array( "name" => "Featured Content Slider Settings",
1 ?4 ?3 O& i% w2 m "type" => "heading",: d' W6 ? z! x+ A& \: P' C
),
. u& p- w* C7 u5 l9 s% B9 b: f) f5 b$ d$ v& }4 c
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",5 h8 T. i/ E$ }1 v
"id" => $shortname."_featured_activate",8 H. T6 P+ c$ S% C- I' c
"type" => "select",
! ]' x/ _. ^* g0 R! m "std" => "No",/ @2 C3 c/ g2 w+ b) l1 A: a0 Q
"options" => array("No", "Yes")),
$ i' |3 |( y6 ^% D/ y4 E8 s" B# Y) {
z$ w. ?+ K% `2 u( V1 P: `
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
2 A$ i3 K- }: ]' t "id" => $shortname."_featured_category",3 L }+ k9 P% q
"type" => "select",
^- n& j: c' D) S, L9 k+ C- i% O4 c "std" => "Choose a category:",
8 J w4 v5 _! o1 ] "options" => $wp_getcat),
) V [ I' ]/ @/ {, g$ X# }
, `: q+ ^3 @) d# O) g" l array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",) e2 A/ ~4 _$ X+ |4 T" p$ M
"id" => $shortname."_featured_number",
3 y5 }: `5 M5 q- v' g& @5 W "type" => "select",
& {) A V: ~5 K) y: b; T3 X "std" => "Number of post:",
6 ]. u$ k% J$ Q+ C "options" => $number_entries),
+ L6 ?# f7 j8 ^0 }* C
# R; [5 B( B/ s& Z$ j array( "name" => "</div></div>",5 B& F3 _& ^! O5 ]0 G, F
"type" => "close",
1 `# a7 ~- V5 q# q1 n' f9 K ),
" [4 b; z' f% x1 u/ l7 ^ ' D. O0 ?/ f, x) i1 K3 M5 l# v
array( "name" => "Featured Category Settings",4 x6 s' {* C5 H' P# v, v/ e7 `7 D
"type" => "heading",
( _* z8 G6 h! Q* `+ S7 @0 _5 p ),/ E, C3 b) t4 f7 O1 A+ n. [. g
3 e# N. W+ o2 F9 D2 A
array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
6 X' a; q! v1 |) o- O% ^ "id" => $shortname."_featured_category_activate",' t- }) T" t7 S9 L3 E6 b! W6 v1 |0 p
"type" => "select"," ^& A, \/ i" m/ u4 p
"std" => "No",
: @& I. X4 I% g9 t9 C0 ` "options" => array("No", "Yes")),) i. }( U. ]* n6 L8 H
9 k7 q9 v$ g4 N U3 n' q' h array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
@3 D# K+ ^1 e. ?/ Z "id" => $shortname."_featured_category_id1",
8 G/ p$ {. x( \ "type" => "select",) Y* i+ b# {1 f- |6 L6 z
"std" => "Choose a category:",
" ]- V; l7 _! `6 ?/ | "options" => $wp_getcat),9 L7 }3 a" X/ ?5 |% C
' h* o g8 ]$ C' @; o( W
array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",, I6 |# K# j3 r2 {* Z+ B+ ~
"id" => $shortname."_featured_number1",1 m7 C5 \8 W% { \* ^; I! G
"type" => "select",
( S7 p, x' O( L: ]$ e "std" => "Number of post:",% H" n; `2 G, @3 k: m0 c% K
"options" => $number_entries),
8 c( @1 x0 u/ A. H3 h7 Y * [# O' g' N7 U
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
1 _& I$ M k" m6 D. i8 a "id" => $shortname."_featured_category_id2",
w" |6 ]% h5 W. } "type" => "select",
G4 U3 q7 Z4 P. o; z; h( B "std" => "Choose a category:",; V T" r* U r! F, v5 i
"options" => $wp_getcat),! g7 M$ q7 z! C2 F; ]8 ]" s4 E
' y; P) W/ ]; Q2 \; f
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
. ^6 P) r6 a9 `/ B/ k6 _% G: X "id" => $shortname."_featured_number2",# N/ O# V6 E7 y- A, ~ k3 _; h& [0 V
"type" => "select",
- o$ {5 ~! w& ] Q% s7 R# b, D- E1 \( _ "std" => "Number of post:",
" B b2 |- q; P) C "options" => $number_entries),
1 B+ y4 T& `, q* \# V
! b$ {# ?3 a# x1 ] - @% V9 G/ i: m
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
6 A5 M) q6 h/ s- d8 ?( d4 _ "id" => $shortname."_featured_category_id3",
9 Z! n i( P/ M6 B "type" => "select",* {2 q! e h# Z% }! j! P+ ?
"std" => "Choose a category:",9 \9 s4 u3 k" s5 S' t
"options" => $wp_getcat),
$ H4 ^3 c: d4 S! w . h8 d. x W6 a% @
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
( `5 @0 k/ O' Y: c( S4 a* U "id" => $shortname."_featured_number3",
0 T6 B( l' V- l! D4 o y "type" => "select",
' I6 j1 V* Z Y" g0 F# r "std" => "Number of post:",
% h8 G: ^# R9 S7 N7 m/ N1 D1 V "options" => $number_entries)," L: M# w1 x* c& _% C8 |& g1 V
W# J2 g% D0 K; S4 B9 C1 E* i+ _( |; d
array( "name" => "</div></div>",
" z' ]. P+ c2 U% Q; q% p! V "type" => "close"," d5 }- n! T3 }1 d/ @8 v
),- w, |3 w! Y$ A
4 c. S8 ]. w, T3 m/ A) s- w
5 H1 g3 e9 [$ T% K+ w
array( "name" => "Google Adsense & Analytics Settings",$ o8 d, _& ]# M- N" U- K
"type" => "heading",
$ o' J, F1 `7 G" } W i# g ),# D& [) g( i5 j, y
9 R. x* M0 \8 U- c' A( `- L% m
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
8 \# M" t! P6 C- x. E( B "id" => $shortname."_adsense_loop_activate",9 D' f* C) f! x9 A7 H; J
"type" => "select",& {. W0 U/ l# N- l: O) q
"std" => "Disable",9 C$ S# F0 g5 }- y6 b
"options" => array("Disable", "Enable")),4 D6 V% D4 m* l+ N; ]: x% m6 D
2 X' k8 V% W& N: l3 h+ ~ array( "name" => "Insert Google Adsense Code For Loops Here<br />2 ~' w+ U: [& @- q# ^" W* H7 T5 q
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
1 t0 f( C( M1 i0 x6 N4 n "id" => $shortname."_adsense_loop",8 S/ L& M1 x7 \' y8 v
"type" => "textarea",8 W5 B' Z6 S8 w1 X
"std" => "",
; ?9 _3 j: ] {9 i* q: Q ),9 o. ?, A& ^" X& j4 e1 [
6 n6 k. N; p) S6 [ A4 R0 ^! r array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",; M% ^, G& G; r
"id" => $shortname."_adsense_single_activate"," a Q" Y( |6 {7 U* h+ d' C9 l
"type" => "select",# O$ f' P/ t; a3 ?2 }. s
"std" => "Disable",
2 F3 W( A0 g( z! l% K5 c8 e "options" => array("Disable", "Enable")),
! E, E. K/ ?; j9 t& G
8 X" I5 U5 ~/ c) r- j array( "name" => "Insert Google Adsense Code For Single Page Here<br />
- h3 J. B3 ?2 d/ I <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
2 g y# B- W9 v9 K2 Q "id" => $shortname."_adsense_single",, ^' ?9 t5 _/ ^
"type" => "textarea",
8 l$ a- d) O: X "std" => "",, R! g; b0 e1 L0 l' B
),
# q3 }' u0 o7 @8 e- |+ K e3 r, U2 S4 T
9 w/ j5 z" F! N4 k6 c
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
4 u; H3 A7 ^! G8 H "id" => $shortname."_google_analytics",, a. o3 A+ L1 T; a' p' ^
"type" => "textarea",1 X" G% b" O# N6 Z7 q8 S- J; G& P* p* s
"std" => "",& J+ |. v# O6 t: \
),
# o8 d4 D9 q4 d' [/ o; J
/ I& k; X% x2 E, w1 J array( "name" => "</div></div>",' _2 J/ ]1 J: @( e1 b ]
"type" => "close",& l F, F% {' ]2 T! `
),
7 B6 v) a( q' h" _# A) k% L$ c6 U7 Y 6 Q3 f3 t* p- j* \! V" {; x
2 c+ Y4 q# X& y0 d; ?9 F array( "name" => "AddThis Social Bookmarking Settings",. ^0 K2 f7 L- B z, Y
"type" => "heading",* v% E' H5 Q! t; z" e+ |& S7 o8 t
),' J1 L# i3 X3 A9 @! `
0 N7 K7 ?( s. Z4 t0 q9 C& ^' w1 \- @( e array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>% ~2 _7 w7 {6 r5 A( s4 g+ L
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",5 m6 ^4 X1 A+ v7 s7 O+ O
"id" => $shortname."_addthis",' r9 T7 B0 K# h) j' J2 Y. g
"type" => "text",) L9 h$ n' d5 b8 w/ @% Z
"box" => "social",
. ]1 x+ R' T# e$ ] "std" => "",0 v" `+ U4 m a& M) a
),4 m+ O7 g7 z4 q; C8 V0 G+ r. q
P7 k, {0 [# l8 `
array( "name" => "</div></div>",
- u5 |2 e, r+ L6 n3 x/ A "type" => "close",0 D: r" R' P1 b0 Z( _# @
),
7 c- i; p2 T" y7 o
4 G( \4 C( R7 l+ h , M) l4 T; J. y- @" S5 Y* y. n8 r$ p
( |" ^1 y* n2 n3 D0 ?! a* K: @
array( "name" => "YouTube Video Settings",
/ w8 a( _2 y3 Z7 e "type" => "heading",, ?) G4 b: \) x4 j$ T1 S& \) V
),4 a i* f7 ^: d- f3 R" j& [+ W( t- \' ~
3 Z' O- i" N, [" ` d/ H- p# U7 s0 c array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",* t% Y9 h4 p5 Q, z# v5 ]
"id" => $shortname."_emvideo_activate",
; h: d7 ^' W8 h9 s( X, F; i "type" => "select",
, B3 s& k2 }+ i- n "std" => "No",
3 I8 c; K/ R% d G( H% s: j) O* u "options" => array("No", "Yes")),3 c6 |# L1 ?& V
! F1 L/ Q( |6 J/ l5 d' C
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",
0 ~0 D" I N7 h/ a; | "id" => $shortname."_emvideo",
' R0 \& u4 Z- | "std" => "",3 Q! }: B, @1 v! I
"type" => "text"),
; E: N: _5 @4 `5 p$ `# e
3 T& T1 p ^ ^3 J$ H- Q$ V array( "name" => "</div></div>",( q" r) o3 c+ K9 z3 D5 Y, h' V2 j
"type" => "close",9 K `) G9 e6 [6 d1 @2 q9 ]( S- E
),
4 Z T% O) h' Q' v7 H4 f3 U 5 U5 W! `/ V! j9 ?! u, J; _
array( "name" => "Twitter Settings",; B- \4 R8 J5 a/ E
"type" => "heading",
- g S9 z, D# q ),* `9 s1 s1 h: |; Z" y) {3 C
+ |* H! ]' y8 E! n# A$ {3 U9 z; |& X$ s
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>", b0 G# p9 R" X
"id" => $shortname."_twitter_activate",
4 W9 p: K( D V6 p/ E "type" => "select",' o; L: v& h2 \) Q# {- F+ O
"std" => "No",
1 n! X. q( c/ \) @9 ^ "options" => array("No", "Yes")),/ V( j$ }& s7 U. P* h
: F1 F9 T6 k4 q% M array( "name" => "Insert Your Twitter ID here2 o5 r4 H! y- E+ X( h2 u$ P
<br /><em>*leave blank if not necessary</em>
7 t/ H8 D8 M, d8 {! L <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",0 f1 S% P2 M1 e9 Z. K+ J$ z% J- L
"id" => $shortname."_twitter",
9 ^% ^ I, n }* v "type" => "text",
" X( r) b5 z' Q6 X! F' ? "box" => "social",, L9 } A1 D2 j7 I1 o
"std" => "",
! w5 Z$ H; @) k m% M ),% _/ {+ H: a8 J0 i5 m
/ X7 J4 E- D) Q6 m$ n
array( "name" => "Enter Twitter Feed Count here
! U( i5 s" q& I <br /><em>*leave blank if not necessary</em>
# A# X! w: N4 g! b' C K <br /><em>*Enter How Many Twitter Feed To Display</em>",
( t7 g( }- `6 \ "id" => $shortname."_twitter_count",
4 o. Q' G. V: ~" u) d7 c3 q# J9 T "type" => "text",
Q5 U G! j$ ` a7 q( s% }6 c "box" => "social",
6 ], Z4 y A0 R; w8 `3 K7 j% O' ^ "std" => "",7 R% ]* X1 b8 ^ {6 M' e/ m
)," p9 |( c& R; W5 m3 z$ ~6 |7 l
5 f+ l, |* K' b+ _8 Q array( "name" => "</div></div>",
6 j2 M4 x5 |! x$ ~% @$ G! x2 s "type" => "close",
. _' o" h- c5 ^6 @; r6 ~5 ^: N8 ` ),3 d* @! r# o1 S' N- B9 [: R& z
2 y6 u8 W4 z' y
7 p3 \ Q+ m/ V; J7 B array( "name" => "125 x 125 Banners Advertisement Settings",
b! Z* m; R; n "type" => "heading",# I: C' W1 }. H
),' m+ S9 j& y# C9 W* C8 n+ M
; b" _, I5 Q- j3 p8 i$ H' ~0 l8 N. ` array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",2 \8 n6 \ `8 g" d/ _3 e
"id" => $shortname."_sponsor_activate",
' K' ~, p4 M5 w* n9 r/ Q" ^ "type" => "select",
9 n7 r5 T! X/ t7 ^$ z+ ~; B* D "std" => "No",
' V) ^7 R p* | "options" => array("No", "Yes")),
* R) `) s4 ~- B; b9 `& c6 w% w8 n" R( C
% \9 d6 }; Q) q1 _+ [; {2 x J1 s% l v
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",# x G' u* w4 q {: l8 Z
"id" => $shortname."_sponsor_banner_one",1 b& D+ |$ o$ M; C4 a) ]* @1 [" G( O
"type" => "textarea",% ^& U7 [3 v2 U
"std" => "",4 @* P1 S5 C- j$ w+ B+ ~ G8 I
), 3 L4 W: A/ c! M' i3 ?
3 v0 q; C7 {0 N! Q( y( e2 [( d
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",6 b% a4 l* m* {: v( n4 O0 k
"id" => $shortname."_sponsor_banner_two",! i$ G5 [, n! a" f! Y% Y
"type" => "textarea",+ Y7 N$ m+ r, m. @, E
"std" => "",0 e. K3 M" {# C
),
; |5 g. g! F K$ w. E* [- c% ~# l$ ^ Z7 \- ?0 `% n8 v
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",0 |! [' A: Q" e- w
"id" => $shortname."_sponsor_banner_three",
H$ u) B4 g' d# I$ d, w" V* f "type" => "textarea", \7 v5 o9 a3 f
"std" => "",
9 B; `4 v% w4 H7 i) B ),
9 ]- [; g$ j, J1 L+ n+ T4 H% d3 J+ W& q
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
, L7 h1 F, A; i: c; c "id" => $shortname."_sponsor_banner_four",4 M: A- B8 l3 ^9 {7 c
"type" => "textarea",
% z4 F, V& R* D "std" => "",- |9 g+ E3 x7 s
),( F9 y5 A! g7 P; |* q9 z4 E1 A* r
9 a# `' C0 w* s8 ]( ?( |4 L array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
, Z; ?8 H g3 z! S, o* y7 s "id" => $shortname."_sponsor_banner_five",
! s* A, r0 l: O2 a9 k: K "type" => "textarea",
; V% L7 z7 [# x( s) H' i& V) { "std" => "",
% y3 U: ~- f$ K. J& v9 l) l Z ),
. ^ d& m% V7 _2 T& c F( [
. v4 z( ?4 o6 d1 o8 S array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",# Y3 g( ]0 s( E8 S9 C
"id" => $shortname."_sponsor_banner_six",% l% l' E( D1 q
"type" => "textarea",: i1 D" i+ c8 F3 p ?4 \0 o
"std" => "",/ i' I5 v. e7 ]
),) Z6 m1 ^7 z6 |0 d8 a5 U
1 D8 {+ F' C$ P- s* T array( "name" => "</div></div>",
" E. H+ R0 z# a a5 b "type" => "close",
" F7 e' n2 ~2 H4 N4 b: H0 ] ),) V0 a, D. P, Z3 h2 x. ?
8 X$ m! _# y3 P" V, l( S$ x
2 c9 f. ?3 p- m" Q! N( W6 t( p& `* }
);
% W+ q1 Q0 g4 Y5 B& ~( r {
" Y. l) f! o4 m+ U _( hfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
) b- A7 S( R4 [+ H. q8 K4 E0 l+ O
echo "<div id=\"admin-options\"> ";
! l; C: E# w- h# t9 {2 I5 Q" K/ `! s! E! i; Q
global $themename, $shortname, $options;/ H, g8 f) R; X2 p; Z
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
& T0 }* p- R- v. g# I6 {% Fif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';6 ?& W, X# k* y
?>
: G$ @$ O" Q; _. w# k$ \. C9 _7 `! Z4 r0 c" R9 s1 O: v
<h4><?php echo "$themename"; ?> Theme Options</h4>
9 V$ [" s3 w5 x
" y2 m( D/ p ?: {2 w1 T<div class="annouce">; h" g: p+ t( ]6 h6 H
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>- P/ `2 u, h( ^3 m% A7 l
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>/ J! G" g9 [7 y
</div>
3 {* ~- F. j0 \1 N. x. C5 l- Z7 f1 Q! Z% e
<form action="" method="post">
0 p' ~- e+ b7 {* c7 H5 h" P0 k
* U! O+ N- c5 W) b7 ?6 U& L<?php foreach ($options as $value) { ?>8 ?7 a$ w, B& L1 D$ P6 v/ [8 [. R
- \. \/ R" m2 L( e<?php switch ( $value['type'] ) { case 'heading': ?>
/ c p# B* P) ^8 i
4 {, ?9 T0 r, m* A6 ^; J' I$ ?<div class="get-option">
" J& `# g+ O9 a
8 ?$ k8 {; e9 B0 j8 Q<h2><?php echo $value['name']; ?></h2>
$ p" a+ x: a! [9 u7 Z! k6 v& F* D$ R' M5 O3 s; m
<div class="option-save">! ?2 q1 x# N9 R: F5 ?3 K J
& t4 V9 ^, j6 H. F' v9 S& u<?php
; ^0 C! v, n9 @9 ]* Y! Dbreak;
" |3 H* t5 D2 Y7 W' o( M0 E* Dcase 'text':
4 ^! n" H% H/ W8 ?) E?>
6 q3 y1 k0 O2 S; \6 r4 |" s( e4 ^+ e! K* [" p% P3 W- T5 F! l) f
<div class="description"><?php echo $value['name']; ?></div>
9 m* t7 N# {6 O2 i( p<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
8 C. y, B' g. {, {7 O3 ]% @* y; h: w1 k' D
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
6 _0 a' |) W# K0 K
; l, P; g( K- ?, ~) H! p<?php! F2 Z6 X% P2 q1 Y' g
break;
+ W+ f* v6 Z) t! }case 'select':
" A: m: ]. n0 V" c9 R: b: q. E?>
; j! I$ M j: C) S7 ~3 k
. H0 y# A0 ]7 C, `! c) b<div class="description"><?php echo $value['name']; ?></div>- z+ w, b0 ?7 X
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">2 o% n+ t W! n
<?php foreach ($value['options'] as $option) { ?>
- n: \! O% B% X$ N<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option> A- Y2 D( A- u7 o! a4 p
<?php } ?>+ @4 ~$ M: O$ t. ^6 ?9 O: H9 q" {
</select>3 r# B3 A* x+ M9 ^
</p>5 \0 c6 N# [! t/ m4 g+ E
. T d+ X9 s/ \( @' l( F
<?php
' d- v$ S* \8 z) B2 S+ wbreak;3 M% S# H3 o5 N4 E% j9 p
case 'textarea':& y: g0 l1 _3 m2 \* W+ |8 u
$valuex = $value['id'];" p( X9 n! K0 ?5 k
$valuey = stripslashes($valuex);7 B1 F5 c$ R3 w5 f# S
$video_code = get_settings($valuey);
- u; x' [' N9 T" ??>( i' m/ ^7 V3 s# X
" f3 ^5 g* H* V7 b; F3 h<div class="description"><?php echo $value['name']; ?></div>8 G% ~4 @) C6 z* T8 w" x1 d( m
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
1 K; \8 J6 O Q/ s( F. E) v
( i& p2 G z6 L% ^1 Celse { echo $value['std']; } ?></textarea></p>
; E# i- A9 X: G/ s* {) g8 D% O0 K! J! O: Z+ h n) _3 _+ C
<?php7 Z( X* Y1 \7 Q6 t& Q1 Z. G# K: B( Q
break;1 {5 ?! q2 K0 N; p& V9 y
case 'close':
" v7 `' _8 l/ _4 n6 m5 ^6 s?>
- i0 {+ w9 V& x5 ], Y; R! `/ ?
! }4 d( I9 y" R1 O7 m, _1 U7 i. z' ^3 [<div class="clearfix"></div>' a p0 ~6 _: l" o. c3 J2 J" [
</div><!-- OPTION SAVE END -->
, w9 h4 H9 i8 z# d! x2 O
# h3 y! A8 n+ ~& F; U<div class="clearfix"></div>2 f4 c, ]( O1 G
</div><!-- GET OPTION END -->
9 Q9 k8 ~7 ]; t0 E
( m' l$ c* x% V<?php/ g; j9 W0 k3 }) O# h0 i3 E; c1 l
break;
! U$ C+ J3 r8 s& n8 D3 @default;
3 w* o" a& y6 O' {?>
( O5 y( I! C4 T& R( j" z& @- S' H# B6 ^) E0 _9 ~
0 S+ k5 S. q( ~' z. k" i2 r% b<?php
5 c& ~0 Z1 [. N9 h$ s% T& d( Y: R3 bbreak; } ?>& W- |- Z9 F0 Z+ F! } a
; l7 H0 Z% {* C) \
<?php } ?>7 z/ h8 Y( A. o0 J- R! @
6 u: h; b8 h/ E
<p class="save-p"># N6 [, z! p. m# \
<input name="save" type="submit" class="sbutton" value="Save Options" />1 e9 S7 n- R2 A& ~* E; O6 s
<input type="hidden" name="action" value="save" />" X: Y6 E) f/ v0 |, i2 X6 T
</p>
, V4 ]4 }+ b8 k2 b- C, Y</form>" z( K! o# c( ^1 w! Q
; ?/ Q( F# [1 P& g; i Y3 t
<form method="post">5 g X9 ^1 j/ Y" r" @& S
<p class="save-p">/ c3 g. q) x* ~# G4 O4 V
<input name="reset" type="submit" class="sbutton" value="Reset Options" />3 m) b' J, X/ ~* z
<input type="hidden" name="action" value="reset" />
- {$ Z% t% a& Y- c. ]( N</p>
) G$ G, N2 t' Y1 o</form>
. Z& {. I/ D( |& m1 ?- i' ~; j3 |3 A' w% v* m- W r
</div><!-- ADMIN OPTIONS END -->
, T' W. j# Y5 C% B# V* v
% m( S f0 G& A4 D5 J# [9 Q<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
; y* e" e {$ [6 O& b9 G& y9 T6 b. n2 M" P) L- ~2 e% g3 z
function mytheme_admin_register() {% c" }6 t6 H. Z
global $themename, $shortname, $options;
& x, F0 x# _, X: X& hif ( $_GET['page'] == basename(__FILE__) ) {
. x% Q Y0 b$ v/ E; B' @if ( 'save' == $_REQUEST['action'] ) {. {; u9 _; T) m" |
foreach ($options as $value) {9 d/ ]; e! u) b2 T4 C
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
: z) `, T$ k' {, g+ U9 P4 n9 L( bforeach ($options as $value) {$ s2 Y3 i2 e" z; x' ^( t' n
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
; N% U6 ~) }" O% }) h- Aheader("Location: themes.php?page=functions.php&saved=true");
6 h1 D$ O1 D" D7 z' B& [( tdie;8 F: P- `/ F! n1 |$ [
} else if( 'reset' == $_REQUEST['action'] ) {7 q& x- j: `" i b6 d: r, L; e/ G8 d+ w: e
foreach ($options as $value) {+ ?4 B! d- ~( U8 U G: K
delete_option( $value['id'] ); }
5 ?3 _) k0 `& k2 _: c* a) kheader("Location: themes.php?page=functions.php&reset=true");
, z3 L5 X7 p6 H9 fdie; X3 q( P5 `) w. _: m1 W
}5 J' p+ f5 I1 b6 J% W
}
! u: m1 Y% L3 M0 Radd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
- q# a8 o4 z B" B7 p2 R) N* e}- V( Y9 W" s! \3 O0 \* |
9 |* D" A8 u5 v" m; v
function mytheme_admin_head() { ?>
5 L, J- s v" y T: g<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />; h9 B. G, h5 W. }
<?php }( P1 J% d' j$ ]6 ^2 Q' b3 N
|
|