|
|

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