|
|

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