|
|

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