|
|

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