|
|

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