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