|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////& r5 G& m7 r( I
// Theme Option
8 ^# \; I- D2 x& \3 t3 ]5 L5 \////////////////////////////////////////////////////////////////////////////////* j! |9 r( g0 |. t; Y
2 f- p: d1 o1 k+ K0 Q) r" ?/ I) f" s
$themename = "Zenx";" q* F1 z% x; e* v
$shortname = str_replace(' ', '_', strtolower($themename));9 T) n+ [3 F4 ^
2 S0 P( K) A0 V6 ?function get_theme_option($option)
6 H; h0 A& l" F* n{0 e5 o. t" z9 t( Z3 z
global $shortname;
, e: K, H' {0 \& T" H' C l( K4 ? return stripslashes(get_option($shortname . '_' . $option));
) K6 w5 p+ h! J/ G* |7 `, T}! m) e2 D/ Z# R3 @. _7 n; ^3 s
6 H0 @: r ] q3 C8 gfunction get_theme_settings($option)
/ U+ |, S, m& R% \; S6 S{: L: j* Q- J, X& Y; _) |# d; H
return stripslashes(get_option($option));/ D4 `8 ?# C* ]4 Q `; `7 _% ^
}, a& \2 \6 v, s$ P- \
$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");8 }$ X; W5 P6 c& x! A1 a
$wp_getcat = array();
+ x/ A) c9 F6 d5 r6 {$ Uforeach ($wp_dropdown_rd_admin as $category_list) {6 @0 e. W* d1 Z k" Y" e
$wp_getcat[$category_list->term_id] = $category_list->name; Z/ P: `7 m, \7 C; s. y
}
" |' X i* q( D+ ]$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");* l4 d$ t8 W; Z4 G: p* x3 F, y
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");0 W% L6 q3 B, }1 Q7 i+ n. p; K( j
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");, O% A5 k. K: Z# P6 ]; u
; K3 g# r: J2 C) o
$options = array (+ f5 ~: R( @, s/ }! w5 M9 W
) l: A! h7 X8 \( F8 g i1 L2 [. v7 Z1 ?
array( "name" => "Blog Header Settings",
1 i5 t6 g9 p& t; d- X: c1 e "type" => "heading",/ q. e/ T3 A) S) _1 ^, B N
),
2 \7 i- B2 Q) T: v2 |
3 @& S" D Q" Z array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
" e6 ]6 U; A5 l& Z1 v "id" => $shortname."_header_logo_activate",
) M+ s) v8 o. w! P8 o9 Q "type" => "select",1 i- ^/ B9 ~8 O
"std" => "No",9 N; \0 h( F; Z3 a" {& J4 u9 J
"options" => array("No", "Yes")),
% r0 x/ d Q% f6 b. y; u, D+ ? N4 z4 j. V. G1 v& F
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",1 ]# K" ^! K) ]6 p* r2 U9 i; J, Y
"id" => $shortname."_logo_url",; n/ f9 Q/ A3 N( P
"type" => "text",2 V9 [9 Q5 k/ u* f# k$ U! M
"box" => "social",3 W$ {% H2 j. ^& e+ T
"std" => "",! q1 H2 G' ^7 m4 V
)," `& Z* ]$ z2 y9 w: F3 N2 d
; u- ?7 Z) o0 Q6 K
array( "name" => "Insert Header Banner HTML Code (Header)6 g; q, X) C; x5 l, q# G* q* s" V
<br /><em>*Recommended Size 468 x 60</em>) y3 S& `$ V! }
<br /><em>*leave blank if not use</em>",; Z0 B( g# S% G4 B0 P& p# Y3 [) Y, K
"id" => $shortname."_header_banner"," Y# c1 ~6 m* I9 U1 ]5 w7 O! v
"type" => "textarea",
0 r8 |. b, |8 v "std" => "",- S9 V3 d. A7 x' a
),' c$ a9 s3 F. @; I
! x# o! C N% l' `7 Z
array( "name" => "</div></div>",
+ C0 d0 @; @) S "type" => "close",
* f+ l: l/ n8 c' @9 q2 o2 y ),
$ Z+ s; ~- x+ O$ @
# e8 A5 J1 U- r2 w, J/ X9 X4 h: n4 d4 C# K
array( "name" => "Header Navigation Settings",( S$ j2 ~) e, Q$ b7 @
"type" => "heading",
3 q8 R. K* u) h; W* S5 Y/ v+ x/ J: E ),# [# ^- L1 ]$ A" J
* P% x/ x# R' M# o
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
8 _# q: A% O5 c7 C <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
: N( A5 C1 v- ~8 x* n. w' Z <em>*Enter the page post ID number only</em><br />
0 v$ g. C! S7 w% j# R <em>*separate by comma</em><br />
( T7 F7 S, ]8 g! n% g <em>*Exclude pages which you don't want to show on the header navigation</em>",- ]6 X- t7 H% V0 W" @" w1 ^; B
"id" => $shortname."_header_page_navigation",
: k. Z$ ~: [( Z9 f2 H8 F "type" => "text",
& F+ b3 Z1 `& A: R$ h "std" => "",
9 z( w8 g6 ]6 D1 l ),3 f2 G* Y9 |$ k9 Z
8 S2 X* h: H: q$ f3 ^+ `: D array( "name" => "</div></div>",
7 g# A$ y3 K9 T! Q/ x "type" => "close",
8 h# m w/ x4 g6 _/ G' d ),& v! i" Z: o3 p3 M/ V
: y4 O/ |# ]3 J6 h& P) `* o/ i# I
9 v( ^8 f! V3 }4 f% X! s
array( "name" => "Post Auto Thumbnails Settings",
" b+ C. w$ K# H, r3 \7 \. R8 n# X "type" => "heading",4 L8 d0 ^! ~1 [1 G1 ^
),
6 z+ J# ^) z, R4 {
# P" z! w3 M4 G' o( G0 \ array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",8 h% e8 \7 C3 }
"id" => $shortname."_timthumb_activate",
6 q; s5 U6 V3 a t6 p- e0 ?7 f d$ A "type" => "select",
5 d- B/ r8 ^+ R6 P$ W3 A "std" => "No",
# |) E" ^' H5 J' `' Z6 H "options" => array("No", "Yes")),
3 ~) _6 X: ~6 C
& X& B$ o* w: E% g1 W5 s, H& w" L/ j array( "name" => "If Timthumb is enabled, Please choose its cropping method",
( @/ f2 f* F. F& b "id" => $shortname."_timthumb_cropping",) {1 E3 q" X- V; P' O' Z# `0 Y
"type" => "select",' Q1 U& a, ?# I! E( ]) w
"std" => "",
) v! F$ m% ^2 e# Z2 [. i "options" => $crop_position),2 @! S$ \& r8 N6 b" X+ `+ t- i( C- s
2 z A- `3 L2 g9 b( i" w7 `
array( "name" => "Insert Width Of Thumbnail Image<br />
4 g( A+ c3 ?% ?( u <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />* N& D1 i: u% w
<em>*Leave Blank To Use Default: 250</em><br />",9 {' c, ?' } \0 @0 h& j
"id" => $shortname."_thumb_width",+ I; |9 S3 U: {
"type" => "text",
, k }7 F8 o- g0 c" P$ } "std" => "",
; H, D, L$ L. l7 h ),# c: m/ p# \ Q! z
. n3 k0 { X1 B. f( G" k
array( "name" => "Insert Height Of Thumbnail Image<br />
* F3 _3 t3 D6 f+ o <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
/ L. O1 I+ g, x <em>*Leave Blank To Use Default: 200</em><br />",
& B' n; G( c, t1 z5 Z. ^" Z7 z "id" => $shortname."_thumb_height",
* G- N: \4 L1 r# U I "type" => "text",' M7 g _/ h% Y
"std" => "",$ D: k1 M( k( f* \4 }6 b+ U. k
),/ Y+ e- p5 U6 V2 a- t5 I( [7 G# G6 z
# u+ u# V1 I0 {" Q1 m. g array( "name" => "</div></div>",7 v5 Z6 Y2 Y K; {) I# k* K
"type" => "close",! E* ^" i4 I. L+ N, B6 f8 a
),. S, c8 R/ G3 u# j/ l
6 `& j+ e7 P0 _. j) b& { array( "name" => "Featured Content Slider Settings", e ^# x3 A- N9 k
"type" => "heading",2 u1 F, L/ w2 w* ~) l. d! b
),
" b8 N1 }# f ]8 N1 r3 O' b2 Q8 [9 r! o% K* _7 U( z: Y+ a
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ `0 d$ g) g& J( E# {$ l
"id" => $shortname."_featured_activate",* }& j5 H% p6 }6 a' p$ T
"type" => "select",
' Z4 l% \3 l; ?# h7 e5 q$ r "std" => "No",
( ]) k) @2 u) d* r4 k "options" => array("No", "Yes")),/ B, R( Y. F( E" F1 M) T5 r. q
B/ p+ L9 B* z b
# D9 C& B$ x4 O/ R! y& Z
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
" e4 [2 [7 y6 s* y7 ^' p( x+ ^' h "id" => $shortname."_featured_category"," J; ^# X7 k; E" W
"type" => "select",
' l$ k% v1 W9 T+ ?' q5 a/ R/ p, q* u "std" => "Choose a category:",
, F$ p# O) k+ H- Q* B1 Q) G "options" => $wp_getcat),( r7 X7 {, N$ ~
s0 ^: ] s7 K; p; B h array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",: {" @- W3 ?1 l9 E" y
"id" => $shortname."_featured_number",
1 L: _- f# \( {0 U* T% _ "type" => "select",1 U1 {8 s" j$ V% [! n& `
"std" => "Number of post:",' _5 [3 Z H( o! o
"options" => $number_entries),
* t0 V0 |+ r( ~' t3 ?$ ^
7 K- J* d1 R! \8 I/ z3 l array( "name" => "</div></div>",
( c; V3 k0 V, N% n. [9 C4 F "type" => "close",
4 v& M$ I8 I B( Q3 g- | ),
; B ^( Q; A7 D8 n S9 g
# c3 t& h% g2 x, P& P( [ array( "name" => "Featured Category Settings",
, Y$ D/ J! L3 t0 b3 m "type" => "heading",) e1 i6 r) p( O* S
),
" p. N7 f, V3 Y% [) y7 Z/ F
" O- s! z% s! Y% o array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
9 {9 B( i) D- M3 m2 o "id" => $shortname."_featured_category_activate",
; |* x( ], w' b "type" => "select",% q8 k: |( i/ k# w
"std" => "No",
8 H# q$ e' e) J9 N, M; }- s "options" => array("No", "Yes")),0 i, B: a* H+ V a+ g
, O1 L6 x) \0 @& M* b+ A
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",- u% p/ ~! i$ ]6 `; b% D. N# y, [" K
"id" => $shortname."_featured_category_id1",
. g* v% ^/ h& B- T' Y2 x "type" => "select",; R+ `9 F. g" x
"std" => "Choose a category:",
$ L8 Q7 M# I) J# S) | "options" => $wp_getcat),
. x: P' l6 Z3 x; X# v
) `4 x1 C3 S: U. | array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
0 t# n5 v7 h5 Y, J8 M "id" => $shortname."_featured_number1",
5 Q B2 ]4 d5 \. U, Z, w/ @ "type" => "select",
# m T% N6 q9 w( z "std" => "Number of post:",& a8 E" {7 m4 V! [5 E$ {1 Z
"options" => $number_entries),, ^' |4 R2 P. T) F( r
% |. \: \+ u" x- a+ O
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
. I; ~) a+ }' i5 d# \4 H2 | "id" => $shortname."_featured_category_id2",, g# j) ~4 Y0 S9 o& W5 {/ |. c
"type" => "select",
! Y" ]/ _7 c+ a) ^9 `) x7 C "std" => "Choose a category:",
, D* r% ?' F% }5 b; W8 ^* y "options" => $wp_getcat),
- Z3 d" f7 ^' m4 ^# l7 T1 l, S * ~$ I7 t: @# |0 b7 S/ k
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",7 c6 C& e1 f6 h' b) E* a
"id" => $shortname."_featured_number2",2 e% p! F, k1 `& B9 Y
"type" => "select",
3 u, `$ V) G- ?( j. x "std" => "Number of post:",
5 K: t% N/ x/ k8 O; M "options" => $number_entries)," E% q. Q, i( \
. I/ l' c w8 }5 F* k& E* H! ]
9 k! W4 m+ N' f. U) l2 n
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
4 \% r4 A* G, b4 c( t$ v! G" U; b; y "id" => $shortname."_featured_category_id3",7 q! z# I W; {- v3 r
"type" => "select",1 J7 X% e/ q3 p. N/ V* H
"std" => "Choose a category:",+ E) C: Q% p' r6 m
"options" => $wp_getcat),
+ C) S) `, q3 r$ l+ v3 K 6 F+ U% Z' {' U- ]4 |! y' I
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",0 f: b" P; ~$ G- |
"id" => $shortname."_featured_number3",
2 D/ a4 \5 ?) s "type" => "select",) F/ U- T5 A8 A6 Z
"std" => "Number of post:",
, P( |. w* @& t3 k "options" => $number_entries),: U# t3 Z% {, w! _6 {
1 f, j- X3 b2 v1 s# k3 K
6 M1 B3 M( t# i- k
array( "name" => "</div></div>",
) @8 ?* j! w. w3 }( n1 a "type" => "close",
5 V; n: M( | n ~ ),9 M; _. \9 n- U: Q2 R) y! d
; M/ N' g- x8 d$ J/ R& c6 y
, y/ F Z# _- {1 b; G4 x& c array( "name" => "Google Adsense & Analytics Settings",% Z: t% W$ @+ ?$ [3 h' l |
"type" => "heading",
8 R2 x1 O% j i8 U0 S ),2 A3 J0 m! { q; i8 `7 ]+ h
3 D; f7 [ o' X5 D+ ]% E array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",( T4 M0 }! Z6 p9 R; R
"id" => $shortname."_adsense_loop_activate",
. w# c) N. A) [0 k. x1 X "type" => "select",0 I( T) ?( J: h1 I+ Z+ n6 j0 }1 O9 q
"std" => "Disable",8 C$ A8 X# P2 H% s& r! @2 U. Z$ N* [
"options" => array("Disable", "Enable")),
% ~% Z, ?. I2 J: {6 w' ?# w7 S6 V/ f( ^! }0 ?0 T7 a+ \
array( "name" => "Insert Google Adsense Code For Loops Here<br />- K @* e* ^2 `* `( E# K( D
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
5 F/ A1 l5 E: c% l6 D( A "id" => $shortname."_adsense_loop",
0 L$ Y+ B2 g! [' k. O& d9 f6 ]: V "type" => "textarea", m9 D, b- T; j q9 b
"std" => "",/ w9 m9 P. } k W! d/ H
),
0 d8 T) F$ D4 A1 d8 z0 g5 c. p+ ]- e1 o! R9 e- ?$ n
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
+ V& I& Z7 m' s4 v9 ^- m5 k0 a "id" => $shortname."_adsense_single_activate",
8 L8 y; W: L4 O- m `& [ "type" => "select",
0 b6 |5 z4 O: v2 `1 n4 g "std" => "Disable",& k9 b' c( p6 p/ }% h6 n/ V8 _
"options" => array("Disable", "Enable")),2 i) m0 N }( G; I& Z
- W+ e+ f& i1 U) o& w; O+ M6 q
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
# d2 R( G/ n' E; d4 @ <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
' ?+ J# K6 t6 P* O" R1 {, w8 b "id" => $shortname."_adsense_single",- I4 u B' f- L/ K; N+ c
"type" => "textarea",4 N D j2 x- M
"std" => "",% {+ q4 M7 C: H* s' b
),) V7 Z: L$ H* s3 Z% v' F
# i* O" d) u2 C8 M* n4 b1 z2 }! J1 e& h: n+ D2 W" t
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
) A- @. z1 y! ^# d: N "id" => $shortname."_google_analytics",9 {, W* [8 V8 w$ F' N* k
"type" => "textarea",2 [# `4 ]6 |+ A9 \/ U$ j# C
"std" => "",
" k% M/ A7 ~# b, L( j; [ ),
8 A. V2 S5 t% r$ J: I C5 v B% T! q& V" p, o$ ]6 r
array( "name" => "</div></div>",
2 |; w& z+ b. S$ N# n- v "type" => "close",) X( v) E8 H% l: u3 V! @1 f
),
2 z D2 ?" j- D7 g0 Z 7 Z5 I; J$ F) ?( x
: g0 w' A) e! X9 A: Y, D9 g2 J* {/ G
array( "name" => "AddThis Social Bookmarking Settings",
+ F5 K; Y( P+ c$ Q4 H* N "type" => "heading",9 F: t+ p* [/ A2 f/ P0 Y# P3 ?
),
( B* b% Y( f4 U4 d. L6 c1 M# Z4 z& ]+ {' i7 `7 f% n0 @: I
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
3 G/ ~( `9 s: Y8 a1 N" G <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
% H/ X) C) a) N. E "id" => $shortname."_addthis",- E1 [/ x7 J! F1 i$ p4 w B
"type" => "text",
# K% M" _: |+ ? X "box" => "social", F. M. Q+ { i: p
"std" => "",% V0 H9 G v3 z4 ]
)," R3 A8 g3 D$ U" ~* a% |3 u' Q* `
1 {" M5 }) S, Y; c2 D% o+ ` N array( "name" => "</div></div>",
2 r5 Z) R/ v! b& G "type" => "close",
6 Q2 A0 z4 v6 k3 x ),
' Q; g2 A) Z4 ^9 r3 | + \6 _7 L: Z3 y) k
- _# |3 | `+ k( u) L a" _3 X / }3 ~7 w! q2 R, M h
array( "name" => "YouTube Video Settings",
9 k( N, v& [8 s; i" z: S3 l "type" => "heading",! C$ h: Q/ Y3 \, H2 x4 y
),, `* ^4 J. Y3 V" Q/ m
5 @& `+ B# i z, z# r4 I% l array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 m6 c" a1 w) q "id" => $shortname."_emvideo_activate",
6 K0 R+ z+ T8 E$ m8 p6 z5 {: b "type" => "select",
" H9 C; a' B& W2 ]! } "std" => "No",, M: I9 F% A/ \, B! ~" L
"options" => array("No", "Yes")),
5 _$ X: o' w8 l! G2 t% @
7 M. O! H& b2 Z* F5 k 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>",/ ?2 D# A" v" I8 ~0 C
"id" => $shortname."_emvideo", F- t/ v2 K) N3 ~9 M
"std" => ""," Q8 a$ F5 T. A/ ^4 X' k
"type" => "text"),6 m1 t3 b; v! y
, \8 |9 s8 \4 w$ k9 a' g array( "name" => "</div></div>",) E2 m7 V& S9 p$ Y4 I% [
"type" => "close",# t" f% D/ F5 w9 u- f; D8 j% J
),
8 ~% [/ m p! L! p9 e j2 D- ?
l5 U$ f9 P% f2 t/ v5 \. @ array( "name" => "Twitter Settings",
3 l- w8 ^ U9 X. a3 e1 d "type" => "heading",3 x) s; z1 l2 w1 P) J- V, S' W
),
+ U2 o. d2 C' l8 i& G6 C" l. g5 e
9 m/ z& P ~5 N" ?, { array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",% Q" J9 r" ~3 J9 A T( a
"id" => $shortname."_twitter_activate",
( b4 E1 }. B5 f# w, x% \ "type" => "select",
" e+ z7 D" E$ T Z "std" => "No",& |# l( j+ Z4 m) N
"options" => array("No", "Yes")),: s4 x1 D# G0 C( h1 g
2 c/ I. g6 D5 X. Y9 b _2 K( N
array( "name" => "Insert Your Twitter ID here
) Y# I. }6 N6 {1 U# E( H <br /><em>*leave blank if not necessary</em>
2 O" t2 F& z( d% y5 z6 b2 B- A <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
8 P( I# Z. M+ j* I1 s5 }" W) @ "id" => $shortname."_twitter",- w" S* c6 `9 f4 k" M
"type" => "text",4 e6 U c1 h5 b5 a/ D N, k. I
"box" => "social",/ m: c& R: `1 `5 U- l! R
"std" => "",' ~/ I% T0 ]+ N1 k' Z; e
),
0 v1 W0 U% @4 n* l& W$ f
3 E2 J3 z. D/ r4 d. r9 ^ array( "name" => "Enter Twitter Feed Count here
9 I4 E4 [5 z9 B <br /><em>*leave blank if not necessary</em>
0 z% Y& S1 }: z <br /><em>*Enter How Many Twitter Feed To Display</em>",
3 C$ a+ p& R8 x' D "id" => $shortname."_twitter_count",
. \* t) ]9 j2 U" Q "type" => "text",
8 `; [7 m8 C& z; R# A k "box" => "social",! o* k$ K; o4 ~ V. s' c. }8 ?
"std" => "",. Z; t- l- y% i: ^( O
),( N" Q" w a- Y% j" l: H
, m, G$ u' X& z% ~7 q; P array( "name" => "</div></div>",
5 Y5 j8 Y5 ^9 v5 ^6 v+ d9 r "type" => "close",) b5 B5 L, X* Y- @" E4 f
),9 H. t0 h8 v3 s/ T" d( P/ @* P
7 |7 C& K/ |9 {" D0 [/ k
$ \9 W o! t) P4 ^8 J
array( "name" => "125 x 125 Banners Advertisement Settings",
& @* Q5 h k, y+ @7 v0 E "type" => "heading",4 C W2 l5 j, a- T! b. f) A3 I; u
),& g/ B6 |4 X0 i
& M7 s2 ~0 x4 V9 N/ i/ B
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 z# z& G% }( m0 C "id" => $shortname."_sponsor_activate", r: j% J% J0 ]; H: ^
"type" => "select",
( G% p$ }1 ^$ Z "std" => "No",; g3 {" C# r1 H
"options" => array("No", "Yes")),
$ \+ `, J& l/ p, l" U* w- K 1 L8 E3 N) Z; j
3 C% t% k& h4 D- V" c array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",1 b# z: H, E! u3 l- |/ |
"id" => $shortname."_sponsor_banner_one",( g( v+ d" z: N! L: m
"type" => "textarea",
; {& f$ `: O* G5 v3 h "std" => "",
, {- ~) t# Q1 C) K" j1 h ),
- j* X9 v, W$ F5 y6 e- H. O: N: @7 W& n, u9 M4 Z f
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",( y' N9 Q* w4 I n' F
"id" => $shortname."_sponsor_banner_two",
: Q5 D2 C8 m! }) p8 _ ^ "type" => "textarea",
% c$ z8 E0 [% @; y "std" => "",+ o. e; b o6 V! O0 W
),6 _6 F/ J* ^$ x: [1 e! k
/ x$ S& F0 ]* j$ \$ ^: M" O array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
+ }( {: K4 B' H" s: v "id" => $shortname."_sponsor_banner_three",
& j; I4 y9 R: ?7 f- Z "type" => "textarea",1 ^% C/ H1 f3 p" s4 g: M
"std" => "",1 `- S& S) T/ z/ f
),0 {* i5 p5 Q" j* a; q1 H
2 k$ u4 o0 b3 h' p ?/ w( H
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
! s6 L+ C0 c, p! c "id" => $shortname."_sponsor_banner_four",
2 \6 m, t: U7 P0 V "type" => "textarea", h# @* F& i" _) s& E, A7 H3 g
"std" => "",
9 O2 |3 r, Z. @. s ),
G* S, S% O; z4 v e: s3 A* [2 j3 E+ ~4 O4 l) ~+ b0 T6 S
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
2 |. g1 ^" ]: ^! h2 ^$ ?; o2 z "id" => $shortname."_sponsor_banner_five",3 w. a! Q$ m- F" g. q5 y- i$ t
"type" => "textarea",
) Y Z5 v m9 w8 ~% A, P "std" => "",2 ~& Y$ w4 r9 \
),
: Z i8 D3 g; f; `9 t3 h L& q4 ?+ r
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
6 E8 U D/ L8 I7 C) e "id" => $shortname."_sponsor_banner_six",
5 W6 q. D* m" O4 [; r, w, t' G "type" => "textarea",
3 u+ n }9 z! q1 K' g* w "std" => ""," A( e3 U9 G: E. p Q6 D d
),
+ g' W3 J' B2 q/ ?9 P j- m$ Z# L- B6 D# J8 _/ J; j/ q
array( "name" => "</div></div>",6 H: z" t0 i3 V3 q/ a
"type" => "close",
+ l" [ @# @2 N! f- G ),
" J0 X; `% B7 [ v% n; S
" j |" ]: P: N/ W0 V2 ]* V' ~
' K' m, i1 m9 F
- c, |/ v. ], m F);
% G+ ~: W3 L [! R7 u* I3 O: i9 `/ J# X2 U M- u( W
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
: H8 L) |1 A3 @" t/ E) N
& s9 h$ n6 R$ s) }2 T6 [" Gecho "<div id=\"admin-options\"> ";
7 I+ q4 j5 t8 e
* y V. u$ s: H: g- ^global $themename, $shortname, $options;
* i9 x* C8 p! S! ?; Xif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';, V8 l+ w# B* G: y
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';9 h, F C6 u: C U
?>9 F; Y: U# ~. T0 P: Q
) U8 e- \ B) m; a* ?7 b) T8 G<h4><?php echo "$themename"; ?> Theme Options</h4>
: u9 |4 @( r, ]5 m! l; T, T/ ~
7 X' o6 r4 ?8 X<div class="annouce">( a2 w& D6 p( y4 \* n# `2 N
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>$ v; r' E* h8 q% p0 O% ]
<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>
# d. r3 u& ]2 ]6 X5 g</div>! J) c. Y8 [3 t6 d0 W' _
6 R1 M, [5 F: `+ _: ^, t- m<form action="" method="post">/ ?' X% _* h3 N. ? M' a
3 Y; \( W$ G5 B. `
<?php foreach ($options as $value) { ?>2 v; g8 V' @+ V7 ], b
8 ^" b# @- b" s; w<?php switch ( $value['type'] ) { case 'heading': ?>
% F' t7 ^3 R1 m7 @
! M. i3 S4 p+ C s' l& c5 n, u<div class="get-option">- E! n7 u( T9 X. y* U' e8 ~
0 C2 P- {+ y. E9 _& e+ X
<h2><?php echo $value['name']; ?></h2>6 J; M* E. m2 w- G$ y8 O
% R" t( ^8 c2 V8 s: \
<div class="option-save">
1 f, u, C- v- _. M; D; Y+ K$ d2 g$ s! m: d
<?php
( ^$ N) `7 W: u/ j8 }( Sbreak;8 u. Y& \2 V- t: V3 N
case 'text':6 m$ J; f0 F, H4 O
?>
5 B1 `, Z4 L1 p1 ~% P
/ K3 n/ s _# a, r<div class="description"><?php echo $value['name']; ?></div>! g1 }+ p) q, i) o0 M' ^
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (- d G( q3 L. `/ q
* \% m+ K4 W. ~2 yget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>5 k5 n" F) f3 u: F6 [
! ?: r# n2 M7 N7 q& C4 ]9 d<?php6 X, Y3 y0 F" s6 a9 W9 j; ]
break;
h; d0 ]2 Q$ S; s/ _. Ycase 'select':
w2 u$ w! @9 Z* x0 Z l9 `?>- m! L4 r. v/ ^( [
3 [; v, e1 |% s& L. X! X6 A
<div class="description"><?php echo $value['name']; ?></div>' @, K6 f. t! ^. e! e: n; l9 { D
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>"> @, z0 g/ e' @: \# ]" l% h" ]
<?php foreach ($value['options'] as $option) { ?>
& @4 g( x* C- w<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
* ~6 s: ~0 X7 D3 {9 s! E& I<?php } ?>1 h; d' d% Y" [- `& K& Q& |
</select>
. R2 |' ~% f! E* W: A% m8 F+ S</p>
8 w8 Z8 U! u& O, ]
) @2 |6 I( }% t' O7 m) s. N<?php" s, j! d! q2 q u
break;
. O9 y/ ?! ~9 E) u/ \- r* qcase 'textarea':6 D) {5 M1 y5 B# C) J( c, e: |
$valuex = $value['id'];& E5 i u( g1 J& O8 f
$valuey = stripslashes($valuex);
0 V* Y6 B, M4 S8 q' N$video_code = get_settings($valuey);
6 x1 c2 h, a; T; q?>
0 k3 J( m6 {7 Y' r8 w3 N2 ~9 c- @$ ~; ?* L! [
<div class="description"><?php echo $value['name']; ?></div>
; p' P8 o& p) c K# z6 z<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
7 X l) G2 t, `4 a5 c; j* `
! t! w6 w$ N( I5 Delse { echo $value['std']; } ?></textarea></p>, p0 @7 V; F! T; _
! \, Z- U8 m# W. U9 a
<?php
% y; u2 H! h; Hbreak;. z6 D# a2 h% X# g0 b, X
case 'close':
L' ]% Y4 O2 D9 `- {5 O' a' H F?>6 {6 J9 O, y$ m9 n2 f' N
8 n$ A `+ z$ r% V" D7 v8 d<div class="clearfix"></div>* A* [; Q2 [1 r# J$ O/ a+ }" {
</div><!-- OPTION SAVE END -->2 X$ R, a( m) M
) |- e! J6 j0 E# `4 O
<div class="clearfix"></div>$ {" X1 x8 N) H/ D+ h8 N
</div><!-- GET OPTION END -->
. Q4 F9 A6 r, }+ U% f3 F6 V" g# a6 g9 M/ ]: v( U
<?php3 p. d. c" w6 ]0 Q
break;! x1 R9 M& n) a
default;1 @' ^+ t: H& I
?>3 K" Z# V& ]* I' D! L8 T$ ]
) r8 d; K& z& x; Y- B0 w5 ?
1 ]$ o% I# `3 t2 P* i<?php
( T, m }1 S8 N6 `1 |break; } ?>0 K$ i& {( h6 k7 ~* ?* x* Y4 F6 k
' v; p; V2 P6 _% b
<?php } ?>8 T5 }0 S, d2 w$ c& `# w
( V" \- t$ X& p9 b- h
<p class="save-p">- Q% I' _$ \7 k8 O1 ?* z
<input name="save" type="submit" class="sbutton" value="Save Options" />
% m; p B9 D" q7 [ Y6 q* W<input type="hidden" name="action" value="save" /># {( g8 Q+ b5 n% V' ^
</p>
4 Y# \8 L, Z @% u8 R: q% o0 y</form>
+ ^" K O9 L' C% Y) W
) j, Z) T4 U* b$ {8 ^, n% [, ]3 K<form method="post">+ b/ w. |- z- V( l2 N5 K8 b9 x, _
<p class="save-p">! f- `! ^4 }- r3 _% }* V) j! ^7 n
<input name="reset" type="submit" class="sbutton" value="Reset Options" />
! I+ m9 l8 }) ^- l6 x$ ~<input type="hidden" name="action" value="reset" />; ~0 C8 w' X1 Q
</p>. q% _4 n9 z1 A% S. W6 z
</form>
! j* V4 @+ z# [4 J3 y2 q
W' j" g m6 v7 i+ [7 K1 @, H</div><!-- ADMIN OPTIONS END -->
, i, G- T' M! H1 k( H
$ }& E& |* k+ T ?4 g<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
/ f+ T8 ~/ Q' ?8 I5 T$ t' g8 _: F/ R+ |' L, Q c6 C
function mytheme_admin_register() {% [; [' N5 s b# g4 H- [: g* [
global $themename, $shortname, $options;
1 F4 F' g8 D7 b+ U* F2 wif ( $_GET['page'] == basename(__FILE__) ) {0 [2 g: r# c0 s5 K- l& h8 X' e
if ( 'save' == $_REQUEST['action'] ) {4 s* u' V! s8 k1 r$ i
foreach ($options as $value) {; \ o* o- i; K1 Y9 j
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
0 W1 W, Z/ X# n- }0 C5 Gforeach ($options as $value) {
- V; R+ N g/ L: Rif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }4 s$ k- o; k. W) R* A& [
header("Location: themes.php?page=functions.php&saved=true");
! q- F7 U3 G3 n- Vdie;2 X( @, d$ A" k# \7 M* u, y
} else if( 'reset' == $_REQUEST['action'] ) {
' @; P3 W8 `" A7 h; g8 s+ u* pforeach ($options as $value) {2 e0 p8 Y+ t$ v. }9 w; s9 L# `
delete_option( $value['id'] ); }
k/ G$ @4 z# @$ {1 v7 n2 Qheader("Location: themes.php?page=functions.php&reset=true");4 V3 q# H- M3 t7 V" d' Z
die;
$ \, z' Y* @1 Z6 {0 B/ [}
* @" U- N" O" S& `; o}4 Q4 P q5 I) l. ?, A. V) N/ ]) O
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');$ f- u6 Y2 h/ ?' G$ F* h8 T; u
}# ^1 K$ u7 x0 E! @8 {# t* V
' ^& T" W! o6 e% n% hfunction mytheme_admin_head() { ?>
: _. y3 \6 r) e<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
" e2 x/ }6 B: |( j<?php }
7 @9 H: r7 s# G" J% u |
|