|
|

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